Tcl Library Source Code

Check-in [e0d7b4dc8e]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

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

Overview
Comment:Merged localdoc work based on markdown into markdown.
Timelines: family | ancestors | descendants | both | doc-fixup-and-markdown
Files: files | file ages | folders
SHA3-256: e0d7b4dc8eb9c8f5b9947bfa7bc530c304ddfbc0bd10b13b305642edaf8381f3
User & Date: aku 2019-03-21 19:50:43
Context
2019-03-21
20:05
Switched homepage over to markdown. check-in: 2c7245df25 user: aku tags: doc-fixup-and-markdown
19:50
Merged localdoc work based on markdown into markdown. check-in: e0d7b4dc8e user: aku tags: doc-fixup-and-markdown
02:16
Fixed missing conversion to relative paths for image links. Closed-Leaf check-in: 58be278739 user: aku tags: doc-fixup-and-markdown-localdoc
2019-03-20
22:57
Markdown: Implemented document cross references, and added refs to the per-page synopses. check-in: a8b930a4d3 user: aku tags: doc-fixup-and-markdown
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to embedded/index.html.

3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<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,






|


|







3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<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="md/toc.md">
Table Of Contents</a>
&nbsp;&nbsp;&nbsp;
<a href="md/index.md">
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,

Added embedded/md/image/arch_core_container.png.

cannot compute difference between binary files

Added embedded/md/image/arch_core_eplugins.png.

cannot compute difference between binary files

Added embedded/md/image/arch_core_export.png.

cannot compute difference between binary files

Added embedded/md/image/arch_core_import.png.

cannot compute difference between binary files

Added embedded/md/image/arch_core_iplugins.png.

cannot compute difference between binary files

Added embedded/md/image/arch_core_support.png.

cannot compute difference between binary files

Added embedded/md/image/arch_core_transform.png.

cannot compute difference between binary files

Added embedded/md/image/arch_user_app.png.

cannot compute difference between binary files

Added embedded/md/image/arch_user_pkg.png.

cannot compute difference between binary files

Added embedded/md/image/architecture.png.

cannot compute difference between binary files

Added embedded/md/image/expr_ast.png.

cannot compute difference between binary files

Added embedded/md/image/flow.png.

cannot compute difference between binary files

Added embedded/md/image/gen_options.png.

cannot compute difference between binary files

Added 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
[//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; [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='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='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='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='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='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; [map::geocode::nominatim](tcllib/files/modules/map/map_geocode_nominatim.md) &#183; [map::slippy::fetcher](tcllib/files/modules/map/map_slippy_fetcher.md) &#183; [tool](tcllib/files/modules/httpd/httpd.md) &#183; [uri](tcllib/files/modules/uri/uri.md) &#183; [websocket](tcllib/files/modules/websocket/websocket.md)|
|<a name='httpd'></a>httpd|[tool](tcllib/files/modules/httpd/httpd.md)|
|<a name='https'></a>https|[uri](tcllib/files/modules/uri/uri.md)|
|<a name='httpserver'></a>httpserver|[tool](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='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::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='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)|
|<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='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='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; [smtpd](tcllib/files/modules/smtpd/smtpd.md) &#183; [tool](tcllib/files/modules/httpd/httpd.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::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|[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/httpd/httpd.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='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|[tool](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)|

Added 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
[//000000001]: # (dtplite - Documentation toolbox)
[//000000002]: # (Generated from file 'dtplite.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (dtplite(n) 1.0.5 tcllib "Documentation toolbox")

# 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](#see-also)

  -  [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|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|text

  - __-post+toc__ label path|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='see-also'></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 <[email protected]>

Added 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
[//000000001]: # (nns - Name service facility)
[//000000002]: # (Generated from file 'nns.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (nns(n) 1.1 tcllib "Name service facility")

# 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](#see-also)

  -  [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|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='see-also'></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 <[email protected]>

Added 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
[//000000001]: # (nnsd - Name service facility)
[//000000002]: # (Generated from file 'nnsd.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (nnsd(n) 1.0.1 tcllib "Name service facility")

# 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](#see-also)

  -  [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='see-also'></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 <[email protected]>

Added 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
[//000000001]: # (nnslog - Name service facility)
[//000000002]: # (Generated from file 'nnslog.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (nnslog(n) 1.0 tcllib "Name service facility")

# 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](#see-also)

  -  [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|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='see-also'></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 <[email protected]>

Added 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
[//000000001]: # (page - Development Tools)
[//000000002]: # (Generated from file 'page.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (page(n) 1.0 tcllib "Development Tools")

# 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](#see-also)

  -  [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='see-also'></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 <[email protected]>

Added 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
[//000000001]: # (pt - Parser Tools)
[//000000002]: # (Generated from file 'pt.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (pt(n) 1 tcllib "Parser Tools")

# 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 "[email protected]@__".

      * [email protected]@__

        To be replaced with the value of the option __-user__.

      * [email protected]@__

        To be replaced with the the constant __PEG__.

      * [email protected]@__

        To be replaced with the value of the option __-file__.

      * [email protected]@__

        To be replaced with the value of the option __-name__.

      * [email protected]@__

        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 "[email protected]@__".

      * [email protected]@__

        To be replaced with the value of the option __-user__.

      * [email protected]@__

        To be replaced with the the constant __C/PARAM__.

      * [email protected]@__

        To be replaced with the value of the option __-file__.

      * [email protected]@__

        To be replaced with the value of the option __-name__.

      * [email protected]@__

        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.

      * [email protected]@__

        To be replaced with the value of the option __state-decl__.

      * [email protected]@__

        To be replaced with the value of the option __state-ref__.

      * [email protected]@__

        To be replaced with the value of the option __string-varname__.

      * [email protected]@__

        To be replaced with the value of the option __self-command__.

      * [email protected]@__

        To be replaced with the value of the option __fun-qualifier__.

      * [email protected]@__

        To be replaced with the value of the option __namespace__.

      * [email protected]@__

        To be replaced with the value of the option __main__.

      * [email protected]@__

        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__|__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 "[email protected]@__".

      * [email protected]@__

        To be replaced with the value of the option __-user__.

      * [email protected]@__

        To be replaced with the the constant __CONTAINER__.

      * [email protected]@__

        To be replaced with the value of the option __-file__.

      * [email protected]@__

        To be replaced with the value of the option __-name__.

      * [email protected]@__

        To be replaced with the value of the option __-mode__.

      * [email protected]@__

        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 <[email protected]>

Added 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
[//000000001]: # (tcldocstrip - Textprocessing toolbox)
[//000000002]: # (Generated from file 'tcldocstrip.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (tcldocstrip(n) 1.0 tcllib "Textprocessing toolbox")

# 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](#see-also)

  -  [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='see-also'></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 <[email protected]>

Added 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
[//000000001]: # (aes - Advanced Encryption Standard (AES))
[//000000002]: # (Generated from file 'aes.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (aes(n) 1.2.1 tcllib "Advanced Encryption Standard (AES)")

# 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](#see-also)

  -  [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|cbc]*? ?*-dir [encrypt|decrypt]*? *-key keydata* ?*-iv vector*? ?*-hex*? ?*-out channel*? ?*-chunksize size*? [ *-in channel* | ?__--__? *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|cbc]*? ?*-dir [encrypt|decrypt]*? *-key keydata* ?*-iv vector*? ?*-hex*? ?*-out channel*? ?*-chunksize size*? [ *-in channel* | ?__--__? *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='see-also'></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 <[email protected]>  
Copyright &copy; 2012-2014, Andreas Kupries <[email protected]>

Added 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
[//000000001]: # (S3 - Amazon S3 Web Service Utilities)
[//000000002]: # (Generated from file 'S3.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (S3(n) 1.0.3 tcllib "Amazon S3 Web Service Utilities")

# 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|never|exists|missing|newer|date|checksum|different*? ?__-default-separator__ *string*? ?__-default-acl__ *private|public-read|public-read-write|authenticated-read|keep|calc*? ?__-default-bucket__ *bucketname*?](#1)  
[__S3::SuggestBucket__ ?*name*?](#2)  
[__S3::REST__ *dict*](#3)  
[__S3::ListAllMyBuckets__ ?__-blocking__ *boolean*? ?__-parse-xml__ *xmlstring*? ?__-result-type__ *REST|xml|pxml|dict|names|owner*?](#4)  
[__S3::PutBucket__ ?__-bucket__ *bucketname*? ?__-blocking__ *boolean*? ?__-acl__ *{}|private|public-read|public-read-write|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|xml|pxml|names|dict*?](#7)  
[__S3::Put__ ?__-bucket__ *bucketname*? __-resource__ *resourcename* ?__-blocking__ *boolean*? ?__-file__ *filename*? ?__-content__ *contentstring*? ?__-acl__ *private|public-read|public-read-write|authenticated-read|calc|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|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|xml|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|break|continue*? ?__-progress__ *scriptprefix*?](#14)  
[__S3::Pull__ ?__-bucket__ *bucketname*? __-directory__ *directoryname* ?__-prefix__ *prefixstring*? ?__-blocking__ *boolean*? ?__-compare__ *comparemode*? ?__-delete__ *boolean*? ?__-timestamp__ *aws|now*? ?__-error__ *throw|break|continue*? ?__-progress__ *scriptprefix*?](#15)  
[__S3::Toss__ ?__-bucket__ *bucketname*? __-prefix__ *prefixstring* ?__-blocking__ *boolean*? ?__-error__ *throw|break|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|never|exists|missing|newer|date|checksum|different*? ?__-default-separator__ *string*? ?__-default-acl__ *private|public-read|public-read-write|authenticated-read|keep|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|never|exists|missing|newer|date|checksum|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|public-read|public-read-write|authenticated-read|keep|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|PUT|DELETE|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|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|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|never|exists|missing|newer|date|checksum|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|xml|pxml|dict|names|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__ *{}|private|public-read|public-read-write|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|xml|pxml|names|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|xml|pxml|names|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|public-read|public-read-write|authenticated-read|calc|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|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|xml|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|break|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|now*? ?__-error__ *throw|break|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|break|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.

Added 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
[//000000001]: # (xsxp - Amazon S3 Web Service Utilities)
[//000000002]: # (Generated from file 'xsxp.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (xsxp(n) 1.0 tcllib "Amazon S3 Web Service Utilities")

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

Added 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
[//000000001]: # (asn - ASN.1 processing)
[//000000002]: # (Generated from file 'asn.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (asn(n) 0.8 tcllib "ASN.1 processing")

# 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 <[email protected]>  
Copyright &copy; 2004 Jochen Loewer <[email protected]>  
Copyright &copy; 2004-2011 Michael Schlenker <[email protected]>

Added 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
[//000000001]: # (base32 - Base32 encoding)
[//000000002]: # (Generated from file 'base32.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (base32(n) 0.1 tcllib "Base32 encoding")

# 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

    the input contains characters which are not valid output of a base32
    encoder,

    the length of the input is not a multiple of eight,

    padding appears not at the end of input, but in the middle,

    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

Added 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
[//000000001]: # (base32::core - Base32 encoding)
[//000000002]: # (Generated from file 'base32core.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (base32::core(n) 0.1 tcllib "Base32 encoding")

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

    The length of the input is not a multiple of eight,

    The padding appears not at the end of input, but in the middle,

    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

Added 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
[//000000001]: # (base32::hex - Base32 encoding)
[//000000002]: # (Generated from file 'base32hex.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (base32::hex(n) 0.1 tcllib "Base32 encoding")

# 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

    the input contains characters which are not valid output of a extended hex
    base32 encoder,

    the length of the input is not a multiple of eight,

    padding appears not at the end of input, but in the middle,

    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

Added 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
[//000000001]: # (ascii85 - Text encoding & decoding binary data)
[//000000002]: # (Generated from file 'ascii85.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (ascii85(n) 1.0 tcllib "Text encoding & decoding binary data")

# 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

Added 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
[//000000001]: # (base64 - Text encoding & decoding binary data)
[//000000002]: # (Generated from file 'base64.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (base64(n) 2.4.2 tcllib "Text encoding & decoding binary data")

# 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

Added 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
[//000000001]: # (uuencode - Text encoding & decoding binary data)
[//000000002]: # (Generated from file 'uuencode.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (uuencode(n) 1.1.4 tcllib "Text encoding & decoding binary data")

# 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* | ?__--__? *string*)](#3)  
[__::uuencode::uudecode__ (__-file__ *filename* | ?__--__? *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* | ?__--__? *string*)

  - <a name='4'></a>__::uuencode::uudecode__ (__-file__ *filename* | ?__--__? *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

Added 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
[//000000001]: # (yencode - Text encoding & decoding binary data)
[//000000002]: # (Generated from file 'yencode.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (yencode(n) 1.1.2 tcllib "Text encoding & decoding binary data")

# 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* | ?__--__? *string*)](#3)  
[__::yencode::ydecode__ (__-file__ *filename* | ?__--__? *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* | ?__--__? *string*)

    Encode a file or block of data.

  - <a name='4'></a>__::yencode::ydecode__ (__-file__ *filename* | ?__--__? *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

Added 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
[//000000001]: # (bee - BitTorrent)
[//000000002]: # (Generated from file 'bee.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (bee(n) 0.1 tcllib "BitTorrent")

# 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 <[email protected]>

Added 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
[//000000001]: # (bench - Benchmarking/Performance tools)
[//000000002]: # (Generated from file 'bench.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (bench(n) 0.4 tcllib "Benchmarking/Performance tools")

# 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](#see-also)

  -  [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='see-also'></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 <[email protected]>

Added 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
[//000000001]: # (bench_intro - Benchmarking/Performance tools)
[//000000002]: # (Generated from file 'bench_intro.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (bench_intro(n) 1.0 tcllib "Benchmarking/Performance tools")

# 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](#see-also)

  -  [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='see-also'></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 <[email protected]>

Added 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
[//000000001]: # (bench_lang_intro - Benchmarking/Performance tools)
[//000000002]: # (Generated from file 'bench_lang_intro.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (bench_lang_intro(n) 1.0 tcllib "Benchmarking/Performance tools")

# 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](#see-also)

  -  [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__ {
        set key [aes::Init ecb $k $i]
    } -body {
        aes::Encrypt $key $p
    } __-post__ {
        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__ {
        set A $sx($times,$n)
        set B $A
    } -body {
        struct::set include A x
    } __-ipost__ {
        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='see-also'></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 <[email protected]>

Added 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
[//000000001]: # (bench_lang_spec - Documentation tools)
[//000000002]: # (Generated from file 'bench_lang_spec.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (bench_lang_spec(n) 1.0 tcllib "Documentation tools")

# 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](#see-also)

  -  [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='see-also'></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 <[email protected]>

Added 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
[//000000001]: # (bench::in - Benchmarking/Performance tools)
[//000000002]: # (Generated from file 'bench_read.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (bench::in(n) 0.1 tcllib "Benchmarking/Performance tools")

# 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](#see-also)

  -  [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='see-also'></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 <[email protected]>

Added 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
[//000000001]: # (bench::out::csv - Benchmarking/Performance tools)
[//000000002]: # (Generated from file 'bench_wcsv.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (bench::out::csv(n) 0.1.2 tcllib "Benchmarking/Performance tools")

# 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](#see-also)

  -  [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='see-also'></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 <[email protected]>

Added 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
[//000000001]: # (bench::out::text - Benchmarking/Performance tools)
[//000000002]: # (Generated from file 'bench_wtext.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (bench::out::text(n) 0.1.2 tcllib "Benchmarking/Performance tools")

# 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](#see-also)

  -  [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='see-also'></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 <[email protected]>

Added 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
[//000000001]: # (bibtex - bibtex)
[//000000002]: # (Generated from file 'bibtex.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (bibtex(n) 0.6 tcllib "bibtex")

# 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.6?  

[__::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* | __-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* | __-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 <[email protected]>

Added 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
[//000000001]: # (blowfish - Blowfish Block Cipher)
[//000000002]: # (Generated from file 'blowfish.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (blowfish(n) 1.0.3 tcllib "Blowfish Block Cipher")

# 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](#see-also)

  -  [Keywords](#keywords)

  -  [Category](#category)

  -  [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8.4  
package require blowfish ?1.0.4?  

[__::blowfish::blowfish__ ?*-mode [ecb|cbc]*? ?*-dir [encrypt|decrypt]*? *-key keydata* ?*-iv vector*? ?*-out channel*? ?*-chunksize size*? ?*-pad padchar*? [ *-in channel* | ?*--*? *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|cbc]*? ?*-dir [encrypt|decrypt]*? *-key keydata* ?*-iv vector*? ?*-out channel*? ?*-chunksize size*? ?*-pad padchar*? [ *-in channel* | ?*--*? *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='see-also'></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 <[email protected]>

Added 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
[//000000001]: # (cache::async - In-memory caches)
[//000000002]: # (Generated from file 'async.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (cache::async(n) 0.3.1 tcllib "In-memory caches")

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

    The string __set__, the *key*, and the value.

    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 <[email protected]>

Added 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
[//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")

# NAME

clock_iso8601 - Parsing ISO 8601 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::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>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

Added 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
[//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")

# NAME

clock_rfc2822 - Parsing ISO 8601 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

Added 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
[//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")

# 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:".

    *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]
            } 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

Added 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
[//000000001]: # (comm - Remote communication)
[//000000002]: # (Generated from file 'comm.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (comm(n) 4.6.3 tcllib "Remote communication")

# 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](#see-also)

  -  [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|1*?

  - __-local__  ?*0|1*?

  - __-port__   ?*port*?

  - __-silent__ ?*0|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:

    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

    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

    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

    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

    Using a slave interpreter (double eval)

    % ::comm::comm hook eval {return [eval foo eval $buffer]}

    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, [email protected]

*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 <[email protected]> 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 <[email protected]> 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='see-also'></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 <[email protected]>

Added 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
[//000000001]: # (comm_wire - Remote communication)
[//000000002]: # (Generated from file 'comm_wire.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (comm_wire(n) 3 tcllib "Remote communication")

# 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](#see-also)

  -  [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='see-also'></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 <[email protected]>

Added 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
[//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")

# 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](#see-also)

  -  [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='see-also'></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

Added 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
[//000000001]: # (coroutine::auto - Coroutine utilities)
[//000000002]: # (Generated from file 'coro_auto.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (coroutine::auto(n) 1.1.3 tcllib "Coroutine utilities")

# 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 <[email protected]>

Added 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
[//000000001]: # (coroutine - Coroutine utilities)
[//000000002]: # (Generated from file 'tcllib_coroutine.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (coroutine(n) 1.2 tcllib "Coroutine utilities")

# 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 <[email protected]>

Added 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
[//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")

# 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

Added 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
[//000000001]: # (cksum - Cyclic Redundancy Checks)
[//000000002]: # (Generated from file 'cksum.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (cksum(n) 1.1.4 tcllib "Cyclic Redundancy Checks")

# 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](#see-also)

  -  [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* | *-filename file* | *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* | *-filename file* | *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='see-also'></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

Added 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
[//000000001]: # (crc16 - Cyclic Redundancy Checks)
[//000000002]: # (Generated from file 'crc16.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (crc16(n) 1.1.3 tcllib "Cyclic Redundancy Checks")

# 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](#see-also)

  -  [Keywords](#keywords)

  -  [Category](#category)

  -  [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8.2  
package require crc16 ?1.1.3?  

[__::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='see-also'></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

Added 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
[//000000001]: # (crc32 - Cyclic Redundancy Checks)
[//000000002]: # (Generated from file 'crc32.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (crc32(n) 1.3.2 tcllib "Cyclic Redundancy Checks")

# 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](#see-also)

  -  [Keywords](#keywords)

  -  [Category](#category)

  -  [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8.2  
package require crc32 ?1.3.2?  

[__::crc::crc32__ ?-format *format*? ?-seed *value*? [ *-channel chan* | *-filename file* | *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* | *-filename file* | *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='see-also'></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

Added 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
[//000000001]: # (sum - Cyclic Redundancy Checks)
[//000000002]: # (Generated from file 'sum.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (sum(n) 1.1.2 tcllib "Cyclic Redundancy Checks")

# 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](#see-also)

  -  [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* | *-sysv*? ?*-format fmt*? ?*-chunksize size*? [ *-filename file* | *-channel chan* | *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* | *-sysv*? ?*-format fmt*? ?*-chunksize size*? [ *-filename file* | *-channel chan* | *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='see-also'></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 <[email protected]>

Added 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
[//000000001]: # (cron - cron)
[//000000002]: # (Generated from file 'cron.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (cron(n) 2.1 tcllib "cron")

# 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