Tcl Library Source Code

Check-in [e6a4a02868]
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:dicttool - Tkt [e79990908f] - Fixed doc grammar. No version change. Removed DOS EOL from .md doc variant.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: e6a4a02868b095ffe2890ef5ee1c3babfaa8dbbecaa7b85bfa595a6fb8986a2a
User & Date: aku 2019-04-11 20:00:10
References
2019-04-11
20:02 Ticket [e79990908f] Fix documentation status still Open with 5 other changes artifact: 024e81c42a user: aku
Context
2019-04-12
06:49
Doctools: - Markdown: Fix indentation for examples formatted as block quotes. Replace leading whitespace with non-breaking spaces. Note: Works only for leading whitespace. Non-breaking inner spaces seem to cause trouble, i.e. are not recognized and not formatted. - Latex: changed to use `alltt` as the environment for examples. This allows markup the same as doctools does for example_begin/end. Refixed handling of continuation lines to use the proper latex macro for the character. Regenerated package docs (version bump & fixes making changes) Version bump - doctools 1.5.4 B (latex, markdown) T (latex, markdown) check-in: 97fc04ebd2 user: aku tags: trunk
2019-04-11
20:00
dicttool - Tkt [e79990908f] - Fixed doc grammar. No version change. Removed DOS EOL from .md doc variant. check-in: e6a4a02868 user: aku tags: trunk
06:44
Doctools: - Better handling of continuation lines protected against Tcl substitution in the input. I.e. "\\n" written as "\\\n". Detect and convert this form into something which will look like a normal continuation line in the output. - Fixed situations where \1 characters slipped into the generated markdown. The relevant examples are now formatted as block quotes instead of code blocks. Price paid is loss of indentation. Might be fixable with the insertion of non-breaking spaces. Regenerated package docs (version bump & fixes making changes) Version bump - doctools 1.5.3 B (html, latex, markdown, nroff, text, tmml, wiki) T (html, latex, markdown, nroff, text, tmml, wiki) check-in: be90a82c61 user: aku tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to embedded/md/tcllib/files/modules/dicttool/dicttool.md.

30
31
32
33
34
35
36

37
38
39
40
41
42
43
..
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
  - [Category](#category)

  - [Copyright](#copyright)

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

package require Tcl 8\.5  


[__ladd__ *varname* *args*](#1)  
[__ldelete__ *varname* *args*](#2)  
[__dict getnull__ *args*](#3)  
[__dict print__ *dict*](#4)  
[__dict is\_dict__ *value*](#5)  
[__rmerge__ *args*](#6)  
................................................................................
  - <a name='1'></a>__ladd__ *varname* *args*

    This command will add a new instance of each element in *args* to
    *varname*, but only if that element is not already present\.

  - <a name='2'></a>__ldelete__ *varname* *args*

    This command will add a delete all instances of each element in *args*
    from *varname*\.

  - <a name='3'></a>__dict getnull__ *args*

    Operates like __dict get__, however if the key *args* does not exist,
    it returns an empty list instead of throwing an error\.

  - <a name='4'></a>__dict print__ *dict*






>







 







|
|







30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
..
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
  - [Category](#category)

  - [Copyright](#copyright)

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

package require Tcl 8\.5  
package require dicttool ?1\.0?  

[__ladd__ *varname* *args*](#1)  
[__ldelete__ *varname* *args*](#2)  
[__dict getnull__ *args*](#3)  
[__dict print__ *dict*](#4)  
[__dict is\_dict__ *value*](#5)  
[__rmerge__ *args*](#6)  
................................................................................
  - <a name='1'></a>__ladd__ *varname* *args*

    This command will add a new instance of each element in *args* to
    *varname*, but only if that element is not already present\.

  - <a name='2'></a>__ldelete__ *varname* *args*

    This command will delete all instances of each element in *args* from
    *varname*\.

  - <a name='3'></a>__dict getnull__ *args*

    Operates like __dict get__, however if the key *args* does not exist,
    it returns an empty list instead of throwing an error\.

  - <a name='4'></a>__dict print__ *dict*

Changes to idoc/man/files/modules/dicttool/dicttool.n.

272
273
274
275
276
277
278


279
280
281
282
283
284
285
...
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
..
.BS
.SH NAME
dicttool \- Dictionary Tools
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp


\fBladd\fR \fIvarname\fR \fIargs\fR
.sp
\fBldelete\fR \fIvarname\fR \fIargs\fR
.sp
\fBdict getnull\fR \fIargs\fR
.sp
\fBdict print\fR \fIdict\fR
................................................................................
just in case any of these slip into the core\&.
.TP
\fBladd\fR \fIvarname\fR \fIargs\fR
This command will add a new instance of each element in \fIargs\fR to \fIvarname\fR, but only if that element
is not already present\&.
.TP
\fBldelete\fR \fIvarname\fR \fIargs\fR
This command will add a delete all instances of each element in \fIargs\fR from \fIvarname\fR\&.
.TP
\fBdict getnull\fR \fIargs\fR
Operates like \fBdict get\fR, however if the key \fIargs\fR does not exist, it returns an empty
list instead of throwing an error\&.
.TP
\fBdict print\fR \fIdict\fR
This command will produce a string representation of \fIdict\fR, with each nested branch on






>
>







 







|







272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
...
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
..
.BS
.SH NAME
dicttool \- Dictionary Tools
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp
package require \fBdicttool  ?1\&.0?\fR
.sp
\fBladd\fR \fIvarname\fR \fIargs\fR
.sp
\fBldelete\fR \fIvarname\fR \fIargs\fR
.sp
\fBdict getnull\fR \fIargs\fR
.sp
\fBdict print\fR \fIdict\fR
................................................................................
just in case any of these slip into the core\&.
.TP
\fBladd\fR \fIvarname\fR \fIargs\fR
This command will add a new instance of each element in \fIargs\fR to \fIvarname\fR, but only if that element
is not already present\&.
.TP
\fBldelete\fR \fIvarname\fR \fIargs\fR
This command will delete all instances of each element in \fIargs\fR from \fIvarname\fR\&.
.TP
\fBdict getnull\fR \fIargs\fR
Operates like \fBdict get\fR, however if the key \fIargs\fR does not exist, it returns an empty
list instead of throwing an error\&.
.TP
\fBdict print\fR \fIdict\fR
This command will produce a string representation of \fIdict\fR, with each nested branch on

Changes to idoc/www/tcllib/files/modules/dicttool/dicttool.html.

122
123
124
125
126
127
128

129
130
131
132
133
134
135
...
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>

</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">ladd</b> <i class="arg">varname</i> <i class="arg">args</i></a></li>
<li><a href="#2"><b class="cmd">ldelete</b> <i class="arg">varname</i> <i class="arg">args</i></a></li>
<li><a href="#3"><b class="cmd">dict getnull</b> <i class="arg">args</i></a></li>
<li><a href="#4"><b class="cmd">dict print</b> <i class="arg">dict</i></a></li>
<li><a href="#5"><b class="cmd">dict is_dict</b> <i class="arg">value</i></a></li>
................................................................................
Each command checks to see if a command already exists of the same name before adding itself,
just in case any of these slip into the core.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">ladd</b> <i class="arg">varname</i> <i class="arg">args</i></a></dt>
<dd><p>This command will add a new instance of each element in <i class="arg">args</i> to <i class="arg">varname</i>, but only if that element
is not already present.</p></dd>
<dt><a name="2"><b class="cmd">ldelete</b> <i class="arg">varname</i> <i class="arg">args</i></a></dt>
<dd><p>This command will add a delete all instances of each element in <i class="arg">args</i> from <i class="arg">varname</i>.</p></dd>
<dt><a name="3"><b class="cmd">dict getnull</b> <i class="arg">args</i></a></dt>
<dd><p>Operates like <b class="cmd">dict get</b>, however if the key <i class="arg">args</i> does not exist, it returns an empty
list instead of throwing an error.</p></dd>
<dt><a name="4"><b class="cmd">dict print</b> <i class="arg">dict</i></a></dt>
<dd><p>This command will produce a string representation of <i class="arg">dict</i>, with each nested branch on
a newline, and indented with two spaces for every level.</p></dd>
<dt><a name="5"><b class="cmd">dict is_dict</b> <i class="arg">value</i></a></dt>






>







 







|







122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
...
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">dicttool <span class="opt">?1.0?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">ladd</b> <i class="arg">varname</i> <i class="arg">args</i></a></li>
<li><a href="#2"><b class="cmd">ldelete</b> <i class="arg">varname</i> <i class="arg">args</i></a></li>
<li><a href="#3"><b class="cmd">dict getnull</b> <i class="arg">args</i></a></li>
<li><a href="#4"><b class="cmd">dict print</b> <i class="arg">dict</i></a></li>
<li><a href="#5"><b class="cmd">dict is_dict</b> <i class="arg">value</i></a></li>
................................................................................
Each command checks to see if a command already exists of the same name before adding itself,
just in case any of these slip into the core.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">ladd</b> <i class="arg">varname</i> <i class="arg">args</i></a></dt>
<dd><p>This command will add a new instance of each element in <i class="arg">args</i> to <i class="arg">varname</i>, but only if that element
is not already present.</p></dd>
<dt><a name="2"><b class="cmd">ldelete</b> <i class="arg">varname</i> <i class="arg">args</i></a></dt>
<dd><p>This command will delete all instances of each element in <i class="arg">args</i> from <i class="arg">varname</i>.</p></dd>
<dt><a name="3"><b class="cmd">dict getnull</b> <i class="arg">args</i></a></dt>
<dd><p>Operates like <b class="cmd">dict get</b>, however if the key <i class="arg">args</i> does not exist, it returns an empty
list instead of throwing an error.</p></dd>
<dt><a name="4"><b class="cmd">dict print</b> <i class="arg">dict</i></a></dt>
<dd><p>This command will produce a string representation of <i class="arg">dict</i>, with each nested branch on
a newline, and indented with two spaces for every level.</p></dd>
<dt><a name="5"><b class="cmd">dict is_dict</b> <i class="arg">value</i></a></dt>

Changes to modules/dicttool/dicttool.man.


1
2
3
4
5
6
7
8

9
10
11
12
13
14
15
..
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin dicttool n 1.0]
[keywords dict]
[copyright {2017 Sean Woods <[email protected]>}]
[moddesc   {Extensions to the standard "dict" command}]
[category Utilities]
[titledesc {Dictionary Tools}]
[require Tcl 8.5]

[description]
[para]
The [package dicttool] package enhances the standard [emph dict] command with several new
commands. In addition, the package also defines several "creature comfort" list commands as well.
Each command checks to see if a command already exists of the same name before adding itself,
just in case any of these slip into the core.

................................................................................
[call [cmd ladd] [arg varname] [arg args]]

This command will add a new instance of each element in [arg args] to [arg varname], but only if that element
is not already present.

[call [cmd ldelete] [arg varname] [arg args]]

This command will add a delete all instances of each element in [arg args] from [arg varname].

[call [cmd {dict getnull}] [arg args]]

Operates like [cmd {dict get}], however if the key [arg args] does not exist, it returns an empty
list instead of throwing an error.

[call [cmd {dict print}] [arg dict]]
>

|






>







 







|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
..
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
[vset VERSION 1.0]
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin dicttool n [vset VERSION]]
[keywords dict]
[copyright {2017 Sean Woods <[email protected]>}]
[moddesc   {Extensions to the standard "dict" command}]
[category Utilities]
[titledesc {Dictionary Tools}]
[require Tcl 8.5]
[require dicttool [opt [vset VERSION]]]
[description]
[para]
The [package dicttool] package enhances the standard [emph dict] command with several new
commands. In addition, the package also defines several "creature comfort" list commands as well.
Each command checks to see if a command already exists of the same name before adding itself,
just in case any of these slip into the core.

................................................................................
[call [cmd ladd] [arg varname] [arg args]]

This command will add a new instance of each element in [arg args] to [arg varname], but only if that element
is not already present.

[call [cmd ldelete] [arg varname] [arg args]]

This command will delete all instances of each element in [arg args] from [arg varname].

[call [cmd {dict getnull}] [arg args]]

Operates like [cmd {dict get}], however if the key [arg args] does not exist, it returns an empty
list instead of throwing an error.

[call [cmd {dict print}] [arg dict]]

Changes to modules/dicttool/dicttool.md.

9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#### ladd *varname* *args*

This command will add a new instance of each element in *args* to *varname*,
but only if that element is not already present.

#### ldelete] *varname* *args*

This command will add a delete all instances of each element in *args* from *varname*.

#### dict getnull *args*

Operates like **dict get**, however if the key *args* does not exist, it returns an empty
list instead of throwing an error.

#### dict print *dict*






|







9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#### ladd *varname* *args*

This command will add a new instance of each element in *args* to *varname*,
but only if that element is not already present.

#### ldelete] *varname* *args*

This command will delete all instances of each element in *args* from *varname*.

#### dict getnull *args*

Operates like **dict get**, however if the key *args* does not exist, it returns an empty
list instead of throwing an error.

#### dict print *dict*