Tcl Library Source Code

Changes On Branch pt-examples
Login

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

Changes In Branch pt-examples Excluding Merge-Ins

This is equivalent to a diff from af55e30def to 9782ee1566

2014-07-23
18:30
Merged accumulated trunk changes. Leaf check-in: 9782ee1566 user: andreask tags: pt-examples
18:26
Added a markdown syntax gotten from various places. Untested. Likely needs tuning of symbol modes (void, leaf) to generate a nice AST. This is a grammar which is in strong need of lots of comments and explanations to understand what is going on inside. There are predicates all over the place making it quite context-sensitive. The main specification at http://daringfireball.net/projects/markdown/syntax is unfortunately quite informal, i.e. only text. check-in: 0bb9e06e3b user: andreask tags: pt-examples
2014-07-21
20:57
Ticket [c4b8162da5] :: inifile - Extended 'open' to allow specification of an -encoding. Extended testsuite. Version bumped to 0.3. Added -errorcode information to all places throwing errors. check-in: 1a2e9c5b7b user: andreask tags: trunk
18:57
Merged work on the parsetools into trunk. Very extended testsuite, and lots of bugfixes, especially in the area of error handling. Also fixes in the C runtime and generated code where long/void* size mismatches caused crashing. check-in: 598ddec2b2 user: andreask tags: trunk
2014-06-28
21:41
Bring examples up to date with latest parser fixes and changes. check-in: 75d8a9a9c7 user: aku tags: pt-examples
21:18
pt::parse::peg (C) - Updated with the fixes to the C generator. Updated all testsuite results with the same fixes. Closed-Leaf check-in: af55e30def user: aku tags: pt-work
21:17
pt::rdengine (C) - Fixed the generation of error messages by the dynamic C runtime, i.e. made it generate proper lists. check-in: 5eca9d6009 user: aku tags: pt-work

Changes to embedded/man/files/modules/amazon-s3/xsxp.n.

376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
is like %PCDATA, but returns an empty string if
no PCDATA is found\&.
.RE
.sp
For example, to fetch the first bold text from the fifth paragraph of the body of your HTML file,
.CS

xsxp::fetch $pxml {html body p#4 b} %PCDATA
.CE
.sp
.TP
\fBxsxp::fetchall\fR \fIpxml_list\fR \fIpath\fR ?\fIpart\fR?
This iterates over each PXML in \fIpxml_list\fR (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\&.







|







376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
is like %PCDATA, but returns an empty string if
no PCDATA is found\&.
.RE
.sp
For example, to fetch the first bold text from the fifth paragraph of the body of your HTML file,
.CS

xsxp::fetch $pxml {body p#4 b} %PCDATA
.CE
.sp
.TP
\fBxsxp::fetchall\fR \fIpxml_list\fR \fIpath\fR ?\fIpart\fR?
This iterates over each PXML in \fIpxml_list\fR (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\&.

Changes to embedded/man/files/modules/crc/crc32.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'crc32\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2002, Pat Thoyts
'\"
.TH "crc32" n 1\&.3 tcllib "Cyclic Redundancy Checks"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,




|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'crc32\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2002, Pat Thoyts
'\"
.TH "crc32" n 1\&.3\&.2 tcllib "Cyclic Redundancy Checks"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
crc32 \- Perform a 32bit Cyclic Redundancy Check
.SH SYNOPSIS
package require \fBTcl  8\&.2\fR
.sp
package require \fBcrc32  ?1\&.3?\fR
.sp
\fB::crc::crc32\fR ?-format \fIformat\fR? ?-seed \fIvalue\fR? [ \fI-channel chan\fR | \fI-filename file\fR | \fImessage\fR ]
.sp
\fB::crc::Crc32Init\fR ?\fIseed\fR?
.sp
\fB::crc::Crc32Update\fR \fItoken\fR \fIdata\fR
.sp







|







272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
crc32 \- Perform a 32bit Cyclic Redundancy Check
.SH SYNOPSIS
package require \fBTcl  8\&.2\fR
.sp
package require \fBcrc32  ?1\&.3\&.2?\fR
.sp
\fB::crc::crc32\fR ?-format \fIformat\fR? ?-seed \fIvalue\fR? [ \fI-channel chan\fR | \fI-filename file\fR | \fImessage\fR ]
.sp
\fB::crc::Crc32Init\fR ?\fIseed\fR?
.sp
\fB::crc::Crc32Update\fR \fItoken\fR \fIdata\fR
.sp

Changes to embedded/man/files/modules/doctools/docidx.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'docidx\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2003-2010 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "doctools::idx" n 1\&.0\&.4 tcllib "Documentation tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,


|

|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'docidx\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2003-2014 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "doctools::idx" n 1\&.0\&.5 tcllib "Documentation tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
doctools::idx \- docidx - Processing indices
.SH SYNOPSIS
package require \fBTcl  8\&.2\fR
.sp
package require \fBdoctools::idx  ?1\&.0\&.4?\fR
.sp
\fB::doctools::idx::new\fR \fIobjectName\fR ?\fB-option\fR \fIvalue\fR \&.\&.\&.?
.sp
\fB::doctools::idx::help\fR
.sp
\fB::doctools::idx::search\fR \fIpath\fR
.sp







|







272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
doctools::idx \- docidx - Processing indices
.SH SYNOPSIS
package require \fBTcl  8\&.2\fR
.sp
package require \fBdoctools::idx  ?1\&.0\&.5?\fR
.sp
\fB::doctools::idx::new\fR \fIobjectName\fR ?\fB-option\fR \fIvalue\fR \&.\&.\&.?
.sp
\fB::doctools::idx::help\fR
.sp
\fB::doctools::idx::search\fR \fIpath\fR
.sp
589
590
591
592
593
594
595
596
597
598
docidx_intro, docidx_lang_cmdref, docidx_lang_intro, docidx_lang_syntax, docidx_plugin_apiref
.SH KEYWORDS
HTML, TMML, conversion, docidx, documentation, index, keyword index, latex, manpage, markup, nroff, wiki
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2003-2010 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







|


589
590
591
592
593
594
595
596
597
598
docidx_intro, docidx_lang_cmdref, docidx_lang_intro, docidx_lang_syntax, docidx_plugin_apiref
.SH KEYWORDS
HTML, TMML, conversion, docidx, documentation, index, keyword index, latex, manpage, markup, nroff, wiki
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2003-2014 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to embedded/man/files/modules/doctools/doctoc.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'doctoc\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2003-2010 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "doctools::toc" n 1\&.1\&.3 tcllib "Documentation tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,


|

|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'doctoc\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2003-2014 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "doctools::toc" n 1\&.1\&.4 tcllib "Documentation tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
doctools::toc \- doctoc - Processing tables of contents
.SH SYNOPSIS
package require \fBTcl  8\&.2\fR
.sp
package require \fBdoctools::toc  ?1\&.1\&.3?\fR
.sp
\fB::doctools::toc::new\fR \fIobjectName\fR ?\fB-option\fR \fIvalue\fR \&.\&.\&.?
.sp
\fB::doctools::toc::help\fR
.sp
\fB::doctools::toc::search\fR \fIpath\fR
.sp







|







272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
doctools::toc \- doctoc - Processing tables of contents
.SH SYNOPSIS
package require \fBTcl  8\&.2\fR
.sp
package require \fBdoctools::toc  ?1\&.1\&.4?\fR
.sp
\fB::doctools::toc::new\fR \fIobjectName\fR ?\fB-option\fR \fIvalue\fR \&.\&.\&.?
.sp
\fB::doctools::toc::help\fR
.sp
\fB::doctools::toc::search\fR \fIpath\fR
.sp
589
590
591
592
593
594
595
596
597
598
doctoc_intro, doctoc_lang_cmdref, doctoc_lang_intro, doctoc_lang_syntax, doctoc_plugin_apiref
.SH KEYWORDS
HTML, TMML, conversion, doctoc, documentation, latex, manpage, markup, nroff, table of contents, toc, wiki
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2003-2010 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







|


589
590
591
592
593
594
595
596
597
598
doctoc_intro, doctoc_lang_cmdref, doctoc_lang_intro, doctoc_lang_syntax, doctoc_plugin_apiref
.SH KEYWORDS
HTML, TMML, conversion, doctoc, documentation, latex, manpage, markup, nroff, table of contents, toc, wiki
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2003-2014 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to embedded/man/files/modules/doctools/doctools.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'doctools\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2003-2014 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "doctools" n 1\&.4\&.18 tcllib "Documentation tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,




|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'doctools\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2003-2014 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "doctools" n 1\&.4\&.19 tcllib "Documentation tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
doctools \- doctools - Processing documents
.SH SYNOPSIS
package require \fBTcl  8\&.2\fR
.sp
package require \fBdoctools  ?1\&.4\&.18?\fR
.sp
\fB::doctools::new\fR \fIobjectName\fR ?\fIoption value\fR\&.\&.\&.?
.sp
\fB::doctools::help\fR
.sp
\fB::doctools::search\fR \fIpath\fR
.sp







|







272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
doctools \- doctools - Processing documents
.SH SYNOPSIS
package require \fBTcl  8\&.2\fR
.sp
package require \fBdoctools  ?1\&.4\&.19?\fR
.sp
\fB::doctools::new\fR \fIobjectName\fR ?\fIoption value\fR\&.\&.\&.?
.sp
\fB::doctools::help\fR
.sp
\fB::doctools::search\fR \fIpath\fR
.sp

Changes to embedded/man/files/modules/json/json.n.

1
2
3
4
5
6
7
8
9
10
11
12
13
'\"
'\" Generated from file 'json\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2006 ActiveState Software Inc\&.
'\" Copyright (c) 2009 Thomas Maeder, Glue Software Engineering AG
'\"
.TH "json" n 1\&.3 tcllib "JSON"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,





|







1
2
3
4
5
6
7
8
9
10
11
12
13
'\"
'\" Generated from file 'json\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2006 ActiveState Software Inc\&.
'\" Copyright (c) 2009 Thomas Maeder, Glue Software Engineering AG
'\"
.TH "json" n 1\&.3\&.3 tcllib "JSON"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
..
.BS
.SH NAME
json \- JSON parser
.SH SYNOPSIS
package require \fBTcl  8\&.4\fR
.sp
package require \fBjson  ?1\&.3?\fR
.sp
\fB::json::json2dict\fR \fItxt\fR
.sp
\fB::json::many-json2dict\fR \fItxt\fR ?\fImax\fR?
.sp
.BE
.SH DESCRIPTION







|







273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
..
.BS
.SH NAME
json \- JSON parser
.SH SYNOPSIS
package require \fBTcl  8\&.4\fR
.sp
package require \fBjson  ?1\&.3\&.3?\fR
.sp
\fB::json::json2dict\fR \fItxt\fR
.sp
\fB::json::many-json2dict\fR \fItxt\fR ?\fImax\fR?
.sp
.BE
.SH DESCRIPTION

Changes to embedded/man/files/modules/md4/md4.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'md4\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2003, Pat Thoyts <patthoyts@users\&.sourceforge\&.net>
'\"
.TH "md4" n 1\&.0\&.5 tcllib "MD4 Message-Digest Algorithm"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,




|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'md4\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2003, Pat Thoyts <patthoyts@users\&.sourceforge\&.net>
'\"
.TH "md4" n 1\&.0\&.6 tcllib "MD4 Message-Digest Algorithm"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
md4 \- MD4 Message-Digest Algorithm
.SH SYNOPSIS
package require \fBTcl  8\&.2\fR
.sp
package require \fBmd4  ?1\&.0?\fR
.sp
\fB::md4::md4\fR ?\fI-hex\fR? [ \fI-channel channel\fR | \fI-file filename\fR | \fIstring\fR ]
.sp
\fB::md4::hmac\fR ?\fI-hex\fR? \fI-key key\fR [ \fI-channel channel\fR | \fI-file filename\fR | \fIstring\fR ]
.sp
\fB::md4::MD4Init\fR
.sp







|







272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
md4 \- MD4 Message-Digest Algorithm
.SH SYNOPSIS
package require \fBTcl  8\&.2\fR
.sp
package require \fBmd4  ?1\&.0\&.6?\fR
.sp
\fB::md4::md4\fR ?\fI-hex\fR? [ \fI-channel channel\fR | \fI-file filename\fR | \fIstring\fR ]
.sp
\fB::md4::hmac\fR ?\fI-hex\fR? \fI-key key\fR [ \fI-channel channel\fR | \fI-file filename\fR | \fIstring\fR ]
.sp
\fB::md4::MD4Init\fR
.sp

Changes to embedded/man/files/modules/ncgi/ncgi.n.

1
2
3
4
5
6
7
8
9
10
11
'\"
'\" Generated from file 'ncgi\&.man' by tcllib/doctools with format 'nroff'
'\"
.TH "ncgi" n 1\&.4\&.2 tcllib "CGI Support"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,



|







1
2
3
4
5
6
7
8
9
10
11
'\"
'\" Generated from file 'ncgi\&.man' by tcllib/doctools with format 'nroff'
'\"
.TH "ncgi" n 1\&.4\&.3 tcllib "CGI Support"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
..
.BS
.SH NAME
ncgi \- Procedures to manipulate CGI values\&.
.SH SYNOPSIS
package require \fBTcl  8\&.4\fR
.sp
package require \fBncgi  ?1\&.4\&.2?\fR
.sp
\fB::ncgi::cookie\fR \fIcookie\fR
.sp
\fB::ncgi::decode\fR \fIstr\fR
.sp
\fB::ncgi::empty\fR \fIname\fR
.sp







|







271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
..
.BS
.SH NAME
ncgi \- Procedures to manipulate CGI values\&.
.SH SYNOPSIS
package require \fBTcl  8\&.4\fR
.sp
package require \fBncgi  ?1\&.4\&.3?\fR
.sp
\fB::ncgi::cookie\fR \fIcookie\fR
.sp
\fB::ncgi::decode\fR \fIstr\fR
.sp
\fB::ncgi::empty\fR \fIname\fR
.sp

Changes to embedded/man/files/modules/ripemd/ripemd128.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'ripemd128\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2004, Pat Thoyts <patthoyts@users\&.sourceforge\&.net>
'\"
.TH "ripemd128" n 1\&.0\&.3 tcllib "RIPEMD Message-Digest Algorithm"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,




|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'ripemd128\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2004, Pat Thoyts <patthoyts@users\&.sourceforge\&.net>
'\"
.TH "ripemd128" n 1\&.0\&.5 tcllib "RIPEMD Message-Digest Algorithm"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
ripemd128 \- RIPEMD-128 Message-Digest Algorithm
.SH SYNOPSIS
package require \fBTcl  8\&.2\fR
.sp
package require \fBripemd128  ?1\&.0\&.3?\fR
.sp
\fB::ripemd::ripemd128\fR ?\fI-hex\fR? [ \fI-channel channel\fR | \fI-file filename\fR | \fIstring\fR ]
.sp
\fB::ripemd::hmac128\fR ?\fI-hex\fR? \fI-key key\fR [ \fI-channel channel\fR | \fI-file filename\fR | \fIstring\fR ]
.sp
\fB::ripemd::RIPEMD128Init\fR
.sp







|







272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
ripemd128 \- RIPEMD-128 Message-Digest Algorithm
.SH SYNOPSIS
package require \fBTcl  8\&.2\fR
.sp
package require \fBripemd128  ?1\&.0\&.5?\fR
.sp
\fB::ripemd::ripemd128\fR ?\fI-hex\fR? [ \fI-channel channel\fR | \fI-file filename\fR | \fIstring\fR ]
.sp
\fB::ripemd::hmac128\fR ?\fI-hex\fR? \fI-key key\fR [ \fI-channel channel\fR | \fI-file filename\fR | \fIstring\fR ]
.sp
\fB::ripemd::RIPEMD128Init\fR
.sp

Changes to embedded/man/files/modules/ripemd/ripemd160.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'ripemd160\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2004, Pat Thoyts <patthoyts@users\&.sourceforge\&.net>
'\"
.TH "ripemd160" n 1\&.0\&.3 tcllib "RIPEMD Message-Digest Algorithm"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,




|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'ripemd160\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2004, Pat Thoyts <patthoyts@users\&.sourceforge\&.net>
'\"
.TH "ripemd160" n 1\&.0\&.5 tcllib "RIPEMD Message-Digest Algorithm"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
ripemd160 \- RIPEMD-160 Message-Digest Algorithm
.SH SYNOPSIS
package require \fBTcl  8\&.2\fR
.sp
package require \fBripemd160  ?1\&.0\&.3?\fR
.sp
\fB::ripemd::ripemd160\fR ?\fI-hex\fR? [ \fI-channel channel\fR | \fI-file filename\fR | \fIstring\fR ]
.sp
\fB::ripemd::hmac160\fR ?\fI-hex\fR? \fI-key key\fR [ \fI-channel channel\fR | \fI-file filename\fR | \fIstring\fR ]
.sp
\fB::ripemd::RIPEMD160Init\fR
.sp







|







272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
ripemd160 \- RIPEMD-160 Message-Digest Algorithm
.SH SYNOPSIS
package require \fBTcl  8\&.2\fR
.sp
package require \fBripemd160  ?1\&.0\&.5?\fR
.sp
\fB::ripemd::ripemd160\fR ?\fI-hex\fR? [ \fI-channel channel\fR | \fI-file filename\fR | \fIstring\fR ]
.sp
\fB::ripemd::hmac160\fR ?\fI-hex\fR? \fI-key key\fR [ \fI-channel channel\fR | \fI-file filename\fR | \fIstring\fR ]
.sp
\fB::ripemd::RIPEMD160Init\fR
.sp

Changes to embedded/man/files/modules/uuid/uuid.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'uuid\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2004, Pat Thoyts <patthoyts@users\&.sourceforge\&.net>
'\"
.TH "uuid" n 1\&.0\&.3 tcllib "uuid"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,




|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'uuid\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2004, Pat Thoyts <patthoyts@users\&.sourceforge\&.net>
'\"
.TH "uuid" n 1\&.0\&.4 tcllib "uuid"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
uuid \- UUID generation and comparison
.SH SYNOPSIS
package require \fBTcl  8\&.2\fR
.sp
package require \fBuuid  ?1\&.0\&.3?\fR
.sp
\fB::uuid::uuid generate\fR
.sp
\fB::uuid::uuid equal\fR \fIid1\fR \fIid2\fR
.sp
.BE
.SH DESCRIPTION







|







272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
uuid \- UUID generation and comparison
.SH SYNOPSIS
package require \fBTcl  8\&.2\fR
.sp
package require \fBuuid  ?1\&.0\&.4?\fR
.sp
\fB::uuid::uuid generate\fR
.sp
\fB::uuid::uuid equal\fR \fIid1\fR \fIid2\fR
.sp
.BE
.SH DESCRIPTION

Changes to embedded/www/tcllib/files/modules/amazon-s3/xsxp.html.

205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
is, part=%PCDATA means return the textual content found
in that node but not its children nodes.</p></dd>
<dt>%PCDATA?</dt>
<dd><p>is like %PCDATA, but returns an empty string if
no PCDATA is found.</p></dd>
</dl>
<p>For example, to fetch the first bold text from the fifth paragraph of the body of your HTML file,</p>
<pre class="example">xsxp::fetch $pxml {html body p#4 b} %PCDATA</pre>
</dd>
<dt><a name="3"><b class="cmd">xsxp::fetchall</b> <i class="arg">pxml_list</i> <i class="arg">path</i> <span class="opt">?<i class="arg">part</i>?</span></a></dt>
<dd><p>This iterates over each PXML in <i class="arg">pxml_list</i> (which must be a list
of pxmls) selecting the indicated path from it, building a new list
with the selected data, and returning that new list.</p>
<p>For example, <i class="arg">pxml_list</i> might be
the %CHILDREN of a particular element, and the <i class="arg">path</i> and <i class="arg">part</i>







|







205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
is, part=%PCDATA means return the textual content found
in that node but not its children nodes.</p></dd>
<dt>%PCDATA?</dt>
<dd><p>is like %PCDATA, but returns an empty string if
no PCDATA is found.</p></dd>
</dl>
<p>For example, to fetch the first bold text from the fifth paragraph of the body of your HTML file,</p>
<pre class="example">xsxp::fetch $pxml {body p#4 b} %PCDATA</pre>
</dd>
<dt><a name="3"><b class="cmd">xsxp::fetchall</b> <i class="arg">pxml_list</i> <i class="arg">path</i> <span class="opt">?<i class="arg">part</i>?</span></a></dt>
<dd><p>This iterates over each PXML in <i class="arg">pxml_list</i> (which must be a list
of pxmls) selecting the indicated path from it, building a new list
with the selected data, and returning that new list.</p>
<p>For example, <i class="arg">pxml_list</i> might be
the %CHILDREN of a particular element, and the <i class="arg">path</i> and <i class="arg">part</i>

Changes to embedded/www/tcllib/files/modules/crc/crc32.html.


1
2
3
4
5
6
7

<html><head>
<title>crc32 - Cyclic Redundancy Checks</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
>







1
2
3
4
5
6
7
8

<html><head>
<title>crc32 - Cyclic Redundancy Checks</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<h1 class="title">crc32(n) 1.3 tcllib &quot;Cyclic Redundancy Checks&quot;</h1>
<div id="name" class="section"><h2><a name="name">Name</a></h2>
<p>crc32 - Perform a 32bit Cyclic Redundancy Check</p>
</div>
<div id="toc" class="section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="toc">
<li class="section"><a href="#toc">Table Of Contents</a></li>
<li class="section"><a href="#synopsis">Synopsis</a></li>







|







104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<h1 class="title">crc32(n) 1.3.2 tcllib &quot;Cyclic Redundancy Checks&quot;</h1>
<div id="name" class="section"><h2><a name="name">Name</a></h2>
<p>crc32 - Perform a 32bit Cyclic Redundancy Check</p>
</div>
<div id="toc" class="section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="toc">
<li class="section"><a href="#toc">Table Of Contents</a></li>
<li class="section"><a href="#synopsis">Synopsis</a></li>
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<li class="section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="synopsis">
<ul class="requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">crc32 <span class="opt">?1.3?</span></b></li>
</ul>
<ul class="syntax">
<li><a href="#1"><b class="cmd">::crc::crc32</b> <span class="opt">?-format <i class="arg">format</i>?</span> <span class="opt">?-seed <i class="arg">value</i>?</span> [ <i class="arg">-channel chan</i> | <i class="arg">-filename file</i> | <i class="arg">message</i> ]</a></li>
<li><a href="#2"><b class="cmd">::crc::Crc32Init</b> <span class="opt">?<i class="arg">seed</i>?</span></a></li>
<li><a href="#3"><b class="cmd">::crc::Crc32Update</b> <i class="arg">token</i> <i class="arg">data</i></a></li>
<li><a href="#4"><b class="cmd">::crc::Crc32Final</b> <i class="arg">token</i></a></li>
</ul>







|







129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<li class="section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="synopsis">
<ul class="requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">crc32 <span class="opt">?1.3.2?</span></b></li>
</ul>
<ul class="syntax">
<li><a href="#1"><b class="cmd">::crc::crc32</b> <span class="opt">?-format <i class="arg">format</i>?</span> <span class="opt">?-seed <i class="arg">value</i>?</span> [ <i class="arg">-channel chan</i> | <i class="arg">-filename file</i> | <i class="arg">message</i> ]</a></li>
<li><a href="#2"><b class="cmd">::crc::Crc32Init</b> <span class="opt">?<i class="arg">seed</i>?</span></a></li>
<li><a href="#3"><b class="cmd">::crc::Crc32Update</b> <i class="arg">token</i> <i class="arg">data</i></a></li>
<li><a href="#4"><b class="cmd">::crc::Crc32Final</b> <i class="arg">token</i></a></li>
</ul>

Changes to embedded/www/tcllib/files/modules/doctools/docidx.html.

90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'docidx.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2003-2010 Andreas Kupries &lt;[email protected]&gt;
   -->
<! -- CVS: $Id$ doctools::idx.n
   -->
<body><div class="doctools">
<hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<h1 class="title">doctools::idx(n) 1.0.4 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="section"><h2><a name="name">Name</a></h2>
<p>doctools::idx - docidx - Processing indices</p>
</div>
<div id="toc" class="section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="toc">
<li class="section"><a href="#toc">Table Of Contents</a></li>
<li class="section"><a href="#synopsis">Synopsis</a></li>







|













|







90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'docidx.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2003-2014 Andreas Kupries &lt;[email protected]&gt;
   -->
<! -- CVS: $Id$ doctools::idx.n
   -->
<body><div class="doctools">
<hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<h1 class="title">doctools::idx(n) 1.0.5 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="section"><h2><a name="name">Name</a></h2>
<p>doctools::idx - docidx - Processing indices</p>
</div>
<div id="toc" class="section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="toc">
<li class="section"><a href="#toc">Table Of Contents</a></li>
<li class="section"><a href="#synopsis">Synopsis</a></li>
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<li class="section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="synopsis">
<ul class="requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">doctools::idx <span class="opt">?1.0.4?</span></b></li>
</ul>
<ul class="syntax">
<li><a href="#1"><b class="cmd">::doctools::idx::new</b> <i class="arg">objectName</i> <span class="opt">?<b class="option">-option</b> <i class="arg">value</i> ...?</span></a></li>
<li><a href="#2"><b class="cmd">::doctools::idx::help</b></a></li>
<li><a href="#3"><b class="cmd">::doctools::idx::search</b> <i class="arg">path</i></a></li>
<li><a href="#4"><b class="cmd">objectName</b> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#5"><i class="arg">objectName</i> <b class="method">configure</b></a></li>







|







134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<li class="section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="synopsis">
<ul class="requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">doctools::idx <span class="opt">?1.0.5?</span></b></li>
</ul>
<ul class="syntax">
<li><a href="#1"><b class="cmd">::doctools::idx::new</b> <i class="arg">objectName</i> <span class="opt">?<b class="option">-option</b> <i class="arg">value</i> ...?</span></a></li>
<li><a href="#2"><b class="cmd">::doctools::idx::help</b></a></li>
<li><a href="#3"><b class="cmd">::doctools::idx::search</b> <i class="arg">path</i></a></li>
<li><a href="#4"><b class="cmd">objectName</b> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#5"><i class="arg">objectName</i> <b class="method">configure</b></a></li>
407
408
409
410
411
412
413
414
415
416
<div id="keywords" class="section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key18">HTML</a>, <a href="../../../../index.html#key19">TMML</a>, <a href="../../../../index.html#key20">conversion</a>, <a href="../../../../index.html#key178">docidx</a>, <a href="../../../../index.html#key185">documentation</a>, <a href="../../../../index.html#key182">index</a>, <a href="../../../../index.html#key184">keyword index</a>, <a href="../../../../index.html#key186">latex</a>, <a href="../../../../index.html#key17">manpage</a>, <a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key21">nroff</a>, <a href="../../../../index.html#key183">wiki</a></p>
</div>
<div id="category" class="section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2003-2010 Andreas Kupries &lt;[email protected]&gt;</p>
</div>
</div></body></html>







|


407
408
409
410
411
412
413
414
415
416
<div id="keywords" class="section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key18">HTML</a>, <a href="../../../../index.html#key19">TMML</a>, <a href="../../../../index.html#key20">conversion</a>, <a href="../../../../index.html#key178">docidx</a>, <a href="../../../../index.html#key185">documentation</a>, <a href="../../../../index.html#key182">index</a>, <a href="../../../../index.html#key184">keyword index</a>, <a href="../../../../index.html#key186">latex</a>, <a href="../../../../index.html#key17">manpage</a>, <a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key21">nroff</a>, <a href="../../../../index.html#key183">wiki</a></p>
</div>
<div id="category" class="section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2003-2014 Andreas Kupries &lt;[email protected]&gt;</p>
</div>
</div></body></html>

Changes to embedded/www/tcllib/files/modules/doctools/doctoc.html.

90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'doctoc.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2003-2010 Andreas Kupries &lt;[email protected]&gt;
   -->
<! -- CVS: $Id$ doctools::toc.n
   -->
<body><div class="doctools">
<hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<h1 class="title">doctools::toc(n) 1.1.3 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="section"><h2><a name="name">Name</a></h2>
<p>doctools::toc - doctoc - Processing tables of contents</p>
</div>
<div id="toc" class="section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="toc">
<li class="section"><a href="#toc">Table Of Contents</a></li>
<li class="section"><a href="#synopsis">Synopsis</a></li>







|













|







90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'doctoc.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2003-2014 Andreas Kupries &lt;[email protected]&gt;
   -->
<! -- CVS: $Id$ doctools::toc.n
   -->
<body><div class="doctools">
<hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<h1 class="title">doctools::toc(n) 1.1.4 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="section"><h2><a name="name">Name</a></h2>
<p>doctools::toc - doctoc - Processing tables of contents</p>
</div>
<div id="toc" class="section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="toc">
<li class="section"><a href="#toc">Table Of Contents</a></li>
<li class="section"><a href="#synopsis">Synopsis</a></li>
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<li class="section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="synopsis">
<ul class="requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">doctools::toc <span class="opt">?1.1.3?</span></b></li>
</ul>
<ul class="syntax">
<li><a href="#1"><b class="cmd">::doctools::toc::new</b> <i class="arg">objectName</i> <span class="opt">?<b class="option">-option</b> <i class="arg">value</i> ...?</span></a></li>
<li><a href="#2"><b class="cmd">::doctools::toc::help</b></a></li>
<li><a href="#3"><b class="cmd">::doctools::toc::search</b> <i class="arg">path</i></a></li>
<li><a href="#4"><b class="cmd">objectName</b> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#5"><i class="arg">objectName</i> <b class="method">configure</b></a></li>







|







134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<li class="section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="synopsis">
<ul class="requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">doctools::toc <span class="opt">?1.1.4?</span></b></li>
</ul>
<ul class="syntax">
<li><a href="#1"><b class="cmd">::doctools::toc::new</b> <i class="arg">objectName</i> <span class="opt">?<b class="option">-option</b> <i class="arg">value</i> ...?</span></a></li>
<li><a href="#2"><b class="cmd">::doctools::toc::help</b></a></li>
<li><a href="#3"><b class="cmd">::doctools::toc::search</b> <i class="arg">path</i></a></li>
<li><a href="#4"><b class="cmd">objectName</b> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#5"><i class="arg">objectName</i> <b class="method">configure</b></a></li>
407
408
409
410
411
412
413
414
415
416
<div id="keywords" class="section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key18">HTML</a>, <a href="../../../../index.html#key19">TMML</a>, <a href="../../../../index.html#key20">conversion</a>, <a href="../../../../index.html#key254">doctoc</a>, <a href="../../../../index.html#key185">documentation</a>, <a href="../../../../index.html#key186">latex</a>, <a href="../../../../index.html#key17">manpage</a>, <a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key21">nroff</a>, <a href="../../../../index.html#key157">table of contents</a>, <a href="../../../../index.html#key156">toc</a>, <a href="../../../../index.html#key183">wiki</a></p>
</div>
<div id="category" class="section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2003-2010 Andreas Kupries &lt;[email protected]&gt;</p>
</div>
</div></body></html>







|


407
408
409
410
411
412
413
414
415
416
<div id="keywords" class="section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key18">HTML</a>, <a href="../../../../index.html#key19">TMML</a>, <a href="../../../../index.html#key20">conversion</a>, <a href="../../../../index.html#key254">doctoc</a>, <a href="../../../../index.html#key185">documentation</a>, <a href="../../../../index.html#key186">latex</a>, <a href="../../../../index.html#key17">manpage</a>, <a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key21">nroff</a>, <a href="../../../../index.html#key157">table of contents</a>, <a href="../../../../index.html#key156">toc</a>, <a href="../../../../index.html#key183">wiki</a></p>
</div>
<div id="category" class="section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2003-2014 Andreas Kupries &lt;[email protected]&gt;</p>
</div>
</div></body></html>

Changes to embedded/www/tcllib/files/modules/doctools/doctools.html.

104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<h1 class="title">doctools(n) 1.4.18 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="section"><h2><a name="name">Name</a></h2>
<p>doctools - doctools - Processing documents</p>
</div>
<div id="toc" class="section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="toc">
<li class="section"><a href="#toc">Table Of Contents</a></li>
<li class="section"><a href="#synopsis">Synopsis</a></li>







|







104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<h1 class="title">doctools(n) 1.4.19 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="section"><h2><a name="name">Name</a></h2>
<p>doctools - doctools - Processing documents</p>
</div>
<div id="toc" class="section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="toc">
<li class="section"><a href="#toc">Table Of Contents</a></li>
<li class="section"><a href="#synopsis">Synopsis</a></li>
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<li class="section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="synopsis">
<ul class="requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">doctools <span class="opt">?1.4.18?</span></b></li>
</ul>
<ul class="syntax">
<li><a href="#1"><b class="cmd">::doctools::new</b> <i class="arg">objectName</i> <span class="opt">?<i class="arg">option value</i>...?</span></a></li>
<li><a href="#2"><b class="cmd">::doctools::help</b></a></li>
<li><a href="#3"><b class="cmd">::doctools::search</b> <i class="arg">path</i></a></li>
<li><a href="#4"><b class="cmd">objectName</b> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#5"><i class="arg">objectName</i> <b class="method">configure</b></a></li>







|







134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<li class="section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="synopsis">
<ul class="requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">doctools <span class="opt">?1.4.19?</span></b></li>
</ul>
<ul class="syntax">
<li><a href="#1"><b class="cmd">::doctools::new</b> <i class="arg">objectName</i> <span class="opt">?<i class="arg">option value</i>...?</span></a></li>
<li><a href="#2"><b class="cmd">::doctools::help</b></a></li>
<li><a href="#3"><b class="cmd">::doctools::search</b> <i class="arg">path</i></a></li>
<li><a href="#4"><b class="cmd">objectName</b> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#5"><i class="arg">objectName</i> <b class="method">configure</b></a></li>

Changes to embedded/www/tcllib/files/modules/json/json.html.

104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<h1 class="title">json(n) 1.3 tcllib &quot;JSON&quot;</h1>
<div id="name" class="section"><h2><a name="name">Name</a></h2>
<p>json - JSON parser</p>
</div>
<div id="toc" class="section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="toc">
<li class="section"><a href="#toc">Table Of Contents</a></li>
<li class="section"><a href="#synopsis">Synopsis</a></li>
<li class="section"><a href="#section1">Description</a></li>
<li class="section"><a href="#section2">COMMANDS</a></li>
<li class="section"><a href="#section3">EXAMPLES</a></li>
<li class="section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="section"><a href="#keywords">Keywords</a></li>
<li class="section"><a href="#category">Category</a></li>
<li class="section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="synopsis">
<ul class="requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">json <span class="opt">?1.3?</span></b></li>
</ul>
<ul class="syntax">
<li><a href="#1"><b class="cmd">::json::json2dict</b> <i class="arg">txt</i></a></li>
<li><a href="#2"><b class="cmd">::json::many-json2dict</b> <i class="arg">txt</i> <span class="opt">?<i class="arg">max</i>?</span></a></li>
</ul>
</div>
</div>







|




















|







104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<h1 class="title">json(n) 1.3.3 tcllib &quot;JSON&quot;</h1>
<div id="name" class="section"><h2><a name="name">Name</a></h2>
<p>json - JSON parser</p>
</div>
<div id="toc" class="section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="toc">
<li class="section"><a href="#toc">Table Of Contents</a></li>
<li class="section"><a href="#synopsis">Synopsis</a></li>
<li class="section"><a href="#section1">Description</a></li>
<li class="section"><a href="#section2">COMMANDS</a></li>
<li class="section"><a href="#section3">EXAMPLES</a></li>
<li class="section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="section"><a href="#keywords">Keywords</a></li>
<li class="section"><a href="#category">Category</a></li>
<li class="section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="synopsis">
<ul class="requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">json <span class="opt">?1.3.3?</span></b></li>
</ul>
<ul class="syntax">
<li><a href="#1"><b class="cmd">::json::json2dict</b> <i class="arg">txt</i></a></li>
<li><a href="#2"><b class="cmd">::json::many-json2dict</b> <i class="arg">txt</i> <span class="opt">?<i class="arg">max</i>?</span></a></li>
</ul>
</div>
</div>

Changes to embedded/www/tcllib/files/modules/md4/md4.html.


1
2
3
4
5
6
7

<html><head>
<title>md4 - MD4 Message-Digest Algorithm</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
>







1
2
3
4
5
6
7
8

<html><head>
<title>md4 - MD4 Message-Digest Algorithm</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<h1 class="title">md4(n) 1.0.5 tcllib &quot;MD4 Message-Digest Algorithm&quot;</h1>
<div id="name" class="section"><h2><a name="name">Name</a></h2>
<p>md4 - MD4 Message-Digest Algorithm</p>
</div>
<div id="toc" class="section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="toc">
<li class="section"><a href="#toc">Table Of Contents</a></li>
<li class="section"><a href="#synopsis">Synopsis</a></li>







|







104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<h1 class="title">md4(n) 1.0.6 tcllib &quot;MD4 Message-Digest Algorithm&quot;</h1>
<div id="name" class="section"><h2><a name="name">Name</a></h2>
<p>md4 - MD4 Message-Digest Algorithm</p>
</div>
<div id="toc" class="section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="toc">
<li class="section"><a href="#toc">Table Of Contents</a></li>
<li class="section"><a href="#synopsis">Synopsis</a></li>
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<li class="section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="synopsis">
<ul class="requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">md4 <span class="opt">?1.0?</span></b></li>
</ul>
<ul class="syntax">
<li><a href="#1"><b class="cmd">::md4::md4</b> <span class="opt">?<i class="arg">-hex</i>?</span> [ <i class="arg">-channel channel</i> | <i class="arg">-file filename</i> | <i class="arg">string</i> ]</a></li>
<li><a href="#2"><b class="cmd">::md4::hmac</b> <span class="opt">?<i class="arg">-hex</i>?</span> <i class="arg">-key key</i> [ <i class="arg">-channel channel</i> | <i class="arg">-file filename</i> | <i class="arg">string</i> ]</a></li>
<li><a href="#3"><b class="cmd">::md4::MD4Init</b></a></li>
<li><a href="#4"><b class="cmd">::md4::MD4Update</b> <i class="arg">token</i> <i class="arg">data</i></a></li>
<li><a href="#5"><b class="cmd">::md4::MD4Final</b> <i class="arg">token</i></a></li>







|







128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<li class="section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="synopsis">
<ul class="requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">md4 <span class="opt">?1.0.6?</span></b></li>
</ul>
<ul class="syntax">
<li><a href="#1"><b class="cmd">::md4::md4</b> <span class="opt">?<i class="arg">-hex</i>?</span> [ <i class="arg">-channel channel</i> | <i class="arg">-file filename</i> | <i class="arg">string</i> ]</a></li>
<li><a href="#2"><b class="cmd">::md4::hmac</b> <span class="opt">?<i class="arg">-hex</i>?</span> <i class="arg">-key key</i> [ <i class="arg">-channel channel</i> | <i class="arg">-file filename</i> | <i class="arg">string</i> ]</a></li>
<li><a href="#3"><b class="cmd">::md4::MD4Init</b></a></li>
<li><a href="#4"><b class="cmd">::md4::MD4Update</b> <i class="arg">token</i> <i class="arg">data</i></a></li>
<li><a href="#5"><b class="cmd">::md4::MD4Final</b> <i class="arg">token</i></a></li>

Changes to embedded/www/tcllib/files/modules/ncgi/ncgi.html.


1
2
3
4
5
6
7

<html><head>
<title>ncgi - CGI Support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
>







1
2
3
4
5
6
7
8

<html><head>
<title>ncgi - CGI Support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<h1 class="title">ncgi(n) 1.4.2 tcllib &quot;CGI Support&quot;</h1>
<div id="name" class="section"><h2><a name="name">Name</a></h2>
<p>ncgi - Procedures to manipulate CGI values.</p>
</div>
<div id="toc" class="section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="toc">
<li class="section"><a href="#toc">Table Of Contents</a></li>
<li class="section"><a href="#synopsis">Synopsis</a></li>
<li class="section"><a href="#section1">Description</a></li>
<li class="section"><a href="#section2">EXAMPLES</a></li>
<li class="section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="section"><a href="#see-also">See Also</a></li>
<li class="section"><a href="#keywords">Keywords</a></li>
<li class="section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="synopsis">
<ul class="requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">ncgi <span class="opt">?1.4.2?</span></b></li>
</ul>
<ul class="syntax">
<li><a href="#1"><b class="cmd">::ncgi::cookie</b> <i class="arg">cookie</i></a></li>
<li><a href="#2"><b class="cmd">::ncgi::decode</b> <i class="arg">str</i></a></li>
<li><a href="#3"><b class="cmd">::ncgi::empty</b> <i class="arg">name</i></a></li>
<li><a href="#4"><b class="cmd">::ncgi::exists</b> <i class="arg">name</i></a></li>
<li><a href="#5"><b class="cmd">::ncgi::encode</b> <i class="arg">string</i></a></li>







|



















|







102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<h1 class="title">ncgi(n) 1.4.3 tcllib &quot;CGI Support&quot;</h1>
<div id="name" class="section"><h2><a name="name">Name</a></h2>
<p>ncgi - Procedures to manipulate CGI values.</p>
</div>
<div id="toc" class="section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="toc">
<li class="section"><a href="#toc">Table Of Contents</a></li>
<li class="section"><a href="#synopsis">Synopsis</a></li>
<li class="section"><a href="#section1">Description</a></li>
<li class="section"><a href="#section2">EXAMPLES</a></li>
<li class="section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="section"><a href="#see-also">See Also</a></li>
<li class="section"><a href="#keywords">Keywords</a></li>
<li class="section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="synopsis">
<ul class="requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">ncgi <span class="opt">?1.4.3?</span></b></li>
</ul>
<ul class="syntax">
<li><a href="#1"><b class="cmd">::ncgi::cookie</b> <i class="arg">cookie</i></a></li>
<li><a href="#2"><b class="cmd">::ncgi::decode</b> <i class="arg">str</i></a></li>
<li><a href="#3"><b class="cmd">::ncgi::empty</b> <i class="arg">name</i></a></li>
<li><a href="#4"><b class="cmd">::ncgi::exists</b> <i class="arg">name</i></a></li>
<li><a href="#5"><b class="cmd">::ncgi::encode</b> <i class="arg">string</i></a></li>

Changes to embedded/www/tcllib/files/modules/ripemd/ripemd128.html.


1
2
3
4
5
6
7

<html><head>
<title>ripemd128 - RIPEMD Message-Digest Algorithm</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
>







1
2
3
4
5
6
7
8

<html><head>
<title>ripemd128 - RIPEMD Message-Digest Algorithm</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<h1 class="title">ripemd128(n) 1.0.3 tcllib &quot;RIPEMD Message-Digest Algorithm&quot;</h1>
<div id="name" class="section"><h2><a name="name">Name</a></h2>
<p>ripemd128 - RIPEMD-128 Message-Digest Algorithm</p>
</div>
<div id="toc" class="section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="toc">
<li class="section"><a href="#toc">Table Of Contents</a></li>
<li class="section"><a href="#synopsis">Synopsis</a></li>







|







104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<h1 class="title">ripemd128(n) 1.0.5 tcllib &quot;RIPEMD Message-Digest Algorithm&quot;</h1>
<div id="name" class="section"><h2><a name="name">Name</a></h2>
<p>ripemd128 - RIPEMD-128 Message-Digest Algorithm</p>
</div>
<div id="toc" class="section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="toc">
<li class="section"><a href="#toc">Table Of Contents</a></li>
<li class="section"><a href="#synopsis">Synopsis</a></li>
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<li class="section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="synopsis">
<ul class="requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">ripemd128 <span class="opt">?1.0.3?</span></b></li>
</ul>
<ul class="syntax">
<li><a href="#1"><b class="cmd">::ripemd::ripemd128</b> <span class="opt">?<i class="arg">-hex</i>?</span> [ <i class="arg">-channel channel</i> | <i class="arg">-file filename</i> | <i class="arg">string</i> ]</a></li>
<li><a href="#2"><b class="cmd">::ripemd::hmac128</b> <span class="opt">?<i class="arg">-hex</i>?</span> <i class="arg">-key key</i> [ <i class="arg">-channel channel</i> | <i class="arg">-file filename</i> | <i class="arg">string</i> ]</a></li>
<li><a href="#3"><b class="cmd">::ripemd::RIPEMD128Init</b></a></li>
<li><a href="#4"><b class="cmd">::ripemd::RIPEMD128Update</b> <i class="arg">token</i> <i class="arg">data</i></a></li>
<li><a href="#5"><b class="cmd">::ripemd::RIPEMD128Final</b> <i class="arg">token</i></a></li>







|







128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<li class="section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="synopsis">
<ul class="requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">ripemd128 <span class="opt">?1.0.5?</span></b></li>
</ul>
<ul class="syntax">
<li><a href="#1"><b class="cmd">::ripemd::ripemd128</b> <span class="opt">?<i class="arg">-hex</i>?</span> [ <i class="arg">-channel channel</i> | <i class="arg">-file filename</i> | <i class="arg">string</i> ]</a></li>
<li><a href="#2"><b class="cmd">::ripemd::hmac128</b> <span class="opt">?<i class="arg">-hex</i>?</span> <i class="arg">-key key</i> [ <i class="arg">-channel channel</i> | <i class="arg">-file filename</i> | <i class="arg">string</i> ]</a></li>
<li><a href="#3"><b class="cmd">::ripemd::RIPEMD128Init</b></a></li>
<li><a href="#4"><b class="cmd">::ripemd::RIPEMD128Update</b> <i class="arg">token</i> <i class="arg">data</i></a></li>
<li><a href="#5"><b class="cmd">::ripemd::RIPEMD128Final</b> <i class="arg">token</i></a></li>

Changes to embedded/www/tcllib/files/modules/ripemd/ripemd160.html.


1
2
3
4
5
6
7

<html><head>
<title>ripemd160 - RIPEMD Message-Digest Algorithm</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
>







1
2
3
4
5
6
7
8

<html><head>
<title>ripemd160 - RIPEMD Message-Digest Algorithm</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<h1 class="title">ripemd160(n) 1.0.3 tcllib &quot;RIPEMD Message-Digest Algorithm&quot;</h1>
<div id="name" class="section"><h2><a name="name">Name</a></h2>
<p>ripemd160 - RIPEMD-160 Message-Digest Algorithm</p>
</div>
<div id="toc" class="section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="toc">
<li class="section"><a href="#toc">Table Of Contents</a></li>
<li class="section"><a href="#synopsis">Synopsis</a></li>







|







104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<h1 class="title">ripemd160(n) 1.0.5 tcllib &quot;RIPEMD Message-Digest Algorithm&quot;</h1>
<div id="name" class="section"><h2><a name="name">Name</a></h2>
<p>ripemd160 - RIPEMD-160 Message-Digest Algorithm</p>
</div>
<div id="toc" class="section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="toc">
<li class="section"><a href="#toc">Table Of Contents</a></li>
<li class="section"><a href="#synopsis">Synopsis</a></li>
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<li class="section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="synopsis">
<ul class="requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">ripemd160 <span class="opt">?1.0.3?</span></b></li>
</ul>
<ul class="syntax">
<li><a href="#1"><b class="cmd">::ripemd::ripemd160</b> <span class="opt">?<i class="arg">-hex</i>?</span> [ <i class="arg">-channel channel</i> | <i class="arg">-file filename</i> | <i class="arg">string</i> ]</a></li>
<li><a href="#2"><b class="cmd">::ripemd::hmac160</b> <span class="opt">?<i class="arg">-hex</i>?</span> <i class="arg">-key key</i> [ <i class="arg">-channel channel</i> | <i class="arg">-file filename</i> | <i class="arg">string</i> ]</a></li>
<li><a href="#3"><b class="cmd">::ripemd::RIPEMD160Init</b></a></li>
<li><a href="#4"><b class="cmd">::ripemd::RIPEMD160Update</b> <i class="arg">token</i> <i class="arg">data</i></a></li>
<li><a href="#5"><b class="cmd">::ripemd::RIPEMD160Final</b> <i class="arg">token</i></a></li>







|







128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<li class="section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="synopsis">
<ul class="requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">ripemd160 <span class="opt">?1.0.5?</span></b></li>
</ul>
<ul class="syntax">
<li><a href="#1"><b class="cmd">::ripemd::ripemd160</b> <span class="opt">?<i class="arg">-hex</i>?</span> [ <i class="arg">-channel channel</i> | <i class="arg">-file filename</i> | <i class="arg">string</i> ]</a></li>
<li><a href="#2"><b class="cmd">::ripemd::hmac160</b> <span class="opt">?<i class="arg">-hex</i>?</span> <i class="arg">-key key</i> [ <i class="arg">-channel channel</i> | <i class="arg">-file filename</i> | <i class="arg">string</i> ]</a></li>
<li><a href="#3"><b class="cmd">::ripemd::RIPEMD160Init</b></a></li>
<li><a href="#4"><b class="cmd">::ripemd::RIPEMD160Update</b> <i class="arg">token</i> <i class="arg">data</i></a></li>
<li><a href="#5"><b class="cmd">::ripemd::RIPEMD160Final</b> <i class="arg">token</i></a></li>

Changes to embedded/www/tcllib/files/modules/uuid/uuid.html.

104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<h1 class="title">uuid(n) 1.0.3 tcllib &quot;uuid&quot;</h1>
<div id="name" class="section"><h2><a name="name">Name</a></h2>
<p>uuid - UUID generation and comparison</p>
</div>
<div id="toc" class="section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="toc">
<li class="section"><a href="#toc">Table Of Contents</a></li>
<li class="section"><a href="#synopsis">Synopsis</a></li>







|







104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<h1 class="title">uuid(n) 1.0.4 tcllib &quot;uuid&quot;</h1>
<div id="name" class="section"><h2><a name="name">Name</a></h2>
<p>uuid - UUID generation and comparison</p>
</div>
<div id="toc" class="section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="toc">
<li class="section"><a href="#toc">Table Of Contents</a></li>
<li class="section"><a href="#synopsis">Synopsis</a></li>
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<li class="section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="synopsis">
<ul class="requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">uuid <span class="opt">?1.0.3?</span></b></li>
</ul>
<ul class="syntax">
<li><a href="#1"><b class="cmd">::uuid::uuid generate</b></a></li>
<li><a href="#2"><b class="cmd">::uuid::uuid equal</b> <i class="arg">id1</i> <i class="arg">id2</i></a></li>
</ul>
</div>
</div>







|







126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<li class="section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="synopsis">
<ul class="requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">uuid <span class="opt">?1.0.4?</span></b></li>
</ul>
<ul class="syntax">
<li><a href="#1"><b class="cmd">::uuid::uuid generate</b></a></li>
<li><a href="#2"><b class="cmd">::uuid::uuid equal</b> <i class="arg">id1</i> <i class="arg">id2</i></a></li>
</ul>
</div>
</div>

Changes to modules/amazon-s3/xsxp.man.

97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
[def %PCDATA?] is like %PCDATA, but returns an empty string if
no PCDATA is found.

[list_end]

[para]
For example, to fetch the first bold text from the fifth paragraph of the body of your HTML file,
[example {xsxp::fetch $pxml {html body p#4 b} %PCDATA}]

[para]

[call [cmd xsxp::fetchall] [arg pxml_list] [arg path] [opt [arg part]]]

This iterates over each PXML in [arg pxml_list] (which must be a list
of pxmls) selecting the indicated path from it, building a new list







|







97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
[def %PCDATA?] is like %PCDATA, but returns an empty string if
no PCDATA is found.

[list_end]

[para]
For example, to fetch the first bold text from the fifth paragraph of the body of your HTML file,
[example {xsxp::fetch $pxml {body p#4 b} %PCDATA}]

[para]

[call [cmd xsxp::fetchall] [arg pxml_list] [arg path] [opt [arg part]]]

This iterates over each PXML in [arg pxml_list] (which must be a list
of pxmls) selecting the indicated path from it, building a new list

Changes to modules/base32/base32_c.tcl.

128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
	  *(at++) = map [ 0x1f &  (buf[3]>>2)                ];
	  *(at++) = map [ 0x1f &  (buf[3]<<3)                ];
	  *(at++) = '=';
	  break;
	}
      }

      Tcl_SetObjResult (interp, Tcl_NewStringObj (out, nout));
      Tcl_Free ((char*) out);
      return TCL_OK;
    }


    critcl::ccommand critcl_decode {dummy interp objc objv} {
      /* Syntax -*- c -*-







|







128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
	  *(at++) = map [ 0x1f &  (buf[3]>>2)                ];
	  *(at++) = map [ 0x1f &  (buf[3]<<3)                ];
	  *(at++) = '=';
	  break;
	}
      }

      Tcl_SetObjResult (interp, Tcl_NewStringObj ((char*)out, nout));
      Tcl_Free ((char*) out);
      return TCL_OK;
    }


    critcl::ccommand critcl_decode {dummy interp objc objv} {
      /* Syntax -*- c -*-
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
#define USAGED "estring"

      if (objc != 2) {
        Tcl_WrongNumArgs (interp, 1, objv, USAGED);
        return TCL_ERROR;
      }

      buf = Tcl_GetStringFromObj (objv[1], &nbuf);

      if (nbuf % 8) {
	Tcl_SetObjResult (interp, Tcl_NewStringObj ("Length is not a multiple of 8", -1));
        return TCL_ERROR;
      }

      nout = (nbuf/8)*5 *TCL_UTF_MAX;







|







173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
#define USAGED "estring"

      if (objc != 2) {
        Tcl_WrongNumArgs (interp, 1, objv, USAGED);
        return TCL_ERROR;
      }

      buf = (unsigned char*) Tcl_GetStringFromObj (objv[1], &nbuf);

      if (nbuf % 8) {
	Tcl_SetObjResult (interp, Tcl_NewStringObj ("Length is not a multiple of 8", -1));
        return TCL_ERROR;
      }

      nout = (nbuf/8)*5 *TCL_UTF_MAX;

Changes to modules/base32/base32hex_c.tcl.

128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
	  *(at++) = map [ 0x1f &  (buf[3]>>2)                ];
	  *(at++) = map [ 0x1f &  (buf[3]<<3)                ];
	  *(at++) = '=';
	  break;
	}
      }

      Tcl_SetObjResult (interp, Tcl_NewStringObj (out, nout));
      Tcl_Free ((char*) out);
      return TCL_OK;
    }


    critcl::ccommand critcl_decode {dummy interp objc objv} {
      /* Syntax -*- c -*-







|







128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
	  *(at++) = map [ 0x1f &  (buf[3]>>2)                ];
	  *(at++) = map [ 0x1f &  (buf[3]<<3)                ];
	  *(at++) = '=';
	  break;
	}
      }

      Tcl_SetObjResult (interp, Tcl_NewStringObj ((char*)out, nout));
      Tcl_Free ((char*) out);
      return TCL_OK;
    }


    critcl::ccommand critcl_decode {dummy interp objc objv} {
      /* Syntax -*- c -*-
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
#define USAGED "estring"

      if (objc != 2) {
        Tcl_WrongNumArgs (interp, 1, objv, USAGED);
        return TCL_ERROR;
      }

      buf = Tcl_GetStringFromObj (objv[1], &nbuf);

      if (nbuf % 8) {
	Tcl_SetObjResult (interp, Tcl_NewStringObj ("Length is not a multiple of 8", -1));
        return TCL_ERROR;
      }

      nout = (nbuf/8)*5 *TCL_UTF_MAX;







|







173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
#define USAGED "estring"

      if (objc != 2) {
        Tcl_WrongNumArgs (interp, 1, objv, USAGED);
        return TCL_ERROR;
      }

      buf = (unsigned char*) Tcl_GetStringFromObj (objv[1], &nbuf);

      if (nbuf % 8) {
	Tcl_SetObjResult (interp, Tcl_NewStringObj ("Length is not a multiple of 8", -1));
        return TCL_ERROR;
      }

      nout = (nbuf/8)*5 *TCL_UTF_MAX;

Changes to modules/blowfish/blowfish.tcl.

703
704
705
706
707
708
709


710


711
712
713
714
715
716
717
    return $r
}

# -------------------------------------------------------------------------

# Try and load a compiled extension to help.
namespace eval ::blowfish {


    variable e; foreach e {trf} { if {[LoadAccelerator $e]} { break } }


}

package provide blowfish $::blowfish::version

# -------------------------------------------------------------------------
#
# Local Variables:







>
>
|
>
>







703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
    return $r
}

# -------------------------------------------------------------------------

# Try and load a compiled extension to help.
namespace eval ::blowfish {
    variable e {}
    foreach e {trf} {
        if {[LoadAccelerator $e]} break
    }
    unset e
}

package provide blowfish $::blowfish::version

# -------------------------------------------------------------------------
#
# Local Variables:

Changes to modules/crc/crc32.man.


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

[manpage_begin crc32 n 1.3]
[see_also cksum(n)]
[see_also crc16(n)]
[see_also sum(n)]
[keywords checksum]
[keywords cksum]
[keywords crc]
[keywords crc32]
[keywords {cyclic redundancy check}]
[keywords {data integrity}]
[keywords security]
[copyright {2002, Pat Thoyts}]
[moddesc   {Cyclic Redundancy Checks}]
[titledesc {Perform a 32bit Cyclic Redundancy Check}]
[category  {Hashes, checksums, and encryption}]
[require Tcl 8.2]
[require crc32 [opt 1.3]]
[description]
[para]

This package provides a Tcl implementation of the CRC-32
algorithm based upon information provided at
http://www.naaccr.org/standard/crc32/document.html

>
|















|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
[vset VERSION 1.3.2]
[manpage_begin crc32 n [vset VERSION]]
[see_also cksum(n)]
[see_also crc16(n)]
[see_also sum(n)]
[keywords checksum]
[keywords cksum]
[keywords crc]
[keywords crc32]
[keywords {cyclic redundancy check}]
[keywords {data integrity}]
[keywords security]
[copyright {2002, Pat Thoyts}]
[moddesc   {Cyclic Redundancy Checks}]
[titledesc {Perform a 32bit Cyclic Redundancy Check}]
[category  {Hashes, checksums, and encryption}]
[require Tcl 8.2]
[require crc32 [opt [vset VERSION]]]
[description]
[para]

This package provides a Tcl implementation of the CRC-32
algorithm based upon information provided at
http://www.naaccr.org/standard/crc32/document.html

Changes to modules/crc/crc32.tcl.

11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------
# $Id: crc32.tcl,v 1.22 2009/05/06 22:41:08 patthoyts Exp $

package require Tcl 8.2

namespace eval ::crc {
    variable crc32_version 1.3.1
    variable accel
    array set accel {critcl 0 trf 0}

    namespace export crc32

    variable crc32_tbl [list 0x00000000 0x77073096 0xEE0E612C 0x990951BA \
                           0x076DC419 0x706AF48F 0xE963A535 0x9E6495A3 \







|







11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------
# $Id: crc32.tcl,v 1.22 2009/05/06 22:41:08 patthoyts Exp $

package require Tcl 8.2

namespace eval ::crc {
    variable crc32_version 1.3.2
    variable accel
    array set accel {critcl 0 trf 0}

    namespace export crc32

    variable crc32_tbl [list 0x00000000 0x77073096 0xEE0E612C 0x990951BA \
                           0x076DC419 0x706AF48F 0xE963A535 0x9E6495A3 \
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
                if (r == TCL_OK) {
                    data = Tcl_GetByteArrayFromObj(objv[1], &size);
                }
                for (cn = 0; r == TCL_OK && cn < size; cn++) {
                    ndx = (t ^ data[cn]) & 0xFF;
                    r = Tcl_ListObjIndex(interp, tblPtr, ndx, &lkpPtr);
                    if (r == TCL_OK) {
                        r = Tcl_GetLongFromObj(interp, lkpPtr, &lkp);
                    }
                    if (r == TCL_OK) {
                        t = lkp ^ (t >> 8);
                    }
                }
            }








|







230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
                if (r == TCL_OK) {
                    data = Tcl_GetByteArrayFromObj(objv[1], &size);
                }
                for (cn = 0; r == TCL_OK && cn < size; cn++) {
                    ndx = (t ^ data[cn]) & 0xFF;
                    r = Tcl_ListObjIndex(interp, tblPtr, ndx, &lkpPtr);
                    if (r == TCL_OK) {
                        r = Tcl_GetLongFromObj(interp, lkpPtr, (long*) &lkp);
                    }
                    if (r == TCL_OK) {
                        t = lkp ^ (t >> 8);
                    }
                }
            }

358
359
360
361
362
363
364

365



366
367
368
369
370
371
372
373
374
375
    return [format $opts(-format) $r]
}

# -------------------------------------------------------------------------

# Try and load a compiled extension to help (note - trf is fastest)
namespace eval ::crc {

    foreach e {trf critcl} { if {[LoadAccelerator $e]} { break } }



}

package provide crc32 $::crc::crc32_version

# -------------------------------------------------------------------------
#
# Local variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:







>
|
>
>
>










358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
    return [format $opts(-format) $r]
}

# -------------------------------------------------------------------------

# Try and load a compiled extension to help (note - trf is fastest)
namespace eval ::crc {
    variable e {}
    foreach e {trf critcl} {
        if {[LoadAccelerator $e]} break
    }
    unset e
}

package provide crc32 $::crc::crc32_version

# -------------------------------------------------------------------------
#
# Local variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:

Changes to modules/crc/pkgIndex.tcl.

1
2
3
4
5
if {![package vsatisfies [package provide Tcl] 8.2]} {return}
package ifneeded cksum 1.1.4 [list source [file join $dir cksum.tcl]]
package ifneeded crc16 1.1.2 [list source [file join $dir crc16.tcl]]
package ifneeded crc32 1.3.1 [list source [file join $dir crc32.tcl]]
package ifneeded sum   1.1.1 [list source [file join $dir sum.tcl]]



|

1
2
3
4
5
if {![package vsatisfies [package provide Tcl] 8.2]} {return}
package ifneeded cksum 1.1.4 [list source [file join $dir cksum.tcl]]
package ifneeded crc16 1.1.2 [list source [file join $dir crc16.tcl]]
package ifneeded crc32 1.3.2 [list source [file join $dir crc32.tcl]]
package ifneeded sum   1.1.1 [list source [file join $dir sum.tcl]]

Changes to modules/dns/ipMoreC.tcl.

163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
        }
        /* options are parsed */

        /* create return obj */
        result = Tcl_GetObjResult (interp);

        /* set ipaddr and ipmask */
        Tcl_GetIntFromObj(interp,objv[objc-3],&ipaddr);
        Tcl_GetIntFromObj(interp,objv[objc-2],&ipMask);

        /* split the 3rd argument into <ipaddr> <mask> pairs */
        if (Tcl_ListObjGetElements (interp, objv[objc-1], &compareListc, &compareListv) != TCL_OK) {
                return TCL_ERROR;
        }
/*       printf("comparing %x/%x \n",ipaddr,ipMask); */








|
|







163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
        }
        /* options are parsed */

        /* create return obj */
        result = Tcl_GetObjResult (interp);

        /* set ipaddr and ipmask */
        Tcl_GetIntFromObj(interp,objv[objc-3],(int*)&ipaddr);
        Tcl_GetIntFromObj(interp,objv[objc-2],(int*)&ipMask);

        /* split the 3rd argument into <ipaddr> <mask> pairs */
        if (Tcl_ListObjGetElements (interp, objv[objc-1], &compareListc, &compareListv) != TCL_OK) {
                return TCL_ERROR;
        }
/*       printf("comparing %x/%x \n",ipaddr,ipMask); */

188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
					    &comparePrefixMaskv) != TCL_OK) {
		    return TCL_ERROR;
                }
                if (comparePrefixMaskc != 2) {
		    Tcl_AddErrorInfo(interp,"need format {{<ipaddr> <mask>} {<ipad..}}");
                        return TCL_ERROR;
                }
                Tcl_GetIntFromObj(interp,comparePrefixMaskv[0],&ipaddr2);
                Tcl_GetIntFromObj(interp,comparePrefixMaskv[1],&ipMask2);
/*               printf(" with %x/%x \n",ipaddr2,ipMask2); */
                mask1mask2 = ipMask & ipMask2;
/*               printf("  mask1mask2 %x \n",mask1mask2); */
/*               printf("  ipaddr & mask1mask2  %x\n",ipaddr & mask1mask2); */
/*               printf("  ipaddr2 & mask1mask2 %x\n",ipaddr2 & mask1mask2); */
                if ((ipaddr & mask1mask2) == (ipaddr2 & mask1mask2)) {
		    if (allSet) {







|
|







188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
					    &comparePrefixMaskv) != TCL_OK) {
		    return TCL_ERROR;
                }
                if (comparePrefixMaskc != 2) {
		    Tcl_AddErrorInfo(interp,"need format {{<ipaddr> <mask>} {<ipad..}}");
                        return TCL_ERROR;
                }
                Tcl_GetIntFromObj(interp,comparePrefixMaskv[0],(int*)&ipaddr2);
                Tcl_GetIntFromObj(interp,comparePrefixMaskv[1],(int*)&ipMask2);
/*               printf(" with %x/%x \n",ipaddr2,ipMask2); */
                mask1mask2 = ipMask & ipMask2;
/*               printf("  mask1mask2 %x \n",mask1mask2); */
/*               printf("  ipaddr & mask1mask2  %x\n",ipaddr & mask1mask2); */
/*               printf("  ipaddr2 & mask1mask2 %x\n",ipaddr2 & mask1mask2); */
                if ((ipaddr & mask1mask2) == (ipaddr2 & mask1mask2)) {
		    if (allSet) {

Changes to modules/doctools/docidx.man.


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32

[comment {-*- tcl -*- doctools manpage}]
[manpage_begin doctools::idx n 1.0.4]
[see_also docidx_intro]
[see_also docidx_lang_cmdref]
[see_also docidx_lang_intro]
[see_also docidx_lang_syntax]
[see_also docidx_plugin_apiref]
[keywords conversion]
[keywords docidx]
[keywords documentation]
[keywords HTML]
[keywords index]
[keywords {keyword index}]
[keywords latex]
[keywords manpage]
[keywords markup]
[keywords nroff]
[keywords TMML]
[keywords wiki]
[copyright {2003-2010 Andreas Kupries <[email protected]>}]
[moddesc   {Documentation tools}]
[titledesc {docidx - Processing indices}]
[category  {Documentation tools}]
[require Tcl 8.2]
[require doctools::idx [opt 1.0.4]]
[description]

This package provides a class for the creation of objects able to
process and convert text written in the [term docidx] markup language
into any output format X for which a [term {formatting engine}] is
available.

>

|

















|




|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
[vset PACKAGE_VERSION 1.0.5]
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin doctools::idx n [vset PACKAGE_VERSION]]
[see_also docidx_intro]
[see_also docidx_lang_cmdref]
[see_also docidx_lang_intro]
[see_also docidx_lang_syntax]
[see_also docidx_plugin_apiref]
[keywords conversion]
[keywords docidx]
[keywords documentation]
[keywords HTML]
[keywords index]
[keywords {keyword index}]
[keywords latex]
[keywords manpage]
[keywords markup]
[keywords nroff]
[keywords TMML]
[keywords wiki]
[copyright {2003-2014 Andreas Kupries <[email protected]>}]
[moddesc   {Documentation tools}]
[titledesc {docidx - Processing indices}]
[category  {Documentation tools}]
[require Tcl 8.2]
[require doctools::idx [opt [vset PACKAGE_VERSION]]]
[description]

This package provides a class for the creation of objects able to
process and convert text written in the [term docidx] markup language
into any output format X for which a [term {formatting engine}] is
available.

Changes to modules/doctools/docidx.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
# docidx.tcl --
#
#	Implementation of docidx objects for Tcl.
#
# Copyright (c) 2003-2010 Andreas Kupries <[email protected]>
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# 
# RCS: @(#) $Id: docidx.tcl,v 1.22 2010/06/08 19:13:53 andreas_kupries Exp $

package require Tcl 8.2




|







1
2
3
4
5
6
7
8
9
10
11
12
# docidx.tcl --
#
#	Implementation of docidx objects for Tcl.
#
# Copyright (c) 2003-2014 Andreas Kupries <[email protected]>
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# 
# RCS: @(#) $Id: docidx.tcl,v 1.22 2010/06/08 19:13:53 andreas_kupries Exp $

package require Tcl 8.2
273
274
275
276
277
278
279


280
281
282
283
284
285
286
287
		-format {
		    if {[catch {
			set fmtfile [LookupFormat $name $value]
			SetupFormatter $name $fmtfile
			upvar #0 ::doctools::idx::docidx${name}::format format
			set format $value
		    } msg]} {


			return -code error "doctools::idx::_configure: -format: $msg"
		    }
		}
		default {
		    return -code error \
			    "doctools::idx::_configure: Unknown option \"$option\", expected\
			    -file, or -format"
		}







>
>
|







273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
		-format {
		    if {[catch {
			set fmtfile [LookupFormat $name $value]
			SetupFormatter $name $fmtfile
			upvar #0 ::doctools::idx::docidx${name}::format format
			set format $value
		    } msg]} {
			return -code error \
			    -errorinfo $::errorInfo \
			    "doctools::idx::_configure: -format: $msg"
		    }
		}
		default {
		    return -code error \
			    "doctools::idx::_configure: Unknown option \"$option\", expected\
			    -file, or -format"
		}
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
proc ::doctools::idx::LookupFormat {name format} {
    # Order of searching
    # 1) Is the name of the format an existing file ?
    #    If yes, take this file.
    # 2) Look for the file in the directories given to the object itself..
    # 3) Look for the file in the standard directories of this package.

    if {[file exists $format]} {
	return $format
    }

    upvar #0 ::doctools::idx::docidx${name}::paths opaths
    foreach path $opaths {
	set f [file join $path idx.$format]
	if {[file exists $f]} {
	    return $f
	}
    }

    variable paths
    foreach path $paths {
	set f [file join $path idx.$format]
	if {[file exists $f]} {
	    return $f
	}
    }

    return -code error "Unknown format \"$format\""
}








|






|







|







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
proc ::doctools::idx::LookupFormat {name format} {
    # Order of searching
    # 1) Is the name of the format an existing file ?
    #    If yes, take this file.
    # 2) Look for the file in the directories given to the object itself..
    # 3) Look for the file in the standard directories of this package.

    if {[file exists $format] && [file isfile $format]} {
	return $format
    }

    upvar #0 ::doctools::idx::docidx${name}::paths opaths
    foreach path $opaths {
	set f [file join $path idx.$format]
	if {[file exists $f] && [file isfile $f]} {
	    return $f
	}
    }

    variable paths
    foreach path $paths {
	set f [file join $path idx.$format]
	if {[file exists $f] && [file isfile $f]} {
	    return $f
	}
    }

    return -code error "Unknown format \"$format\""
}

953
954
955
956
957
958
959
960
    # => FOO/mpformats

    #catch {search [file join $here                lib doctools mpformats]}
    #catch {search [file join [file dirname $here] lib doctools mpformats]}
    catch {search [file join $here                             mpformats]}
}

package provide doctools::idx 1.0.4







|
955
956
957
958
959
960
961
962
    # => FOO/mpformats

    #catch {search [file join $here                lib doctools mpformats]}
    #catch {search [file join [file dirname $here] lib doctools mpformats]}
    catch {search [file join $here                             mpformats]}
}

package provide doctools::idx 1.0.5

Changes to modules/doctools/doctoc.man.


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32

[comment {-*- tcl -*- doctools manpage}]
[manpage_begin doctools::toc n 1.1.3]
[see_also doctoc_intro]
[see_also doctoc_lang_cmdref]
[see_also doctoc_lang_intro]
[see_also doctoc_lang_syntax]
[see_also doctoc_plugin_apiref]
[keywords conversion]
[keywords doctoc]
[keywords documentation]
[keywords HTML]
[keywords latex]
[keywords manpage]
[keywords markup]
[keywords nroff]
[keywords {table of contents}]
[keywords TMML]
[keywords toc]
[keywords wiki]
[copyright {2003-2010 Andreas Kupries <[email protected]>}]
[moddesc   {Documentation tools}]
[titledesc {doctoc - Processing tables of contents}]
[category  {Documentation tools}]
[require Tcl 8.2]
[require doctools::toc [opt 1.1.3]]
[description]

This package provides a class for the creation of objects able to
process and convert text written in the [term doctoc] markup language
into any output format X for which a [term {formatting engine}] is
available.

>

|

















|




|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
[vset PACKAGE_VERSION 1.1.4]
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin doctools::toc n [vset PACKAGE_VERSION]]
[see_also doctoc_intro]
[see_also doctoc_lang_cmdref]
[see_also doctoc_lang_intro]
[see_also doctoc_lang_syntax]
[see_also doctoc_plugin_apiref]
[keywords conversion]
[keywords doctoc]
[keywords documentation]
[keywords HTML]
[keywords latex]
[keywords manpage]
[keywords markup]
[keywords nroff]
[keywords {table of contents}]
[keywords TMML]
[keywords toc]
[keywords wiki]
[copyright {2003-2014 Andreas Kupries <[email protected]>}]
[moddesc   {Documentation tools}]
[titledesc {doctoc - Processing tables of contents}]
[category  {Documentation tools}]
[require Tcl 8.2]
[require doctools::toc [opt [vset PACKAGE_VERSION]]]
[description]

This package provides a class for the creation of objects able to
process and convert text written in the [term doctoc] markup language
into any output format X for which a [term {formatting engine}] is
available.

Changes to modules/doctools/doctoc.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
# doctoc.tcl --
#
#	Implementation of doctoc objects for Tcl.
#
# Copyright (c) 2003-2010 Andreas Kupries <[email protected]>
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# 
# RCS: @(#) $Id: doctoc.tcl,v 1.22 2010/06/08 19:13:53 andreas_kupries Exp $

package require Tcl 8.2




|







1
2
3
4
5
6
7
8
9
10
11
12
# doctoc.tcl --
#
#	Implementation of doctoc objects for Tcl.
#
# Copyright (c) 2003-2014 Andreas Kupries <[email protected]>
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# 
# RCS: @(#) $Id: doctoc.tcl,v 1.22 2010/06/08 19:13:53 andreas_kupries Exp $

package require Tcl 8.2
273
274
275
276
277
278
279


280
281
282
283
284
285
286
287
		-format {
		    if {[catch {
			set fmtfile [LookupFormat $name $value]
			SetupFormatter $name $fmtfile
			upvar #0 ::doctools::toc::doctoc${name}::format format
			set format $value
		    } msg]} {


			return -code error "doctools::toc::_configure: -format: $msg"
		    }
		}
		default {
		    return -code error \
			    "doctools::toc::_configure: Unknown option \"$option\", expected\
			    -file, or -format"
		}







>
>
|







273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
		-format {
		    if {[catch {
			set fmtfile [LookupFormat $name $value]
			SetupFormatter $name $fmtfile
			upvar #0 ::doctools::toc::doctoc${name}::format format
			set format $value
		    } msg]} {
			return -code error \
			    -errorinfo $::errorInfo \
			    "doctools::toc::_configure: -format: $msg"
		    }
		}
		default {
		    return -code error \
			    "doctools::toc::_configure: Unknown option \"$option\", expected\
			    -file, or -format"
		}
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
proc ::doctools::toc::LookupFormat {name format} {
    # Order of searching
    # 1) Is the name of the format an existing file ?
    #    If yes, take this file.
    # 2) Look for the file in the directories given to the object itself..
    # 3) Look for the file in the standard directories of this package.

    if {[file exists $format]} {
	return $format
    }

    upvar #0 ::doctools::toc::doctoc${name}::paths opaths
    foreach path $opaths {
	set f [file join $path toc.$format]
	if {[file exists $f]} {
	    return $f
	}
    }

    variable paths
    foreach path $paths {
	set f [file join $path toc.$format]
	if {[file exists $f]} {
	    return $f
	}
    }

    return -code error "Unknown format \"$format\""
}








|






|







|







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
proc ::doctools::toc::LookupFormat {name format} {
    # Order of searching
    # 1) Is the name of the format an existing file ?
    #    If yes, take this file.
    # 2) Look for the file in the directories given to the object itself..
    # 3) Look for the file in the standard directories of this package.

    if {[file exists $format] && [file isfile $format]} {
	return $format
    }

    upvar #0 ::doctools::toc::doctoc${name}::paths opaths
    foreach path $opaths {
	set f [file join $path toc.$format]
	if {[file exists $f] && [file isfile $f]} {
	    return $f
	}
    }

    variable paths
    foreach path $paths {
	set f [file join $path toc.$format]
	if {[file exists $f] && [file isfile $f]} {
	    return $f
	}
    }

    return -code error "Unknown format \"$format\""
}

959
960
961
962
963
964
965
966
    # => FOO/mpformats

    #catch {search [file join $here                lib doctools mpformats]}
    #catch {search [file join [file dirname $here] lib doctools mpformats]}
    catch {search [file join $here                             mpformats]}
}

package provide doctools::toc 1.1.3







|
961
962
963
964
965
966
967
968
    # => FOO/mpformats

    #catch {search [file join $here                lib doctools mpformats]}
    #catch {search [file join [file dirname $here] lib doctools mpformats]}
    catch {search [file join $here                             mpformats]}
}

package provide doctools::toc 1.1.4

Changes to modules/doctools/doctools.man.

1
2
3
4
5
6
7
8
9
[comment {-*- tcl -*- doctools manpage}]
[vset PACKAGE_VERSION 1.4.18]
[manpage_begin doctools n [vset PACKAGE_VERSION]]
[see_also doctools_intro]
[see_also doctools_lang_cmdref]
[see_also doctools_lang_intro]
[see_also doctools_lang_syntax]
[see_also doctools_plugin_apiref]
[keywords conversion]

|







1
2
3
4
5
6
7
8
9
[comment {-*- tcl -*- doctools manpage}]
[vset PACKAGE_VERSION 1.4.19]
[manpage_begin doctools n [vset PACKAGE_VERSION]]
[see_also doctools_intro]
[see_also doctools_lang_cmdref]
[see_also doctools_lang_intro]
[see_also doctools_lang_syntax]
[see_also doctools_plugin_apiref]
[keywords conversion]

Changes to modules/doctools/doctools.tcl.

365
366
367
368
369
370
371


372
373
374
375
376
377
378
379
		-format {
		    if {[catch {
			set fmtfile [LookupFormat $name $value]
			SetupFormatter $name $fmtfile
			upvar #0 ::doctools::doctools${name}::format format
			set format $value
		    } msg]} {


			return -code error "doctools::_configure: -format: $msg"
		    }
		}
		-deprecated {
		    if {![string is boolean $value]} {
			return -code error \
				"doctools::_configure: -deprecated expected a boolean, got \"$value\""
		    }







>
>
|







365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
		-format {
		    if {[catch {
			set fmtfile [LookupFormat $name $value]
			SetupFormatter $name $fmtfile
			upvar #0 ::doctools::doctools${name}::format format
			set format $value
		    } msg]} {
			return -code error \
			    -errorinfo $::errorInfo \
			    "doctools::_configure: -format: $msg"
		    }
		}
		-deprecated {
		    if {![string is boolean $value]} {
			return -code error \
				"doctools::_configure: -deprecated expected a boolean, got \"$value\""
		    }
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
proc ::doctools::LookupFormat {name format} {
    # Order of searching
    # 1) Is the name of the format an existing file ?
    #    If yes, take this file.
    # 2) Look for the file in the directories given to the object itself..
    # 3) Look for the file in the standard directories of this package.

    if {[file exists $format]} {
	return $format
    }

    upvar #0 ::doctools::doctools${name}::paths opaths
    foreach path $opaths {
	set f [file join $path fmt.$format]
	if {[file exists $f]} {
	    return $f
	}
    }

    variable paths
    foreach path $paths {
	set f [file join $path fmt.$format]
	if {[file exists $f]} {
	    return $f
	}
    }

    return -code error "Unknown format \"$format\""
}








|
|





|







|







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
proc ::doctools::LookupFormat {name format} {
    # Order of searching
    # 1) Is the name of the format an existing file ?
    #    If yes, take this file.
    # 2) Look for the file in the directories given to the object itself..
    # 3) Look for the file in the standard directories of this package.

    if {[file exists $format] && [file isfile $format] } {
      return $format
    }

    upvar #0 ::doctools::doctools${name}::paths opaths
    foreach path $opaths {
	set f [file join $path fmt.$format]
	if {[file exists $f] && [file isfile $f]} {
	    return $f
	}
    }

    variable paths
    foreach path $paths {
	set f [file join $path fmt.$format]
	if {[file exists $f] && [file isfile $f]} {
	    return $f
	}
    }

    return -code error "Unknown format \"$format\""
}

1352
1353
1354
1355
1356
1357
1358
1359
    # => FOO/mpformats

    #catch {search [file join $here                lib doctools mpformats]}
    #catch {search [file join [file dirname $here] lib doctools mpformats]}
    catch {search [file join $here                             mpformats]}
}

package provide doctools 1.4.18







|
1354
1355
1356
1357
1358
1359
1360
1361
    # => FOO/mpformats

    #catch {search [file join $here                lib doctools mpformats]}
    #catch {search [file join [file dirname $here] lib doctools mpformats]}
    catch {search [file join $here                             mpformats]}
}

package provide doctools 1.4.19

Changes to modules/doctools/pkgIndex.tcl.

1
2
3
4
5
6
if {![package vsatisfies [package provide Tcl] 8.2]} {return}
package ifneeded doctools            1.4.18 [list source [file join $dir doctools.tcl]]
package ifneeded doctools::toc       1.1.3  [list source [file join $dir doctoc.tcl]]
package ifneeded doctools::idx       1.0.4  [list source [file join $dir docidx.tcl]]
package ifneeded doctools::cvs       1      [list source [file join $dir cvs.tcl]]
package ifneeded doctools::changelog 1.1    [list source [file join $dir changelog.tcl]]

|
|
|


1
2
3
4
5
6
if {![package vsatisfies [package provide Tcl] 8.2]} {return}
package ifneeded doctools            1.4.19 [list source [file join $dir doctools.tcl]]
package ifneeded doctools::toc       1.1.4  [list source [file join $dir doctoc.tcl]]
package ifneeded doctools::idx       1.0.5  [list source [file join $dir docidx.tcl]]
package ifneeded doctools::cvs       1      [list source [file join $dir cvs.tcl]]
package ifneeded doctools::changelog 1.1    [list source [file join $dir changelog.tcl]]

Changes to modules/inifile/ini.man.


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



22
23
24
25
26
27
28

[comment {-*- tcl -*- doctools manpage}]
[manpage_begin inifile n 0.2.5]
[moddesc   {Parsing of Windows INI files}]
[titledesc {Parsing of Windows INI files}]
[category  {Text processing}]
[require Tcl 8.2]
[require inifile [opt 0.2.4]]
[description]

This package provides an interface for easy manipulation of Windows INI files.

[para]

[list_begin definitions]

[call [cmd ::ini::open] [arg file] [opt [arg access]]]

Opens an INI file and returns a handle that is used by other commands.
[arg access] is the same as the first form (non POSIX) of the [const open]
command, with the exception that mode [const a] is not supported. The
default mode is [const r+].




[call [cmd ::ini::close] [arg ini]]

Close the specified handle. If any changes were made and not written by
[const commit] they are lost.

[call [cmd ::ini::commit] [arg ini]]
>

|




|








|





>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
[vset VERSION 0.3]
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin inifile n [vset VERSION]]
[moddesc   {Parsing of Windows INI files}]
[titledesc {Parsing of Windows INI files}]
[category  {Text processing}]
[require Tcl 8.2]
[require inifile [opt [vset VERSION]]]
[description]

This package provides an interface for easy manipulation of Windows INI files.

[para]

[list_begin definitions]

[call [cmd ::ini::open] [arg file] [opt "[option -encoding] [arg encoding]"] [opt [arg access]]]

Opens an INI file and returns a handle that is used by other commands.
[arg access] is the same as the first form (non POSIX) of the [const open]
command, with the exception that mode [const a] is not supported. The
default mode is [const r+].

[para] The default [arg encoding] is the system encoding.


[call [cmd ::ini::close] [arg ini]]

Close the specified handle. If any changes were made and not written by
[const commit] they are lost.

[call [cmd ::ini::commit] [arg ini]]

Changes to modules/inifile/ini.tcl.

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





























23


24
25
26
27
28
29








30
31
32
33
34
35
36
# ini.tcl --
#
#       Querying and modifying old-style windows configuration files (.ini)
#
# Copyright (c) 2003-2007    Aaron Faupell <[email protected]>
# Copyright (c) 2008-2012    Andreas Kupries <[email protected]>
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# 
# RCS: @(#) $Id: ini.tcl,v 1.17 2012/01/05 21:04:55 andreas_kupries Exp $

package provide inifile 0.2.5

namespace eval ini {
    variable nexthandle  0
    variable commentchar \;
}

proc ::ini::open {ini {mode r+}} {
    variable nexthandle






























    if { ![regexp {^(w|r)\+?$} $mode] } {


        return -code error "$mode is not a valid access mode"
    }

    ::set fh ini$nexthandle
    ::set tmp [::open $ini $mode]
    fconfigure $tmp -translation crlf









    namespace eval ::ini::$fh {
        variable data;     array set data     {}
        variable comments; array set comments {}
        variable sections; array set sections {}
    }
    ::set ::ini::${fh}::channel $tmp












|






|


>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

>
>
|





>
>
>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# ini.tcl --
#
#       Querying and modifying old-style windows configuration files (.ini)
#
# Copyright (c) 2003-2007    Aaron Faupell <[email protected]>
# Copyright (c) 2008-2012    Andreas Kupries <[email protected]>
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# 
# RCS: @(#) $Id: ini.tcl,v 1.17 2012/01/05 21:04:55 andreas_kupries Exp $

package provide inifile 0.3

namespace eval ini {
    variable nexthandle  0
    variable commentchar \;
}

proc ::ini::open {ini args} {
    variable nexthandle

    while {[string match -* [::set opt [lindex $args 0]]]} {
	switch -exact -- $opt {
	    -- {
		::set args [lrange $args 1 end]
		break
	    }
	    -encoding {
		::set enc  [lindex $args 1]
		::set args [lrange $args 2 end]
	    }
	    default {
		return -code error \
		    -errorcode {INIFILE OPTION INVALID} \
		    "Invalid option $opt, expected -encoding"
	    }
	}
    }

    ::set remainder [llength $args]
    if {$remainder > 1} {
	return -code error \
	    -errorcode {WRONG-ARGS INIFILE} \
	    "wrong\#args: should be \"ini::open ?-encoding E? ?mode?\""
    } elseif {$remainder == 1} {
	::set mode [lindex $args 0]
    } else {
	::set mode r+
    }

    if { ![regexp {^(w|r)\+?$} $mode] } {
        return -code error \
	    -errorcode {INIFILE MODE INVALID} \
	    "$mode is not a valid access mode"
    }

    ::set fh ini$nexthandle
    ::set tmp [::open $ini $mode]
    fconfigure $tmp -translation crlf
    if {[info exists enc]} {
	if {[catch {
	    fconfigure $tmp -encoding $enc
	} msg]} {
	    ::close $tmp
	    return -code error $msg
	}
    }

    namespace eval ::ini::$fh {
        variable data;     array set data     {}
        variable comments; array set comments {}
        variable sections; array set sections {}
    }
    ::set ::ini::${fh}::channel $tmp
65
66
67
68
69
70
71
72


73
74
75
76
77
78
79
    variable ::ini::${fh}::sections
    variable ::ini::${fh}::channel
    variable ::ini::${fh}::file
    variable ::ini::${fh}::mode
    variable commentchar

    if { $mode == "r" } {
	return -code error "cannot write to read-only file"


    }
    ::close $channel
    ::set channel [::open $file w]
    ::set char $commentchar
    #seek $channel 0 start
    foreach sec [array names sections] {
	if { [info exists comments($sec)] } {







|
>
>







104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
    variable ::ini::${fh}::sections
    variable ::ini::${fh}::channel
    variable ::ini::${fh}::file
    variable ::ini::${fh}::mode
    variable commentchar

    if { $mode == "r" } {
	return -code error \
	    -errorcode {INIFILE READ-ONLY} \
	    "cannot write to read-only file"
    }
    ::close $channel
    ::set channel [::open $file w]
    ::set char $commentchar
    #seek $channel 0 start
    foreach sec [array names sections] {
	if { [info exists comments($sec)] } {
109
110
111
112
113
114
115



116
117
118
119
120
121
122
    ::set cur {}
    ::set com {}

    ::set char $commentchar
    seek $channel 0 start

    foreach line [split [read $channel] "\n"] {



	if { [string match "$char*" $line] } {
	    lappend com [string trim [string range $line [string length $char] end]]
	} elseif { [string match {\[*\]} $line] } {
	    ::set cur [string range $line 1 end-1]
	    if { $cur == "" } { continue }
	    ::set sections($cur) 1
	    if { $com != "" } {







>
>
>







150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
    ::set cur {}
    ::set com {}

    ::set char $commentchar
    seek $channel 0 start

    foreach line [split [read $channel] "\n"] {
	# bug 3612465 - allow and ignore leading and trailing whitespace.
	::set line [string trim $line]

	if { [string match "$char*" $line] } {
	    lappend com [string trim [string range $line [string length $char] end]]
	} elseif { [string match {\[*\]} $line] } {
	    ::set cur [string range $line 1 end-1]
	    if { $cur == "" } { continue }
	    ::set sections($cur) 1
	    if { $com != "" } {
151
152
153
154
155
156
157
158


159
160
161
162
163


164
165
166
167
168
169
170
171
172
173
174
175
176
177
178


179
180
181
182
183
184
185
186
187


188
189
190
191
192
193
194
195
196
197


198
199
200
201
202
203
204
205
# internal command to check if a section or key is nonexistant

proc ::ini::_exists {fh sec args} {
    variable ::ini::${fh}::sections
    variable ::ini::${fh}::data

    if { ![info exists sections($sec)] } {
        return -code error "no such section \"$sec\""


    }
    if { [llength $args] > 0 } {
        ::set key [lindex $args 0]
        if { ![info exists data($sec\000$key)] } {
            return -code error "can't read key \"$key\""


        }
    }
    return
}

# internal command to check validity of a handle

if { [package vcompare [package provide Tcl] 8.4] < 0 } {
    proc ::ini::_normalize {path} {
	return $path
    }
    proc ::ini::_valid_ns {name} {
	variable ::ini::${name}::data
	if { ![info exists data] } {
	    return -code error "$name is not an open INI file"


	}
    }
} else {
    proc ::ini::_normalize {path} {
	file normalize $path
    }
    proc ::ini::_valid_ns {name} {
	if { ![namespace exists ::ini::$name] } {
	    return -code error "$name is not an open INI file"


	}
    }
}

# get and set the ini comment character

proc ::ini::commentchar { {new {}} } {
    variable commentchar
    if {$new != ""} {
        if {[string length $new] > 1} {


	    return -code error "comment char must be a single character"
	}
        ::set commentchar $new
    }
    return $commentchar
}

# return all section names







|
>
>




|
>
>














|
>
>








|
>
>










>
>
|







195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
# internal command to check if a section or key is nonexistant

proc ::ini::_exists {fh sec args} {
    variable ::ini::${fh}::sections
    variable ::ini::${fh}::data

    if { ![info exists sections($sec)] } {
        return -code error \
	    -errorcode {INIFILE SECTION INVALID} \
	    "no such section \"$sec\""
    }
    if { [llength $args] > 0 } {
        ::set key [lindex $args 0]
        if { ![info exists data($sec\000$key)] } {
            return -code error \
		-errorcode {INIFILE KEY INVALID} \
		"can't read key \"$key\""
        }
    }
    return
}

# internal command to check validity of a handle

if { [package vcompare [package provide Tcl] 8.4] < 0 } {
    proc ::ini::_normalize {path} {
	return $path
    }
    proc ::ini::_valid_ns {name} {
	variable ::ini::${name}::data
	if { ![info exists data] } {
	    return -code error \
		-errorcode {INIFILE HANDLE INVALID} \
		"$name is not an open INI file"
	}
    }
} else {
    proc ::ini::_normalize {path} {
	file normalize $path
    }
    proc ::ini::_valid_ns {name} {
	if { ![namespace exists ::ini::$name] } {
	    return -code error \
		-errorcode {INIFILE HANDLE INVALID} \
		"$name is not an open INI file"
	}
    }
}

# get and set the ini comment character

proc ::ini::commentchar { {new {}} } {
    variable commentchar
    if {$new != ""} {
        if {[string length $new] > 1} {
	    return -code error \
		-errorcode {INIFILE COMMENT-CHAR INVALID} \
		"comment char must be a single character"
	}
        ::set commentchar $new
    }
    return $commentchar
}

# return all section names
274
275
276
277
278
279
280


281
282
283
284
285
286
287
288
    _valid_ns $fh
    variable ::ini::${fh}::sections
    variable ::ini::${fh}::data

    ::set sec [string trim $sec]
    ::set key [string trim $key]
    if { $sec == "" || $key == "" } {


        error "section or key may not be empty"
    }
    ::set data($sec\000$key) $value
    ::set sections($sec) 1
    return $value
}

# delete a key or an entire section







>
>
|







328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
    _valid_ns $fh
    variable ::ini::${fh}::sections
    variable ::ini::${fh}::data

    ::set sec [string trim $sec]
    ::set key [string trim $key]
    if { $sec == "" || $key == "" } {
        return -code error \
	    -errorcode {INIFILE SYNTAX} \
	    "section or key may not be empty"
    }
    ::set data($sec\000$key) $value
    ::set sections($sec) 1
    return $value
}

# delete a key or an entire section

Changes to modules/inifile/inifile.test.

14
15
16
17
18
19
20

21
22
23
24
25
26
27
    useLocal ini.tcl inifile
}

#---------------------------------------------------------------------

set inifile [localPath ini.tcl]
set testini [localPath test.ini]


#---------------------------------------------------------------------

test inifile-1.1 {ini::open} {
    set res [ini::open $testini r]
    ini::close $res
    set res







>







14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
    useLocal ini.tcl inifile
}

#---------------------------------------------------------------------

set inifile [localPath ini.tcl]
set testini [localPath test.ini]
set sampini [localPath sample.ini]

#---------------------------------------------------------------------

test inifile-1.1 {ini::open} {
    set res [ini::open $testini r]
    ini::close $res
    set res
114
115
116
117
118
119
120

121
122
123
124
125
126
127
test inifile-1.14 {ini:::exists} {
    set hdl [ini::open $testini r]
    set res [ini::exists $hdl \{test \}key]
    ini::close $hdl
    set res
} {1}


# Tests for bug #1281136 --
set N 0
foreach name {nexthandle commentchar} {
    test inifile-2.$N {bug 1281136 - collision with global variable names} {
        set script {list [catch {
            array set ::%var {}
            source %file







>







115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
test inifile-1.14 {ini:::exists} {
    set hdl [ini::open $testini r]
    set res [ini::exists $hdl \{test \}key]
    ini::close $hdl
    set res
} {1}

#---------------------------------------------------------------------
# Tests for bug #1281136 --
set N 0
foreach name {nexthandle commentchar} {
    test inifile-2.$N {bug 1281136 - collision with global variable names} {
        set script {list [catch {
            array set ::%var {}
            source %file
151
152
153
154
155
156
157
158







159
















































160

        interp delete slave0
        set r
    } {0 {}}
    incr N
}

#---------------------------------------------------------------------
# Clean up
























































testsuiteCleanup








|
>
>
>
>
>
>
>

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

>
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
        interp delete slave0
        set r
    } {0 {}}
    incr N
}

#---------------------------------------------------------------------

test inifile-3.0 {bug 3612465, leading & trailing spaces} {
    set fh [ini::open $sampini]
    set res [ini::sections $fh]
    ini::close $fh
    unset fh
    set res
} General

test inifile-3.1 {bug 3612465, leading & trailing spaces} {
    set fh [ini::open $sampini]
    #set res [llength [ini::sections $fh]]
    set res [lsort -dict [ini::keys $fh General]]
    ini::close $fh
    unset fh
    set res
} {key key2}

#---------------------------------------------------------------------

test inifile-4.0 {bug c4b8162da5 - ini::open} {
    set res [ini::open $testini -encoding unicode r]
    ini::close $res
    set res
} {ini16}

# Test various error conditions.
test inifile-4.1 {bug c4b8162da5 - ini::open - invalid encoding} {
    catch {
	ini::open $testini -encoding foo r
    } res
    set res
} {unknown encoding "foo"}

test inifile-4.2 {bug c4b8162da5 - ini::open - invalid option} {
    catch {
	ini::open $testini -bogus foo r
    } res
    set res
} {Invalid option -bogus, expected -encoding}

test inifile-4.3 {bug c4b8162da5 - ini::open - invalid mode} {
    catch {
	ini::open $testini x
    } res
    set res
} {x is not a valid access mode}

test inifile-4.4 {bug c4b8162da5 - ini::open - invalid mode} {
    catch {
	set res [ini::open $testini w-]
    } res
    set res
} {w- is not a valid access mode}

#---------------------------------------------------------------------
# Clean up
testsuiteCleanup
return

Changes to modules/inifile/pkgIndex.tcl.

1
2
if { ![package vsatisfies [package provide Tcl] 8.2] } { return }
package ifneeded inifile 0.2.5 [list source [file join $dir ini.tcl]]

|
1
2
if { ![package vsatisfies [package provide Tcl] 8.2] } { return }
package ifneeded inifile 0.3 [list source [file join $dir ini.tcl]]

Added modules/inifile/sample.ini.











>
>
>
>
>
1
2
3
4
5
[General]   
 key=value
key2=value2 

  ; ....  

Changes to modules/json/json.man.

1
2
3
4
5
6
7
8
9
[comment {-*- tcl -*- doctools manpage}]
[vset VERSION 1.3]
[manpage_begin json n [vset VERSION]]
[keywords {data exchange}]
[keywords {exchange format}]
[keywords javascript]
[keywords json]
[copyright {2006 ActiveState Software Inc.}]
[copyright {2009 Thomas Maeder, Glue Software Engineering AG}]

|







1
2
3
4
5
6
7
8
9
[comment {-*- tcl -*- doctools manpage}]
[vset VERSION 1.3.3]
[manpage_begin json n [vset VERSION]]
[keywords {data exchange}]
[keywords {exchange format}]
[keywords javascript]
[keywords json]
[copyright {2006 ActiveState Software Inc.}]
[copyright {2009 Thomas Maeder, Glue Software Engineering AG}]

Changes to modules/json/json.tcl.

194
195
196
197
198
199
200
201
202
203
204
205





206
207
208
209
210
211
212
213
214
215
216
217
218
219
220

221
222
223
224
225
226
227
228
229
230
231
232
233
234
    # Regular expression for tokenizing a JSON text (cf. http://json.org/)

    # tokens consisting of a single character
    variable singleCharTokens { "{" "}" ":" "\\[" "\\]" "," }
    variable singleCharTokenRE "\[[join $singleCharTokens {}]\]"

    # quoted string tokens
    variable escapableREs { "[\\\"\\\\/bfnrt]" "u[[:xdigit:]]{4}" }
    variable escapedCharRE "\\\\(?:[join $escapableREs |])"
    variable unescapedCharRE {[^\\\"]}
    variable stringRE "\"(?:$escapedCharRE|$unescapedCharRE)*\""






    # (unquoted) words
    variable wordTokens { "true" "false" "null" }
    variable wordTokenRE [join $wordTokens "|"]

    # number tokens
    # negative lookahead (?!0)[[:digit:]]+ might be more elegant, but
    # would slow down tokenizing by a factor of up to 3!
    variable positiveRE {[1-9][[:digit:]]*}
    variable cardinalRE "-?(?:$positiveRE|0)"
    variable fractionRE {[.][[:digit:]]+}
    variable exponentialRE {[eE][+-]?[[:digit:]]+}
    variable numberRE "${cardinalRE}(?:$fractionRE)?(?:$exponentialRE)?"

    # JSON token
    variable tokenRE "$singleCharTokenRE|$stringRE|$wordTokenRE|$numberRE"



    # 0..n white space characters
    set whiteSpaceRE {[[:space:]]*}

    # Regular expression for validating a JSON text
    variable validJsonRE "^(?:${whiteSpaceRE}(?:$tokenRE))*${whiteSpaceRE}$"
}


# Validate JSON text
# @param jsonText JSON text
# @return 1 iff $jsonText conforms to the JSON grammar
#           (@see http://json.org/)







|




>
>
>
>
>













|

>






|







194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
    # Regular expression for tokenizing a JSON text (cf. http://json.org/)

    # tokens consisting of a single character
    variable singleCharTokens { "{" "}" ":" "\\[" "\\]" "," }
    variable singleCharTokenRE "\[[join $singleCharTokens {}]\]"

    # quoted string tokens
    variable escapableREs { "[\\\"\\\\/bfnrt]" "u[[:xdigit:]]{4}" "." }
    variable escapedCharRE "\\\\(?:[join $escapableREs |])"
    variable unescapedCharRE {[^\\\"]}
    variable stringRE "\"(?:$escapedCharRE|$unescapedCharRE)*\""

    # as above, for validation
    variable escapableREsv { "[\\\"\\\\/bfnrt]" "u[[:xdigit:]]{4}" }
    variable escapedCharREv "\\\\(?:[join $escapableREsv |])"
    variable stringREv "\"(?:$escapedCharREv|$unescapedCharRE)*\""

    # (unquoted) words
    variable wordTokens { "true" "false" "null" }
    variable wordTokenRE [join $wordTokens "|"]

    # number tokens
    # negative lookahead (?!0)[[:digit:]]+ might be more elegant, but
    # would slow down tokenizing by a factor of up to 3!
    variable positiveRE {[1-9][[:digit:]]*}
    variable cardinalRE "-?(?:$positiveRE|0)"
    variable fractionRE {[.][[:digit:]]+}
    variable exponentialRE {[eE][+-]?[[:digit:]]+}
    variable numberRE "${cardinalRE}(?:$fractionRE)?(?:$exponentialRE)?"

    # JSON token, and validation
    variable tokenRE "$singleCharTokenRE|$stringRE|$wordTokenRE|$numberRE"
    variable tokenREv "$singleCharTokenRE|$stringREv|$wordTokenRE|$numberRE"


    # 0..n white space characters
    set whiteSpaceRE {[[:space:]]*}

    # Regular expression for validating a JSON text
    variable validJsonRE "^(?:${whiteSpaceRE}(?:$tokenREv))*${whiteSpaceRE}$"
}


# Validate JSON text
# @param jsonText JSON text
# @return 1 iff $jsonText conforms to the JSON grammar
#           (@see http://json.org/)
269
270
271
272
273
274
275
276
proc ::json::string2json {str} {
    return "\"$str\""
}

# ### ### ### ######### ######### #########
## Ready

package provide json 1.3.2







|
275
276
277
278
279
280
281
282
proc ::json::string2json {str} {
    return "\"$str\""
}

# ### ### ### ######### ######### #########
## Ready

package provide json 1.3.3

Changes to modules/json/json_tcl.tcl.

18
19
20
21
22
23
24


25
26
27
28
29
30
31
# @return dict (or list) containing the object represented by $jsonText
proc ::json::json2dict_tcl {jsonText} {
    variable tokenRE

    set tokens [regexp -all -inline -- $tokenRE $jsonText]
    set nrTokens [llength $tokens]
    set tokenCursor 0


    return [parseValue $tokens $nrTokens tokenCursor]
}

# Parse multiple JSON entities in a string into a list of dictionaries
# @param jsonText JSON text to parse
# @param max      Max number of entities to extract.
# @return list of (dict (or list) containing the objects) represented by $jsonText







>
>







18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# @return dict (or list) containing the object represented by $jsonText
proc ::json::json2dict_tcl {jsonText} {
    variable tokenRE

    set tokens [regexp -all -inline -- $tokenRE $jsonText]
    set nrTokens [llength $tokens]
    set tokenCursor 0

#puts T:\t[join $tokens \nT:\t]
    return [parseValue $tokens $nrTokens tokenCursor]
}

# Parse multiple JSON entities in a string into a list of dictionaries
# @param jsonText JSON text to parse
# @param max      Max number of entities to extract.
# @return list of (dict (or list) containing the objects) represented by $jsonText
65
66
67
68
69
70
71
72

73





74

75
76
77
78
79
80
81
82
83
84
85
86
87
88
89

90
91
92
93
94
95
96
97
98
99
100
101
	"unexpected token \"$token\" at position $tokenCursor; expecting $expected"
}

# Get rid of the quotes surrounding a string token and substitute the
# real characters for escape sequences within it
# @param token
# @return unquoted unescaped value of the string contained in $token
proc ::json::unquoteUnescapeString {token} {

    set unquoted [string range $token 1 end-1]





    return [subst -nocommands -novariables $unquoted]

}

# Parse an object member
# @param tokens list of tokens
# @param nrTokens length of $tokens
# @param tokenCursorName name (in caller's context) of variable
#                        holding current position in $tokens
# @param objectDictName name (in caller's context) of dict
#                       representing the JSON object of which to
#                       parse the next member
proc ::json::parseObjectMember {tokens nrTokens tokenCursorName objectDictName} {
    upvar $tokenCursorName tokenCursor
    upvar $objectDictName objectDict

    set token [lindex $tokens $tokenCursor]

    incr tokenCursor

    set leadingChar [string index $token 0]
    if {$leadingChar eq "\""} {
        set memberName [unquoteUnescapeString $token]

        if {$tokenCursor == $nrTokens} {
            unexpected $tokenCursor "END" "\":\""
        } else {
            set token [lindex $tokens $tokenCursor]
            incr tokenCursor








|
>

>
>
>
>
>
|
>















>




|







67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
	"unexpected token \"$token\" at position $tokenCursor; expecting $expected"
}

# Get rid of the quotes surrounding a string token and substitute the
# real characters for escape sequences within it
# @param token
# @return unquoted unescaped value of the string contained in $token
proc ::json::unquoteUnescapeString {tokenCursor token} {
    variable stringREv
    set unquoted [string range $token 1 end-1]

    if {![regexp $stringREv $token]} {
	unexpected $tokenCursor $token STRING
    }

    set res [subst -nocommands -novariables $unquoted]
    return $res
}

# Parse an object member
# @param tokens list of tokens
# @param nrTokens length of $tokens
# @param tokenCursorName name (in caller's context) of variable
#                        holding current position in $tokens
# @param objectDictName name (in caller's context) of dict
#                       representing the JSON object of which to
#                       parse the next member
proc ::json::parseObjectMember {tokens nrTokens tokenCursorName objectDictName} {
    upvar $tokenCursorName tokenCursor
    upvar $objectDictName objectDict

    set token [lindex $tokens $tokenCursor]
    set tc $tokenCursor
    incr tokenCursor

    set leadingChar [string index $token 0]
    if {$leadingChar eq "\""} {
        set memberName [unquoteUnescapeString $tc $token]

        if {$tokenCursor == $nrTokens} {
            unexpected $tokenCursor "END" "\":\""
        } else {
            set token [lindex $tokens $tokenCursor]
            incr tokenCursor

242
243
244
245
246
247
248

249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
proc ::json::parseValue {tokens nrTokens tokenCursorName} {
    upvar $tokenCursorName tokenCursor

    if {$tokenCursor == $nrTokens} {
        unexpected $tokenCursor "END" "VALUE"
    } else {
        set token [lindex $tokens $tokenCursor]

        incr tokenCursor

        set leadingChar [string index $token 0]
        switch -exact -- $leadingChar {
            "\{" {
                return [parseObject $tokens $nrTokens tokenCursor]
            }
            "\[" {
                return [parseArray $tokens $nrTokens tokenCursor]
            }
            "\"" {
                # quoted string
                return [unquoteUnescapeString $token]
            }
            "t" -
            "f" -
            "n" {
                # bare word: true, false, null (return as is)
                return $token
            }







>












|







252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
proc ::json::parseValue {tokens nrTokens tokenCursorName} {
    upvar $tokenCursorName tokenCursor

    if {$tokenCursor == $nrTokens} {
        unexpected $tokenCursor "END" "VALUE"
    } else {
        set token [lindex $tokens $tokenCursor]
	set tc $tokenCursor
        incr tokenCursor

        set leadingChar [string index $token 0]
        switch -exact -- $leadingChar {
            "\{" {
                return [parseObject $tokens $nrTokens tokenCursor]
            }
            "\[" {
                return [parseArray $tokens $nrTokens tokenCursor]
            }
            "\"" {
                # quoted string
                return [unquoteUnescapeString $tc $token]
            }
            "t" -
            "f" -
            "n" {
                # bare word: true, false, null (return as is)
                return $token
            }

Changes to modules/json/pkgIndex.tcl.

1
2
3
4
5
6
7
# Tcl package index file, version 1.1

if {![package vsatisfies [package provide Tcl] 8.4]} {return}
package ifneeded json 1.3.2 [list source [file join $dir json.tcl]]

if {![package vsatisfies [package provide Tcl] 8.5]} {return}
package ifneeded json::write 1.0.3 [list source [file join $dir json_write.tcl]]



|



1
2
3
4
5
6
7
# Tcl package index file, version 1.1

if {![package vsatisfies [package provide Tcl] 8.4]} {return}
package ifneeded json 1.3.3 [list source [file join $dir json.tcl]]

if {![package vsatisfies [package provide Tcl] 8.5]} {return}
package ifneeded json::write 1.0.3 [list source [file join $dir json_write.tcl]]

Changes to modules/json/tests/support.tcl.

96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
    set ERR($name) [tcltest::viewFile $f]
}

## Tcl has strict escape checking.
## C   uses Tcl_UtfBacklash, and allows lots of irregular escapes.

set FAIL(escape1)        {"\%"}
set  ERR(escape1-tcl)    {unexpected token "END" at position 0; expecting VALUE}
set  ERR(escape1-critcl) {bad escape 3 bytes before end, around ``%''}

set FAIL(escape2)        {"\."}
set  ERR(escape2-tcl)    {unexpected token "END" at position 0; expecting VALUE}
set  ERR(escape2-critcl) {bad escape 3 bytes before end, around ``.''}

set FAIL(escape3)        {["\%"]}
set  ERR(escape3-tcl)    {unexpected token "END" at position 0; expecting VALUE}
set  ERR(escape3-critcl) {bad escape 4 bytes before end, around ``%''}

set FAIL(escape4)        {["\."]}
set  ERR(escape4-tcl)    {unexpected token "END" at position 0; expecting VALUE}
set  ERR(escape4-critcl) {bad escape 4 bytes before end, around ``.''}

set FAIL(escape5)        {{"a":"\%"}}
set  ERR(escape5-tcl)    "unexpected token \"}\" at position 4; expecting VALUE"
set  ERR(escape5-critcl) {bad escape 4 bytes before end, around ``%''}

set FAIL(escape6)        {{"a":"\."}}
set  ERR(escape6-tcl)    "unexpected token \"}\" at position 4; expecting VALUE"
set  ERR(escape6-critcl) {bad escape 4 bytes before end, around ``.''}



proc resultfor {name} {
    global TCL
    transform $TCL($name) $name







|



|



|



|



|



|







96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
    set ERR($name) [tcltest::viewFile $f]
}

## Tcl has strict escape checking.
## C   uses Tcl_UtfBacklash, and allows lots of irregular escapes.

set FAIL(escape1)        {"\%"}
set  ERR(escape1-tcl)    {unexpected token ""\%"" at position 0; expecting STRING}
set  ERR(escape1-critcl) {bad escape 3 bytes before end, around ``%''}

set FAIL(escape2)        {"\."}
set  ERR(escape2-tcl)    {unexpected token ""\."" at position 0; expecting STRING}
set  ERR(escape2-critcl) {bad escape 3 bytes before end, around ``.''}

set FAIL(escape3)        {["\%"]}
set  ERR(escape3-tcl)    {unexpected token ""\%"" at position 1; expecting STRING}
set  ERR(escape3-critcl) {bad escape 4 bytes before end, around ``%''}

set FAIL(escape4)        {["\."]}
set  ERR(escape4-tcl)    {unexpected token ""\."" at position 1; expecting STRING}
set  ERR(escape4-critcl) {bad escape 4 bytes before end, around ``.''}

set FAIL(escape5)        {{"a":"\%"}}
set  ERR(escape5-tcl)    {unexpected token ""\%"" at position 3; expecting STRING}
set  ERR(escape5-critcl) {bad escape 4 bytes before end, around ``%''}

set FAIL(escape6)        {{"a":"\."}}
set  ERR(escape6-tcl)    {unexpected token ""\."" at position 3; expecting STRING}
set  ERR(escape6-critcl) {bad escape 4 bytes before end, around ``.''}



proc resultfor {name} {
    global TCL
    transform $TCL($name) $name

Changes to modules/md4/md4.man.


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

[manpage_begin md4 n 1.0.5]
[see_also md5]
[see_also sha1]
[keywords hashing]
[keywords md4]
[keywords message-digest]
[keywords {rfc 1320}]
[keywords {rfc 1321}]
[keywords {rfc 2104}]
[keywords security]
[moddesc   {MD4 Message-Digest Algorithm}]
[copyright {2003, Pat Thoyts <[email protected]>}]
[titledesc {MD4 Message-Digest Algorithm}]
[category  {Hashes, checksums, and encryption}]
[require Tcl 8.2]
[require md4 [opt 1.0]]
[description]
[para]

This package is an implementation in Tcl of the MD4 message-digest
algorithm as described in RFC 1320 (1) and (2). This algorithm takes
an arbitrary quantity of data and generates a 128-bit message digest
from the input. The MD4 algorithm is faster but potentially weaker than
>
|














|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
[vset VERSION 1.0.6]
[manpage_begin md4 n [vset VERSION]]
[see_also md5]
[see_also sha1]
[keywords hashing]
[keywords md4]
[keywords message-digest]
[keywords {rfc 1320}]
[keywords {rfc 1321}]
[keywords {rfc 2104}]
[keywords security]
[moddesc   {MD4 Message-Digest Algorithm}]
[copyright {2003, Pat Thoyts <[email protected]>}]
[titledesc {MD4 Message-Digest Algorithm}]
[category  {Hashes, checksums, and encryption}]
[require Tcl 8.2]
[require md4 [opt [vset VERSION]]]
[description]
[para]

This package is an implementation in Tcl of the MD4 message-digest
algorithm as described in RFC 1320 (1) and (2). This algorithm takes
an arbitrary quantity of data and generates a 128-bit message digest
from the input. The MD4 algorithm is faster but potentially weaker than

Changes to modules/md4/md4.tcl.

12
13
14
15
16
17
18
19
20
21
22
23
24
25
26

package require Tcl 8.2;                # tcl minimum version
catch {package require md4c 1.0};       # tcllib critcl alternative

# @mdgen EXCLUDE: md4c.tcl

namespace eval ::md4 {
    variable version 1.0.5
    variable rcsid {$Id: md4.tcl,v 1.20 2008/04/29 10:07:45 patthoyts Exp $}
    variable accel
    array set accel {critcl 0 cryptkit 0}

    namespace export md4 hmac MD4Init MD4Update MD4Final

    variable uid







|







12
13
14
15
16
17
18
19
20
21
22
23
24
25
26

package require Tcl 8.2;                # tcl minimum version
catch {package require md4c 1.0};       # tcllib critcl alternative

# @mdgen EXCLUDE: md4c.tcl

namespace eval ::md4 {
    variable version 1.0.6
    variable rcsid {$Id: md4.tcl,v 1.20 2008/04/29 10:07:45 patthoyts Exp $}
    variable accel
    array set accel {critcl 0 cryptkit 0}

    namespace export md4 hmac MD4Init MD4Update MD4Final

    variable uid
555
556
557
558
559
560
561

562
563
564
565
566
567
568
569
570
571
572
573
574
    return $r
}

# -------------------------------------------------------------------------

# Try and load a compiled extension to help.
namespace eval ::md4 {

    foreach e {critcl cryptkit} { if {[LoadAccelerator $e]} { break } }
    unset e
}

package provide md4 $::md4::version

# -------------------------------------------------------------------------
# Local Variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:









>













555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
    return $r
}

# -------------------------------------------------------------------------

# Try and load a compiled extension to help.
namespace eval ::md4 {
    variable e {}
    foreach e {critcl cryptkit} { if {[LoadAccelerator $e]} { break } }
    unset e
}

package provide md4 $::md4::version

# -------------------------------------------------------------------------
# Local Variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:


Changes to modules/md4/md4c.tcl.

18
19
20
21
22
23
24

25
26
27
28
29
30
31

critcl::cheaders md4.h
critcl::csources md4.c

namespace eval ::md4 {

    critcl::ccode {

        #include "md4.h"

        /*
         * define a Tcl object type for the MD4 state 
         */
        static Tcl_ObjType md4_type;
    







>







18
19
20
21
22
23
24
25
26
27
28
29
30
31
32

critcl::cheaders md4.h
critcl::csources md4.c

namespace eval ::md4 {

    critcl::ccode {
        #include <string.h>
        #include "md4.h"

        /*
         * define a Tcl object type for the MD4 state 
         */
        static Tcl_ObjType md4_type;
    

Changes to modules/md4/pkgIndex.tcl.

1
2
3
# This package has been tested with tcl 8.2.3 and above.
if {![package vsatisfies [package provide Tcl] 8.2]} {return}
package ifneeded md4 1.0.5 [list source [file join $dir md4.tcl]]


|
1
2
3
# This package has been tested with tcl 8.2.3 and above.
if {![package vsatisfies [package provide Tcl] 8.2]} {return}
package ifneeded md4 1.0.6 [list source [file join $dir md4.tcl]]

Changes to modules/md5/md5c.tcl.

12
13
14
15
16
17
18

19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36

critcl::cheaders md5.h;                 # The RSA header file
critcl::csources md5.c;                 # The RSA MD5 implementation.

namespace eval ::md5 {

    critcl::ccode {

        #include "md5.h"
        #include <assert.h>

        static
        Tcl_ObjType md5_type; /* fast internal access representation */
        
        static void 
        md5_free_rep(Tcl_Obj *obj)
        {
            MD5_CTX *mp = (MD5_CTX *) obj->internalRep.otherValuePtr;
            Tcl_Free(mp);
        }
        
        static void
        md5_dup_rep(Tcl_Obj *obj, Tcl_Obj *dup)
        {
            MD5_CTX *mp = (MD5_CTX *) obj->internalRep.otherValuePtr;
            dup->internalRep.otherValuePtr = Tcl_Alloc(sizeof *mp);







>










|







12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37

critcl::cheaders md5.h;                 # The RSA header file
critcl::csources md5.c;                 # The RSA MD5 implementation.

namespace eval ::md5 {

    critcl::ccode {
        #include <string.h>
        #include "md5.h"
        #include <assert.h>

        static
        Tcl_ObjType md5_type; /* fast internal access representation */
        
        static void 
        md5_free_rep(Tcl_Obj *obj)
        {
            MD5_CTX *mp = (MD5_CTX *) obj->internalRep.otherValuePtr;
            Tcl_Free((char*)mp);
        }
        
        static void
        md5_dup_rep(Tcl_Obj *obj, Tcl_Obj *dup)
        {
            MD5_CTX *mp = (MD5_CTX *) obj->internalRep.otherValuePtr;
            dup->internalRep.otherValuePtr = Tcl_Alloc(sizeof *mp);

Changes to modules/md5crypt/md5cryptc.tcl.

25
26
27
28
29
30
31

32
33
34
35
36
37
38
package provide md5cryptc 1.0

critcl::cheaders ../md5/md5.h
#critcl::csources ../md5/md5.c

namespace eval ::md5crypt {
    critcl::ccode {

#include "md5.h"
#ifdef _MSC_VER
#define snprintf _snprintf
#endif
        static unsigned char itoa64[] =
            "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
        







>







25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package provide md5cryptc 1.0

critcl::cheaders ../md5/md5.h
#critcl::csources ../md5/md5.c

namespace eval ::md5crypt {
    critcl::ccode {
#include <string.h>
#include "md5.h"
#ifdef _MSC_VER
#define snprintf _snprintf
#endif
        static unsigned char itoa64[] =
            "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
        
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
            
            /* get the length of the true salt */
            sl = ep - sp;
            
            MD5Init(&ctx);
            
            /* The password first, since that is what is most unknown */
            MD5Update(&ctx,(const unsigned char *)pw,strlen(pw));
            
            /* Then our magic string */
            MD5Update(&ctx,magic,strlen((const char *)magic));
            
            /* Then the raw salt */
            MD5Update(&ctx,sp,sl);
            
            /* Then just as many characters of the MD5(pw,salt,pw) */
            MD5Init(&ctx1);
            MD5Update(&ctx1,(const unsigned char *)pw,strlen(pw));
            MD5Update(&ctx1,sp,sl);
            MD5Update(&ctx1,(const unsigned char *)pw,strlen(pw));
            MD5Final(final,&ctx1);
            
            for(pl = strlen(pw); pl > 0; pl -= 16) {
                int tl = pl > 16 ? 16 : pl;
                MD5Update(&ctx,final,pl>16 ? 16 : pl);
            }
            
            /* Don't leave anything around in vm they could use. */
            memset(final,0,sizeof final);
            
            /* Then something really weird... */
            for (i = strlen(pw); i ; i >>= 1) {
                if(i&1)
                    MD5Update(&ctx, final, 1);
                else
                    MD5Update(&ctx, (const unsigned char *)pw, 1);
            }
            
            /* Now make the output string */
            snprintf(passwd, sizeof(passwd), "%s%.*s$", (char *)magic,
                    sl, (const char *)sp);
            
            MD5Final(final,&ctx);
            
            /*
             * and now, just to make sure things don't run too fast
             * On a 60 Mhz Pentium this takes 34 msec, so you would
             * need 30 seconds to build a 1000 entry dictionary...
             */
            for(i=0;i<1000;i++) {
                MD5Init(&ctx1);
                if(i & 1)
                    MD5Update(&ctx1,(const unsigned char *)pw,strlen(pw));
                else
                    MD5Update(&ctx1,final,16);
                
                if(i % 3)
                    MD5Update(&ctx1,sp,sl);
                
                if(i % 7)
                    MD5Update(&ctx1,pw,strlen(pw));
                
                if(i & 1)
                    MD5Update(&ctx1,final,16);
                else
                    MD5Update(&ctx1,pw,strlen(pw));
                MD5Final(final,&ctx1);
            }

            p = passwd + strlen(passwd);
            
            l = (final[ 0]<<16) | (final[ 6]<<8) | final[12]; to64(p,l,4); p += 4;
            l = (final[ 1]<<16) | (final[ 7]<<8) | final[13]; to64(p,l,4); p += 4;







|


|


|



|
|
|















|
















|




|


|




|







77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
            
            /* get the length of the true salt */
            sl = ep - sp;
            
            MD5Init(&ctx);
            
            /* The password first, since that is what is most unknown */
            MD5Update(&ctx,(unsigned char *)pw,strlen(pw));
            
            /* Then our magic string */
            MD5Update(&ctx,(unsigned char *)magic,strlen((const char *)magic));
            
            /* Then the raw salt */
            MD5Update(&ctx,(unsigned char*)sp,sl);
            
            /* Then just as many characters of the MD5(pw,salt,pw) */
            MD5Init(&ctx1);
            MD5Update(&ctx1,(unsigned char *)pw,strlen(pw));
            MD5Update(&ctx1,(unsigned char *)sp,sl);
            MD5Update(&ctx1,(unsigned char *)pw,strlen(pw));
            MD5Final(final,&ctx1);
            
            for(pl = strlen(pw); pl > 0; pl -= 16) {
                int tl = pl > 16 ? 16 : pl;
                MD5Update(&ctx,final,pl>16 ? 16 : pl);
            }
            
            /* Don't leave anything around in vm they could use. */
            memset(final,0,sizeof final);
            
            /* Then something really weird... */
            for (i = strlen(pw); i ; i >>= 1) {
                if(i&1)
                    MD5Update(&ctx, final, 1);
                else
                    MD5Update(&ctx, (unsigned char *)pw, 1);
            }
            
            /* Now make the output string */
            snprintf(passwd, sizeof(passwd), "%s%.*s$", (char *)magic,
                    sl, (const char *)sp);
            
            MD5Final(final,&ctx);
            
            /*
             * and now, just to make sure things don't run too fast
             * On a 60 Mhz Pentium this takes 34 msec, so you would
             * need 30 seconds to build a 1000 entry dictionary...
             */
            for(i=0;i<1000;i++) {
                MD5Init(&ctx1);
                if(i & 1)
                    MD5Update(&ctx1,(unsigned char *)pw,strlen(pw));
                else
                    MD5Update(&ctx1,final,16);
                
                if(i % 3)
                    MD5Update(&ctx1,(unsigned char *)sp,sl);
                
                if(i % 7)
                    MD5Update(&ctx1,(unsigned char *)pw,strlen(pw));
                
                if(i & 1)
                    MD5Update(&ctx1,final,16);
                else
                    MD5Update(&ctx1,(unsigned char *)pw,strlen(pw));
                MD5Final(final,&ctx1);
            }

            p = passwd + strlen(passwd);
            
            l = (final[ 0]<<16) | (final[ 6]<<8) | final[12]; to64(p,l,4); p += 4;
            l = (final[ 1]<<16) | (final[ 7]<<8) | final[13]; to64(p,l,4); p += 4;

Changes to modules/ncgi/ncgi.man.


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

[manpage_begin ncgi n 1.4.2]
[see_also html]
[keywords CGI]
[keywords cookie]
[keywords form]
[keywords html]
[comment {-*- tcl -*- doctools manpage}]
[moddesc   {CGI Support}]
[titledesc {Procedures to manipulate CGI values.}]
[category  {CGI programming}]
[require Tcl 8.4]
[require ncgi [opt 1.4.2]]
[description]
[para]

The [package ncgi] package provides commands that manipulate CGI
values.  These are values that come from Web forms and are processed
either by CGI scripts or web pages with embedded Tcl code.  Use the
[package ncgi] package to query these values, set and get cookies, and
>
|










|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
[vset VERSION 1.4.3]
[manpage_begin ncgi n [vset VERSION]]
[see_also html]
[keywords CGI]
[keywords cookie]
[keywords form]
[keywords html]
[comment {-*- tcl -*- doctools manpage}]
[moddesc   {CGI Support}]
[titledesc {Procedures to manipulate CGI values.}]
[category  {CGI programming}]
[require Tcl 8.4]
[require ncgi [opt [vset VERSION]]]
[description]
[para]

The [package ncgi] package provides commands that manipulate CGI
values.  These are values that come from Web forms and are processed
either by CGI scripts or web pages with embedded Tcl code.  Use the
[package ncgi] package to query these values, set and get cookies, and

Changes to modules/ncgi/ncgi.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
# ncgi.tcl
#
# Basic support for CGI programs
#
# Copyright (c) 2000 Ajuba Solutions.
# Copyright (c) 2012 Richard Hipp, Andreas Kupries
# Copyright (c) 2013 Andreas Kupries
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.


# Please note that Don Libes' has a "cgi.tcl" that implements version 1.0
# of the cgi package.  That implementation provides a bunch of cgi_ procedures






|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
# ncgi.tcl
#
# Basic support for CGI programs
#
# Copyright (c) 2000 Ajuba Solutions.
# Copyright (c) 2012 Richard Hipp, Andreas Kupries
# Copyright (c) 2013-2014 Andreas Kupries
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.


# Please note that Don Libes' has a "cgi.tcl" that implements version 1.0
# of the cgi package.  That implementation provides a bunch of cgi_ procedures
24
25
26
27
28
29
30

31
32
33
34
35
36
37
38
39
# The query data is composed of names and values, and the names can be
# repeated.  The names and values are encoded, and this module takes care
# of decoding them.

# We use newer string routines
package require Tcl 8.4
package require fileutil ; # Required by importFile.


package provide ncgi 1.4.2

namespace eval ::ncgi {

    # "query" holds the raw query (i.e., form) data
    # This is treated as a cache, too, so you can call ncgi::query more than
    # once








>

|







24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# The query data is composed of names and values, and the names can be
# repeated.  The names and values are encoded, and this module takes care
# of decoding them.

# We use newer string routines
package require Tcl 8.4
package require fileutil ; # Required by importFile.
package require uri

package provide ncgi 1.4.3

namespace eval ::ncgi {

    # "query" holds the raw query (i.e., form) data
    # This is treated as a cache, too, so you can call ncgi::query more than
    # once

724
725
726
727
728
729
730
731



732
733
734
735
736
737
738
	# proto		http or https
	# server 	The server, which we are careful to match with the
	#		current one in base Basic Authentication is being used.
	# port		This is set if it is not the default port.

	if {[info exists env(REQUEST_URI)]} {
	    # Not all servers have the leading protocol spec
	    regsub -- {^https?://[^/]*/} $env(REQUEST_URI) / request_uri



	} elseif {[info exists env(SCRIPT_NAME)]} {
	    set request_uri $env(SCRIPT_NAME)
	} else {
	    set request_uri /
	}

	set port ""







|
>
>
>







725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
	# proto		http or https
	# server 	The server, which we are careful to match with the
	#		current one in base Basic Authentication is being used.
	# port		This is set if it is not the default port.

	if {[info exists env(REQUEST_URI)]} {
	    # Not all servers have the leading protocol spec
	    #regsub -- {^https?://[^/]*/} $env(REQUEST_URI) / request_uri
	    array set u [uri::split $env(REQUEST_URI)]
	    set request_uri /$u(path)
	    unset u
	} elseif {[info exists env(SCRIPT_NAME)]} {
	    set request_uri $env(SCRIPT_NAME)
	} else {
	    set request_uri /
	}

	set port ""

Changes to modules/ncgi/ncgi.test.

300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
	}
	exit
    } $sub_ap $cmdlFile $futlFile $ncgiFile $URL] test1
    set f [open "|[list $::tcltest::tcltest test1]" r+]
    set res [read $f]
    close $f
    removeFile test1
set res
} "Content-Type: text/html\nLocation: $URL\n\nPlease go to <a href=\"$URL\">$URL</a>\n"

set URL /elsewhere/foo.html
set URL2 http://www/elsewhere/foo.html
test ncgi-11.2 {ncgi::redirect} {
    set env(REQUEST_URI) http://www/cgi-bin/test.cgi
    set env(REQUEST_METHOD) GET







|







300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
	}
	exit
    } $sub_ap $cmdlFile $futlFile $ncgiFile $URL] test1
    set f [open "|[list $::tcltest::tcltest test1]" r+]
    set res [read $f]
    close $f
    removeFile test1
    set res
} "Content-Type: text/html\nLocation: $URL\n\nPlease go to <a href=\"$URL\">$URL</a>\n"

set URL /elsewhere/foo.html
set URL2 http://www/elsewhere/foo.html
test ncgi-11.2 {ncgi::redirect} {
    set env(REQUEST_URI) http://www/cgi-bin/test.cgi
    set env(REQUEST_METHOD) GET
439
440
441
442
443
444
445





























446
447
448
449
450
451
452
    } $sub_ap $cmdlFile $futlFile $ncgiFile $URL] test1
    set f [open "|[list $::tcltest::tcltest test1]" r+]
    set res [read $f]
    close $f
    removeFile test1
    set res
} "Content-Type: text/html\nLocation: $URL2\n\nPlease go to <a href=\"$URL2\">$URL2</a>\n"






























test ncgi-12.1 {ncgi::header} {
    makeFile [format {
	set auto_path {%s}
	if {[catch {
	    source %s
	    source %s







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
    } $sub_ap $cmdlFile $futlFile $ncgiFile $URL] test1
    set f [open "|[list $::tcltest::tcltest test1]" r+]
    set res [read $f]
    close $f
    removeFile test1
    set res
} "Content-Type: text/html\nLocation: $URL2\n\nPlease go to <a href=\"$URL2\">$URL2</a>\n"

set URL  login.tcl
set URL2 https://foo.com/cgi-bin/login.tcl
test ncgi-11.7 {ncgi::redirect} {
    set env(REQUEST_URI) https://foo.com/cgi-bin/view.tcl?path=/a/b/c
    set env(REQUEST_METHOD) GET
    set env(QUERY_STRING) {}
    set env(SERVER_NAME) foo.com
    set env(SERVER_PORT) 443
    set env(HTTPS) "on"
    makeFile [format {
	set auto_path {%s}
	if {[catch {
	    source %s
	    source %s
	    source %s
	    ncgi::redirect %s
	} err]} {
	    puts $err
	}
	exit
    } $sub_ap $cmdlFile $futlFile $ncgiFile $URL] test1
    set f [open "|[list $::tcltest::tcltest test1]" r+]
    set res [read $f]
    close $f
    removeFile test1
    set res
} "Content-Type: text/html\nLocation: $URL2\n\nPlease go to <a href=\"$URL2\">$URL2</a>\n"


test ncgi-12.1 {ncgi::header} {
    makeFile [format {
	set auto_path {%s}
	if {[catch {
	    source %s
	    source %s

Changes to modules/ncgi/pkgIndex.tcl.

1
2
if {![package vsatisfies [package provide Tcl] 8.4]} {return}
package ifneeded ncgi 1.4.2 [list source [file join $dir ncgi.tcl]]

|
1
2
if {![package vsatisfies [package provide Tcl] 8.4]} {return}
package ifneeded ncgi 1.4.3 [list source [file join $dir ncgi.tcl]]

Added modules/pt/examples/arithmetic.peg.

















































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
PEG arithmetic (Expression)

# TODO: testcases
# TODO: insert spacing. (another case of inclusion, to allow for comments).

# PEG extension:
# - Grammar inclusion.
#   Here it would be really nice to have the Numbers definition from
#   the number.peg example instead of having to define our own.

	Expression	<-	Term					;
	Term		<-	Factor (Additive Factor)*		;
	Additive	<-	[-+]					;
	Factor		<-	Primary (Multiplicative Primary)*	;
	Multiplicative	<-	[*/]
	Primary		<-	Lparens Expression Rparens
			/	Negative
			/	Number
			/	Variable
			;
	Negative	<-	Negation Primary			;
void:	Negation	<-	'-'					;
void:	Lparens		<-	'('					;
void:	Rparens		<-	')'					;

	Number		<-	<ddigit>+				;
	Variable	<-	<alpha> <alnum>*

# Notes:
#	Negative is a type of prefix operator. We may have others.
#	We can have suffix operators as well.
#	The relational operators were left out.
#	The operator priorities are encoded in the grammar.
#	Changing the priorities requires recoding.
#	Might be useful to generally code the priority levels and
#	then attach the various operators to the priority symbols.
#	Changing priorities then just means shuffling their attachment.

END;

Added modules/pt/examples/c.peg.

Added modules/pt/examples/csv.peg.









































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
PEG csv (Data)

	Data		<-	Line (EOL Line)* EOF		;
	Line		<-	Space Field (Separator Field)*	;
	Field		<-	Quoted
			/	Escaped
			/	Simple
			;
	Quoted		<-	Dquote Escaped Dquote Space			;
leaf:	Escaped		<-	Sub (Dquote Dquote Sub)*			;
leaf:	Simple		<-	(!EOF !EOL !Space !',' !Dquote .)+ Space	;

void:	Sub		<-	(!Dquote !EOF .)+	;
void:	Dquote		<-	'"'			;
void:	Space		<-	[ \t]*			;
void:	Separator	<-	',' Space		;
void:	EOL		<-	[\n\r]*			;
void:	EOF		<-	!.			;

END;

Added modules/pt/examples/json.peg.































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
PEG json (Space Value Space)
# TODO: test cases. Compare against the Bison grammar and parser.
# TODO: performance. Against Tcl, and Bison grammar and parser.

# TODO: whitespace

Value	<-	     String
	/	     Number
	/	     Object
	/	     Array
	/	     True
	/	     False
	/	     Null
	;

	String	<-	'"' Str '"'	;
leaf:	Str	<-	Char*		;
	Char	<-	Escaped
		/	Plain
		;
	Plain	<-	(!["\] .)+	;
	Escaped	<-	"\\" ( [bfnrt"/\] 
		     	     / "u" <xdigit> <xdigit> <xdigit> <xdigit>)
		;

leaf:	Number	<-	Integer Fract? Exp?	;
	Integer	<-	'0'
		/	[1-9] <ddigit>*
		;
	Fract	<-	('.' <ddigit>*)		;
	Exp	<-	[eE] Sign <ddigit>+	;
	Sign	<-	[-+]?	  		;

	Object	<-	Space '{' (Space Map (Space "," Space Map)*)? Space '}'
		;
	Map	<-	String Space ":" Space Value
		;
	Array	<-	Space '[' (Space Value (Space "," Space Value)*)? Space ']'
		;
leaf:	True	<-	"true"	;
leaf:	False	<-	"false"	;
leaf:	Null	<-	"null"	;

void:	Space	<-	<space>*
		;

END;

Added modules/pt/examples/markdown.peg.











































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
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

# https://github.com/jgm/peg-markdown - Testsuite.
# http://piumarta.com/software/peg/

PEG markdown (Document)

	Document	<-	BOM? Block*	;

	Block		<-	BlankLine*
			(	BlockQuote
			/	Verbatim
			/	Note
			/	Reference
			/	HorizontalRule
			/	Heading		#
			/	OrderedList
			/	BulletList
			/	HtmlBlock
			/	StyleBlock
			/	Paragraph	#
			/	Inlines
			)			;

	Paragraph	<-	NonindentSpace
				Inlines
				BlankLine+	;

	AtxInline	<-	!EOL !(MaybeSpace '#'* MaybeSpace EOL) Inline		;
leaf:	AtxStart	<-	"######" / "#####" / "####" / "###" / "##" / "#"	;
	AtxHeading	<-	AtxStart MaybeSpace AtxInline+ AtxCloser EOL		;
void:	AtxCloser	<-	(MaybeSpace '#'* MaybeSpace)?				;

	SetextHeading	<-	SetextHeading1
			/	SetextHeading2
			;
	SetextHeading1	<-	SetextGuard1 SetextInline SetextBottom1	;
	SetextHeading2	<-	SetextGuard2 SetextInline SetextBottom2	;

	SetextGuard1	<-	&(RawLine SetextBottom1)	;
	SetextGuard2	<-	&(RawLine SetextBottom2)	;

	SetextBottom1	<-	'='+ EOL	;
	SetextBottom2	<-	'-'+ EOL	;

	SetextInline	<-	(!Endline Inline)+ MaybeSpace EOL	;

	Heading		<-	SetextHeading
			/	AtxHeading
			;

	BlockQuote	<-	(( '>' ' '? Line)
				 ( !'>' !BlankLine Line)*
				 BlankLine*)+
			;

	NonblankIndentedLine
			<-	!BlankLine IndentedLine			;
	VerbatimSegment	<-	BlankLine* NonblankIndentedLine+	;
	Verbatim	<-	VerbatimSegment+				;

	HorizontalRule	<-	NonindentSpace
		 		( '*' MaybeSpace '*' MaybeSpace '*' (MaybeSpace '*')*
		 		/ '-' MaybeSpace '-' MaybeSpace '-' (MaybeSpace '-')*
		 		/ '_' MaybeSpace '_' MaybeSpace '_' (MaybeSpace '_')*
				)
		 		MaybeSpace EOL BlankLine+
			;

	Bullet		<-	!HorizontalRule NonindentSpace [+*-] SomeSpace	;
	BulletList	<-	&Bullet (ListTight / ListLoose)			;

	Enumerator	<-	NonindentSpace Digit+ '.' SomeSpace		;
	OrderedList	<-	&Enumerator (ListTight / ListLoose)		;

	ListTight	<-	ListItemTight+ BlankLine* !ListItemEntry	;
	ListLoose	<-	(ListItem BlankLine*)+				;

	ListItem	<-	ListItemEntry
	    	    		ListBlock
	    			ListContinuationBlock*
			;
	ListItemTight	<-	ListItemEntry
	    			ListBlock
	    			(!BlankLine ListContinuationBlock)*
	    			!ListContinuationBlock
			;
	ListBlock	<-	!BlankLine Line ListBlockLine*	;
	ListContinuationBlock
			<-	BlankLines (Indent ListBlock)+	;

	ListBlockLine	<-	!BlankLine
				!(Indent? ListItemEntry)
				!HorizontalRule
				OptionallyIndentedLine
			;
	ListItemEntry	<-	Bullet
			/	Enumerator
			;


	# Parsers for different kinds of block-level HTML content.
	# This is repetitive due to constraints of PEG grammar.

	HAddress		<-	"address"	/ "ADDRESS"		;
	HBlockquote		<-	"blockquote"	/ "BLOCKQUOTE"		;
	HCenter			<-	"center"	/ "CENTER"		;
	HDir			<-	"dir"		/ "DIR"			;
	HDiv			<-	"div"		/ "DIV"			;
	HDl			<-	"dl"		/ "DL"			;
	HFieldset		<-	"fieldset"	/ "FIELDSET"		;
	HForm			<-	"form"		/ "FORM"		;
	HH1			<-	"h1"		/ "H1"			;
	HH2			<-	"h2"		/ "H2"			;
	HH3			<-	"h3"		/ "H3"			;
	HH4			<-	"h4"		/ "H4"			;
	HH5			<-	"h5"		/ "H5"			;
	HH6			<-	"h6"		/ "H6"			;

	HtmlOpenAddress		<-	TagStart HAddress	OpenTagEnd	;
	HtmlOpenBlockquote	<-	TagStart HBlockquote	OpenTagEnd	;
	HtmlOpenCenter		<-	TagStart HCenter	OpenTagEnd	;
	HtmlOpenDir		<-	TagStart HDir		OpenTagEnd	;
	HtmlOpenDiv		<-	TagStart HDiv		OpenTagEnd	;
	HtmlOpenDl		<-	TagStart HDl		OpenTagEnd	;
	HtmlOpenFieldset	<-	TagStart HFieldset	OpenTagEnd	;
	HtmlOpenForm		<-	TagStart HForm		OpenTagEnd	;
	HtmlOpenH1		<-	TagStart HH1		OpenTagEnd	;
	HtmlOpenH2		<-	TagStart HH2		OpenTagEnd	;
	HtmlOpenH3		<-	TagStart HH3		OpenTagEnd	;
	HtmlOpenH4		<-	TagStart HH4		OpenTagEnd	;
	HtmlOpenH5		<-	TagStart HH5		OpenTagEnd	;
	HtmlOpenH6		<-	TagStart HH6		OpenTagEnd	;
	HtmlOpenMenu		<-	TagStart ("menu" / "MENU") OpenTagEnd
	HtmlOpenNoframes	<-	TagStart ("noframes" / "NOFRAMES") OpenTagEnd
	HtmlOpenNoscript	<-	TagStart ("noscript" / "NOSCRIPT") OpenTagEnd
	HtmlOpenOl		<-	TagStart ("ol" / "OL") OpenTagEnd
	HtmlOpenP		<-	TagStart ("p" / "P") OpenTagEnd
	HtmlOpenPre		<-	TagStart ("pre" / "PRE") OpenTagEnd
	HtmlOpenTable		<-	TagStart ("table" / "TABLE") OpenTagEnd
	HtmlOpenUl		<-	TagStart ("ul" / "UL") OpenTagEnd
	HtmlOpenDd		<-	TagStart ("dd" / "DD") OpenTagEnd
	HtmlOpenDt		<-	TagStart ("dt" / "DT") OpenTagEnd
	HtmlOpenFrameset	<-	TagStart ("frameset" / "FRAMESET") OpenTagEnd
	HtmlOpenLi		<-	TagStart ("li" / "LI") OpenTagEnd
	HtmlOpenTbody		<-	TagStart ("tbody" / "TBODY") OpenTagEnd
	HtmlOpenTd		<-	TagStart ("td" / "TD") OpenTagEnd
	HtmlOpenTfoot		<-	TagStart ("tfoot" / "TFOOT") OpenTagEnd

	HtmlCloseAddress	<-	CloseTagStart HAddress		TagEnd	;
	HtmlCloseBlockquote	<-	CloseTagStart HBlockquote	TagEnd	;
	HtmlCloseCenter		<-	CloseTagStart HCenter		TagEnd	;
	HtmlCloseDir		<-	CloseTagStart HDir		TagEnd	;
	HtmlCloseDiv		<-	CloseTagStart HDiv		TagEnd	;
	HtmlCloseDl		<-	CloseTagStart HDl		TagEnd	;
	HtmlCloseFieldset	<-	CloseTagStart HFieldset 	TagEnd	;
	HtmlCloseForm		<-	CloseTagStart HForm		TagEnd	;
	HtmlCloseH1		<-	CloseTagStart HH1		TagEnd	;
	HtmlCloseH2		<-	CloseTagStart HH2		TagEnd	;
	HtmlCloseH3		<-	CloseTagStart HH3		TagEnd	;
	HtmlCloseH4		<-	CloseTagStart HH4		TagEnd	;
	HtmlCloseH5		<-	CloseTagStart HH5		TagEnd	;
	HtmlCloseH6		<-	CloseTagStart HH6		TagEnd	;
	HtmlCloseMenu		<-	CloseTagStart ("menu" / "MENU") TagEnd
	HtmlCloseNoframes	<-	CloseTagStart ("noframes" / "NOFRAMES") TagEnd
	HtmlCloseNoscript	<-	CloseTagStart ("noscript" / "NOSCRIPT") TagEnd
	HtmlCloseOl		<-	CloseTagStart ("ol" / "OL") TagEnd
	HtmlCloseP		<-	CloseTagStart ("p" / "P") TagEnd
	HtmlClosePre		<-	CloseTagStart ("pre" / "PRE") TagEnd
	HtmlCloseTable		<-	CloseTagStart ("table" / "TABLE") TagEnd
	HtmlCloseUl		<-	CloseTagStart ("ul" / "UL") TagEnd
	HtmlCloseDd		<-	CloseTagStart ("dd" / "DD") TagEnd
	HtmlCloseDt		<-	CloseTagStart ("dt" / "DT") TagEnd
	HtmlCloseFrameset	<-	CloseTagStart ("frameset" / "FRAMESET") TagEnd
	HtmlCloseLi		<-	CloseTagStart ("li" / "LI") TagEnd
	HtmlCloseTbody		<-	CloseTagStart ("tbody" / "TBODY") TagEnd
	HtmlCloseTd		<-	CloseTagStart ("td" / "TD") TagEnd
	HtmlCloseTfoot		<-	CloseTagStart ("tfoot" / "TFOOT") TagEnd

	HtmlAddress		<-	HtmlOpenAddress	   (HtmlAddress    / !HtmlCloseAddress    .)* HtmlCloseAddress		;
	HtmlBlockquote		<-	HtmlOpenBlockquote (HtmlBlockquote / !HtmlCloseBlockquote .)* HtmlCloseBlockquote	;
	HtmlCenter		<-	HtmlOpenCenter     (HtmlCenter     / !HtmlCloseCenter     .)* HtmlCloseCenter		;
	HtmlDir			<-	HtmlOpenDir        (HtmlDir        / !HtmlCloseDir        .)* HtmlCloseDir		;
	HtmlDiv			<-	HtmlOpenDiv        (HtmlDiv        / !HtmlCloseDiv        .)* HtmlCloseDiv		;
	HtmlDl			<-	HtmlOpenDl         (HtmlDl         / !HtmlCloseDl         .)* HtmlCloseDl		;
	HtmlFieldset		<-	HtmlOpenFieldset   (HtmlFieldset   / !HtmlCloseFieldset   .)* HtmlCloseFieldset		;
	HtmlForm		<-	HtmlOpenForm       (HtmlForm       / !HtmlCloseForm       .)* HtmlCloseForm		;
	HtmlH1			<-	HtmlOpenH1         (HtmlH1         / !HtmlCloseH1         .)* HtmlCloseH1		;
	HtmlH2			<-	HtmlOpenH2         (HtmlH2         / !HtmlCloseH2         .)* HtmlCloseH2		;
	HtmlH3			<-	HtmlOpenH3         (HtmlH3         / !HtmlCloseH3         .)* HtmlCloseH3		;
	HtmlH4			<-	HtmlOpenH4         (HtmlH4         / !HtmlCloseH4         .)* HtmlCloseH4		;
	HtmlH5			<-	HtmlOpenH5         (HtmlH5         / !HtmlCloseH5         .)* HtmlCloseH5		;
	HtmlH6			<-	HtmlOpenH6         (HtmlH6         / !HtmlCloseH6         .)* HtmlCloseH6		;
	HtmlMenu		<-	HtmlOpenMenu (HtmlMenu / !HtmlCloseMenu .)* HtmlCloseMenu
	HtmlNoframes		<-	HtmlOpenNoframes (HtmlNoframes / !HtmlCloseNoframes .)* HtmlCloseNoframes
	HtmlNoscript		<-	HtmlOpenNoscript (HtmlNoscript / !HtmlCloseNoscript .)* HtmlCloseNoscript
	HtmlOl			<-	HtmlOpenOl (HtmlOl / !HtmlCloseOl .)* HtmlCloseOl
	HtmlP			<-	HtmlOpenP (HtmlP / !HtmlCloseP .)* HtmlCloseP
	HtmlPre			<-	HtmlOpenPre (HtmlPre / !HtmlClosePre .)* HtmlClosePre
	HtmlTable		<-	HtmlOpenTable (HtmlTable / !HtmlCloseTable .)* HtmlCloseTable
	HtmlUl			<-	HtmlOpenUl (HtmlUl / !HtmlCloseUl .)* HtmlCloseUl
	HtmlDd			<-	HtmlOpenDd (HtmlDd / !HtmlCloseDd .)* HtmlCloseDd
	HtmlDt			<-	HtmlOpenDt (HtmlDt / !HtmlCloseDt .)* HtmlCloseDt
	HtmlFrameset		<-	HtmlOpenFrameset (HtmlFrameset / !HtmlCloseFrameset .)* HtmlCloseFrameset
	HtmlLi			<-	HtmlOpenLi (HtmlLi / !HtmlCloseLi .)* HtmlCloseLi
	HtmlTbody		<-	HtmlOpenTbody (HtmlTbody / !HtmlCloseTbody .)* HtmlCloseTbody
	HtmlTd			<-	HtmlOpenTd (HtmlTd / !HtmlCloseTd .)* HtmlCloseTd
	HtmlTfoot		<-	HtmlOpenTfoot (HtmlTfoot / !HtmlCloseTfoot .)* HtmlCloseTfoot

	HtmlOpenTh		<-	TagStart ("th" / "TH") OpenTagEnd
	HtmlCloseTh		<-	CloseTagStart ("th" / "TH") TagEnd
	HtmlTh			<-	HtmlOpenTh (HtmlTh / !HtmlCloseTh .)* HtmlCloseTh

	HtmlOpenThead		<-	TagStart ("thead" / "THEAD") OpenTagEnd
	HtmlCloseThead		<-	CloseTagStart ("thead" / "THEAD") TagEnd
	HtmlThead		<-	HtmlOpenThead (HtmlThead / !HtmlCloseThead .)* HtmlCloseThead

	HtmlOpenTr		<-	TagStart ("tr" / "TR") OpenTagEnd
	HtmlCloseTr		<-	CloseTagStart ("tr" / "TR") TagEnd
	HtmlTr			<-	HtmlOpenTr (HtmlTr / !HtmlCloseTr .)* HtmlCloseTr

	HtmlOpenScript		<-	TagStart ("script" / "SCRIPT") OpenTagEnd
	HtmlCloseScript		<-	CloseTagStart ("script" / "SCRIPT") TagEnd
	HtmlScript		<-	HtmlOpenScript (!HtmlCloseScript .)* HtmlCloseScript

	HtmlOpenHead		<-	TagStart ("head" / "HEAD") OpenTagEnd
	HtmlCloseHead		<-	CloseTagStart ("head" / "HEAD") TagEnd
	HtmlHead		<-	HtmlOpenHead (!HtmlCloseHead .)* HtmlCloseHead

	HtmlBlockInTags	<-	HtmlAddress
			/	HtmlBlockquote
			/	HtmlCenter
			/	HtmlDir
			/	HtmlDiv
			/	HtmlDl
			/	HtmlFieldset
			/	HtmlForm
			/	HtmlH1
			/	HtmlH2
			/	HtmlH3
			/	HtmlH4
			/	HtmlH5
			/	HtmlH6
			/	HtmlMenu
			/	HtmlNoframes
			/	HtmlNoscript
			/	HtmlOl
			/	HtmlP
			/	HtmlPre
			/	HtmlTable
			/	HtmlUl
			/	HtmlDd
			/	HtmlDt
			/	HtmlFrameset
			/	HtmlLi
			/	HtmlTbody
			/	HtmlTd
			/	HtmlTfoot
			/	HtmlTh
			/	HtmlThead
			/	HtmlTr
			/	HtmlScript
			/	HtmlHead
			;

	HtmlBlock	<-	HtmlBlockRaw BlankLine+	;
leaf:	HtmlBlockRaw	<-	HtmlBlockInTags
			/	HtmlComment
			/	HtmlBlockSelfClosing
			;
	HtmlBlockSelfClosing
			<-	TagStart HtmlBlockType SingleTagEnd	;

	HtmlBlockType	<-	HAddress
			/	HBlockquote
			/	HCenter
			/	HDir	 
			/	HDiv	 
			/	HDl	 
			/	HFieldset
			/	HForm
			/	HH1  
			/	HH2  
			/	HH3  
			/	HH4
			/	HH5
			/	HH6

 / "hr" / "isindex" / "menu" / "noframes" / "noscript" / "ol" / "p" / "pre" / "table" /
		"ul" / "dd" / "dt" / "frameset" / "li" / "tbody" / "td" / "tfoot" / "th" / "thead" / "tr" / "script" /
		"ADDRESS" / "BLOCKQUOTE" / "CENTER" / "DIR" / "DIV" / "DL" / "FIELDSET" / "FORM" / "H1" / "H2" / "H3" /
		"H4" / "H5" / "H6" / "HR" / "ISINDEX" / "MENU" / "NOFRAMES" / "NOSCRIPT" / "OL" / "P" / "PRE" / "TABLE" /
		"UL" / "DD" / "DT" / "FRAMESET" / "LI" / "TBODY" / "TD" / "TFOOT" / "TH" / "THEAD" / "TR" / "SCRIPT"
			;


	HStyle		<-	"style" / "STYLE"			;
	StyleOpen	<-	TagStart HStyle OpenTagEnd		;
	StyleClose	<-	CloseTagStart HStyle TagEnd		;
leaf:	InStyleTags	<-	StyleOpen (!StyleClose .)* StyleClose	;
	StyleBlock	<-	InStyleTags BlankLine*			;

	Inlines		<-	( !Endline Inline
				/ Endline &Inline)+ Endline?
			;

	Inline		<-	String		
			/	Endline		
			/	UlOrStarLine	
			/	SomeSpace	
			/	Strong		
			/	Emphasis	
			/	Strikeout	
			/	Image		
			/	Link		
			/	NoteReference
			/	InlineNote
			/	CodeBlock
			/	RawHtml
			/	Entity
			/	EscapedChar	
			/	Smart
			/	Symbol
			;

#	nc+ => element, nc/_+ => element
leaf:	String		<-	NormalChar+ StrSegment*			;
	StrSegment	<-	(NormalChar / '_'+ &Alphanumeric)+
			/	AposSegment
			;
	AposSegment	<-	SingleQuote &Alphanumeric	;
	EscapedChar	<-	'\\' !EOL EscapedValue		;
leaf:	EscapedValue	<-	[-\\`/*_{}[\]()#+.!><]		;

	Entity		<-	HexEntity
			/	DecEntity
			/	CharEntity
			;
	Endline		<-	LineBreak
			/	TerminalEndline
			/	NormalEndline
			;
	NormalEndline	<-	MaybeSpace EOL !BlankLine !'>' !AtxStart !(Line ('='+ / '-'+) EOL)	;
	TerminalEndline	<-	MaybeSpace EOL EOF	;
	LineBreak	<-	"  " NormalEndline	;

leaf:	Symbol		<-	SpecialChar	;

# This should keep the parser from getting bogged down on long strings
# of '*' or '_', or strings of '*' or '_' with space on each side:

leaf:	UlOrStarLine	<-	UnderLine
			/	StarLine
			;
	StarLine	<-	"****" '*'*
			/	Space '*'+ &Space
			;
	UnderLine	<-	"____" '_'* >
			/	Space '_'+ &Space
			;

	Emphasis	<-	EmphasisStar
			/	EmphasisUl
			;

	EmphasisStar	<-	EmphStarMark !Whitespace (!EmphStarMark Inline / StrongStar)+ EmphStarMark	;
	EmphasisUl	<-	EmphUlMark   !Whitespace (!EmphUlMark   Inline / StrongUl)+   EmphUlMark	;

	Strong		<-	StrongStar
			/	StrongUl
			;
	StrongStar	<-	StrongStarMark !Whitespace (!StrongStarMark Inline)+ StrongStarMark	;
	StrongUl	<-	StrongUlMark   !Whitespace (!StrongUlMark   Inline)+ StrongUlMark	;

	Strikeout	<-	StrikeMark     !Whitespace (!StrikeMark     Inline)+ StrikeMark		;

	EmphStarMark	<-	"*"	;
	EmphUlMark	<-	"_"	;
	StrongStarMark	<-	"**"	;
	StrongUlMark	<-	"__"	;
	StrikeMark	<-	"~~"	;


	Image		<-	'!' (	ExplicitLink
				    /	ReferenceLink
				)	;
	Link		<-	ExplicitLink
			/	ReferenceLink
			/	AutoLink
			;

	ReferenceLink	<-	RefLinkDouble
			/	RefLinkSingle
			;
# keep skipspace information?
	RefLinkDouble	<-	Label SkipSpace !"[]" Label	;
	RefLinkSingle	<-	Label (SkipSpace "[]")?		;

	ExplicitLink	<-	Label '(' MaybeSpace Source SkipSpace Title MaybeSpace ')'	;
	Source		<-	'<' SourceContents '>'
			/	SourceContents
			;
	SourceContents	<-	(	(!'(' !')' !'>' NotSpace)+
				/ 	'(' SourceContents ')'
				)*
			;
	Title		<-	TitleSingle
			/	TitleDouble
			/	""
			;
	TitleSingle	<-	SingleQuote TitleSString SingleQuote	;
	TitleDouble	<-	DoubleQuote TitleDString DoubleQuote	;

	TitleSString	<-	(!(SingleQuote MaybeSpace (')' / EOL)) .)*	;
	TitleDString	<-	(!(DoubleQuote MaybeSpace (')' / EOL)) .)* 	;

	AutoLink	<-	AutoLinkUrl
			/	AutoLinkEmail
			;
	AutoLinkUrl	<-	'<' LinkUrl              '>'	;
	AutoLinkEmail	<-	'<' "mailto:"? LinkEmail '>'	;

	LinkUrl		<-	[A-Za-z]+ "://" (!EOL !'>' .)+			;
	LinkEmail	<-	[-A-Za-z0-9+_./!%~$]+ '@' (!EOL !'>' .)+	;

	Reference	<-	NonindentSpace !"[]" Label ':'
				SkipSpace RefSrc RefTitle BlankLine+
			;

	Label		<-	'[' (!'^' / &.) LabelValue ']'	;
	LabelValue	<-	(!']' Inline)*			;

leaf:	RefSrc		<-	NotSpace+	;
	RefTitle	<-	RefTitleSingle
			/	RefTitleDouble
			/	RefTitleParens
			/	EmptyTitle
			;
leaf:	EmptyTitle	<-	""	;

	RefTitleSingle	<-	SkipSpace SingleQuote RefTitleSString SingleQuote	;
	RefTitleDouble	<-	SkipSpace DoubleQuote RefTitleDString DoubleQuote	;
	RefTitleParens	<-	SkipSpace '('         RefTitlePString ')'		;

	RefTitleSString	<-	(!(SingleQuote MaybeSpace EOL / EOL) .)*	;
	RefTitleDString	<-	(!(DoubleQuote MaybeSpace EOL / EOL) .)*	;
	RefTitlePString	<-	(!(')'         MaybeSpace EOL / EOL) .)*	;

	References	<-	(Reference / SkipBlock)*	;

void:	BT	<-	"`"		;
void:	Ticks1	<-	"`" !BT		;
void:	Ticks2	<-	"``" !BT	;
void:	Ticks3	<-	"```" !BT	;
void:	Ticks4	<-	"````" !BT	;
void:	Ticks5	<-	"`````" !BT	;

	CodeBlock	<-	Ticks1 MaybeSpace Code1 CodeCloser1
       			/	Ticks2 MaybeSpace Code2 CodeCloser2
       			/	Ticks3 MaybeSpace Code3 CodeCloser3
       			/	Ticks4 MaybeSpace Code4 CodeCloser4
       			/	Ticks5 MaybeSpace Code5 CodeCloser5
       			;

leaf:	Code1	<-	((!BT NotSpace)+ / !Ticks1 BT+ / !CodeCloser1 (Whitespace !BlankLine))+	;
leaf:	Code2	<-	((!BT NotSpace)+ / !Ticks2 BT+ / !CodeCloser2 (Whitespace !BlankLine))+	;
leaf:	Code3	<-	((!BT NotSpace)+ / !Ticks3 BT+ / !CodeCloser3 (Whitespace !BlankLine))+	;
leaf:	Code4	<-	((!BT NotSpace)+ / !Ticks4 BT+ / !CodeCloser4 (Whitespace !BlankLine))+	;
leaf:	Code5	<-	((!BT NotSpace)+ / !Ticks5 BT+ / !CodeCloser5 (Whitespace !BlankLine))+	;

void:	CodeCloser1	<-	MaybeSpace Ticks1	;
void:	CodeCloser2	<-	MaybeSpace Ticks2	;
void:	CodeCloser3	<-	MaybeSpace Ticks3	;
void:	CodeCloser4	<-	MaybeSpace Ticks4	;
void:	CodeCloser5	<-	MaybeSpace Ticks5	;

leaf:	RawHtml			<-	HtmlComment
				/	HtmlBlockScript
				/	HtmlTag
				;
leaf:	BlankLines		<-	BlankLine*	;
void:	BlankLine		<-	MaybeSpace EOL	;
	Quoted			<-	QuotedDouble
				/	QuotedSingle
				;

	QuotedSingle		<-	SingleQuote QuotedSString SingleQuote	;
	QuotedDouble		<-	DoubleQuote QuotedDString DoubleQuote	;

	QuotedSString		<-	(!SingleQuote .)*	;
	QuotedDString		<-	(!DoubleQuote .)*	;

	HtmlAttribute		<-	(AlphanumericAscii / '-')+ SkipSpace ('=' SkipSpace (Quoted / (!'>' NotSpace)+))? SkipSpace	;
	HtmlComment		<-	"<!--" (!"-->" .)* "-->"									;
	HtmlTag			<-	TagStart '/'? AlphanumericAscii+ SkipSpace HtmlAttribute* '/'? TagEnd				;

	TagStart		<-	'<' SkipSpace				;
	TagEnd			<-	SkipSpace '>'				;
	OpenTagEnd		<-	SkipSpace HtmlAttribute* TagEnd		;
	CloseTagStart		<-	TagStart '/'				;
	SingleTagEnd		<-	SkipSpace HtmlAttribute* '/' TagEnd	;

	EOF			<-	!.				;
	Space			<-	[ \t]				;
	NotSpace		<-	!Space !EOL .			;
	Whitespace		<-	Space / EOL			;
	EOL			<-	'\n' / '\r' '\n'?		;
	SomeSpace		<-	Space+				;
	MaybeSpace		<-	Space*				;
	SkipSpace		<-	MaybeSpace (EOL MaybeSpace)?	;
	SpecialChar		<-	[~*_`&()<!#'"]
				/ 	'[' / ']' / '\\'
				/	ExtendedSpecialChar
				;
	NormalChar		<-	!SpecialChar !Space !EOL .	;
	Alphanumeric		<-	[0-9A-Za-z\200-\377]		;
	AlphanumericAscii	<-	[A-Za-z0-9]			;
	Digit			<-	[0-9]				;
	BOM			<-	"\357\273\277"			;

leaf:	HexEntity	<-	'&' '#' [Xx] [0-9a-fA-F]+ ';'	;
leaf:	DecEntity	<-	'&' '#' [0-9]+ ';'		;
leaf:	CharEntity	<-	'&' [A-Za-z0-9]+ ';'		;

	NonindentSpace		<-	"   " / "  " / " " / ""	;
	Indent			<-	"\t" / "    "		;
	IndentedLine		<-	Indent Line		;
	OptionallyIndentedLine	<-	Indent? Line		;

	Line			<-	RawLine			;

	RawLine			<-	UntilEOL
				/	UntilEOF
				;
leaf:	UntilEOL		<-	(!'\r' !'\n' .)* EOL	;
leaf:	UntilEOF		<-	.+ EOF			;


	SkipBlock	<-	HtmlBlock
	  		/	(!'#' !SetextBottom1 !SetextBottom2 !BlankLine RawLine)+ BlankLine*
	  		/	BlankLine+
	  		/	RawLine
			;

# Syntax extensions

	ExtendedSpecialChar	<-	[.-'"^]	;
	Smart			<-	Ellipsis
				/	EmDash
				/	EnDash
				/	SingleQuoted
				/	DoubleQuoted
				/	SingleQuote
				;
	SingleQuote		<-	"'"	;
	Ellipsis		<-	"..."
				/	". . ."
				;
	EnDash			<-	'-' &Digit	;
	EmDash			<-	"---"
				/	"--"
				;

	SingleQuoteStart	<-	SingleQuote !Space !EOL					;
	SingleQuoteEnd		<-	SingleQuote !Alphanumeric					;
	SingleQuoted		<-	SingleQuoteStart (!SingleQuoteEnd Inline)+ SingleQuoteEnd	;

	DoubleQuote		<-	'"'						;
	DoubleQuoted		<-	DoubleQuote (!DoubleQuote Inline)+ DoubleQuote	;

	NoteReference		<-	"[^" NoteRefString ']'	;
	NoteRefString		<-	(!EOL !']' .)+		;

	Notes			<-	(Note / SkipBlock)*	;
	Note			<-	NonindentSpace NoteReference ':' MaybeSpace
					RawNoteBlock (&Indent RawNoteBlock)*
				;

	InlineNote		<-	"^[" (!']' Inline)+ ']'	;
	RawNoteBlock		<-	(!BlankLine OptionallyIndentedLine)+ BlankLines	;

END;

Added modules/pt/examples/numbers.peg.































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
PEG numbers (Number)

# TODO: testcases

# The main complexity comes from allowing only decimal integers as
# part of floating point numbers, and allowing non-decimal integers for
# integers in general.

Number		<- Scientific / Integer		;
Scientific	<- Floating ([eE] Signed)?	;

Floating	<- Signed ('.' Decimal)?
		/  '.' Decimal
		;

Integer		<- Sign? Unsigned	;
Signed		<- Sign? Decimal	;

Unsigned	<- Decimal
		/  Hexadecimal
		;

Sign		<- [-+]			;
Decimal		<- <ddigit> +		;
Hexadecimal	<- '0x' <xdigit> +	;

# TODO: Octal
# TODO: Binary

END;

Added modules/pt/examples/other-places.txt.



>
1
https://github.com/PhilippeSigaud/Pegged/wiki/Grammar-Examples

Added modules/pt/examples/strings.peg.

































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
PEG strings (String)

# TODO: testcases

	String		<-	Dquote CharSequence Dquote	;
void:	Dquote		<-	'"'				;
leaf:	CharSequence	<-	Char *				;

# Note: leaf(CharSequence) implies void() on all symbols which are
# used just by it, i.e. Char and all it reaches, see below.

	Char		<-	CharEscaped
			/	CharUnescaped
			;
	CharUnescaped	<-	!Backslash !Dquote .
	CharEscaped	<-	Backslash (	CharSpecial
					/	CharOctalFull
					/	CharOctalPart
					/	CharUnicode
				);
	CharSpecial	<-	[bfnrtv"\]				;
	CharOctalFull	<-	[0-2] [0-7] [0-7]			;
	CharOctalPart	<-	[0-7] [0-7]?				;
	CharUnicode	<-	'u' Hex Hex Hex Hex			;
			/	'U' Hex Hex Hex Hex Hex Hex Hex Hex	;
	Backslash	<-	'\\'					;
	Hex		<=	<xdigit>				;

# PEG extension: <odigit> char class.

END;

Added modules/pt/examples/xml.peg.

Changes to modules/rc4/rc4c.tcl.

16
17
18
19
20
21
22


23
24
25
26
27
28
29
package require critcl
# @sak notprovided rc4c
package provide rc4c 1.1.0

namespace eval ::rc4 {

    critcl::ccode {


        typedef struct RC4_CTX {
            unsigned char x;
            unsigned char y;
            unsigned char s[256];
        } RC4_CTX;

        /* #define TRACE trace */







>
>







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package require critcl
# @sak notprovided rc4c
package provide rc4c 1.1.0

namespace eval ::rc4 {

    critcl::ccode {
        #include <string.h>

        typedef struct RC4_CTX {
            unsigned char x;
            unsigned char y;
            unsigned char s[256];
        } RC4_CTX;

        /* #define TRACE trace */
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
        static void rc4_string_rep(Tcl_Obj* obj)
        {
            RC4_CTX *ctx = (RC4_CTX *)obj->internalRep.otherValuePtr;
            Tcl_Obj* tmpObj;
            char* str;
            TRACE("rc4_string_rep(%08x)\n", (long)obj);
            /* convert via a byte array to properly handle null bytes */
            tmpObj = Tcl_NewByteArrayObj((char *)ctx, sizeof(RC4_CTX));
            Tcl_IncrRefCount(tmpObj);
            
            str = Tcl_GetStringFromObj(tmpObj, &obj->length);
            obj->bytes = Tcl_Alloc(obj->length + 1);
            memcpy(obj->bytes, str, obj->length + 1);
            
            Tcl_DecrRefCount(tmpObj);







|







59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
        static void rc4_string_rep(Tcl_Obj* obj)
        {
            RC4_CTX *ctx = (RC4_CTX *)obj->internalRep.otherValuePtr;
            Tcl_Obj* tmpObj;
            char* str;
            TRACE("rc4_string_rep(%08x)\n", (long)obj);
            /* convert via a byte array to properly handle null bytes */
            tmpObj = Tcl_NewByteArrayObj((unsigned char *)ctx, sizeof(RC4_CTX));
            Tcl_IncrRefCount(tmpObj);
            
            str = Tcl_GetStringFromObj(tmpObj, &obj->length);
            obj->bytes = Tcl_Alloc(obj->length + 1);
            memcpy(obj->bytes, str, obj->length + 1);
            
            Tcl_DecrRefCount(tmpObj);
156
157
158
159
160
161
162
163
164
165
166
            res[n] = data[n] ^ ctx->s[i];
        }
        ctx->x = x;
        ctx->y = y;

        resObj = Tcl_NewByteArrayObj(res, size);
        Tcl_SetObjResult(interp, resObj);
        Tcl_Free(res);
        return TCL_OK;
    }
}







|



158
159
160
161
162
163
164
165
166
167
168
            res[n] = data[n] ^ ctx->s[i];
        }
        ctx->x = x;
        ctx->y = y;

        resObj = Tcl_NewByteArrayObj(res, size);
        Tcl_SetObjResult(interp, resObj);
        Tcl_Free((char*)res);
        return TCL_OK;
    }
}

Changes to modules/ripemd/pkgIndex.tcl.

1
2
3
4
5
6
7
8
9
10
11
# pkgIndex.tcl - 
#
# RIPEMD package index file
#
# This package has been tested with tcl 8.2.3 and above.
#
# $Id: pkgIndex.tcl,v 1.6 2009/05/07 01:12:59 patthoyts Exp $

if {![package vsatisfies [package provide Tcl] 8.2]} {return}
package ifneeded ripemd128 1.0.4 [list source [file join $dir ripemd128.tcl]]
package ifneeded ripemd160 1.0.4 [list source [file join $dir ripemd160.tcl]]









|
|
1
2
3
4
5
6
7
8
9
10
11
# pkgIndex.tcl - 
#
# RIPEMD package index file
#
# This package has been tested with tcl 8.2.3 and above.
#
# $Id: pkgIndex.tcl,v 1.6 2009/05/07 01:12:59 patthoyts Exp $

if {![package vsatisfies [package provide Tcl] 8.2]} {return}
package ifneeded ripemd128 1.0.5 [list source [file join $dir ripemd128.tcl]]
package ifneeded ripemd160 1.0.5 [list source [file join $dir ripemd160.tcl]]

Changes to modules/ripemd/ripemd128.man.


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

[manpage_begin ripemd128 n 1.0.3]
[see_also md4]
[see_also md5]
[see_also ripemd160]
[see_also sha1]
[keywords hashing]
[keywords md4]
[keywords message-digest]
[keywords {rfc 1320}]
[keywords {rfc 1321}]
[keywords {rfc 2104}]
[keywords RIPEMD]
[keywords security]
[moddesc   {RIPEMD Message-Digest Algorithm}]
[copyright {2004, Pat Thoyts <[email protected]>}]
[titledesc {RIPEMD-128 Message-Digest Algorithm}]
[category  {Hashes, checksums, and encryption}]
[require Tcl 8.2]
[require ripemd128 [opt 1.0.3]]
[description]
[para]

This package is an implementation in Tcl of the RIPEMD-128 message-digest
algorithm (1). This algorithm takes an arbitrary quantity of data and
generates a 128-bit message digest from the input. The RIPEMD-128
algorithm is based upon the MD4 algorithm (2, 4) but has been
>
|

















|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
[vset VERSION 1.0.5]
[manpage_begin ripemd128 n [vset VERSION]]
[see_also md4]
[see_also md5]
[see_also ripemd160]
[see_also sha1]
[keywords hashing]
[keywords md4]
[keywords message-digest]
[keywords {rfc 1320}]
[keywords {rfc 1321}]
[keywords {rfc 2104}]
[keywords RIPEMD]
[keywords security]
[moddesc   {RIPEMD Message-Digest Algorithm}]
[copyright {2004, Pat Thoyts <[email protected]>}]
[titledesc {RIPEMD-128 Message-Digest Algorithm}]
[category  {Hashes, checksums, and encryption}]
[require Tcl 8.2]
[require ripemd128 [opt [vset VERSION]]]
[description]
[para]

This package is an implementation in Tcl of the RIPEMD-128 message-digest
algorithm (1). This algorithm takes an arbitrary quantity of data and
generates a 128-bit message digest from the input. The RIPEMD-128
algorithm is based upon the MD4 algorithm (2, 4) but has been

Changes to modules/ripemd/ripemd128.tcl.

25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#
# $Id: ripemd128.tcl,v 1.10 2009/05/07 01:12:59 patthoyts Exp $

package require Tcl 8.2;                # tcl minimum version

namespace eval ::ripemd {
    namespace eval ripemd128 {
        variable version 1.0.4
        variable rcsid {$Id: ripemd128.tcl,v 1.10 2009/05/07 01:12:59 patthoyts Exp $}
        variable accel
        array set accel {trf 0}

        variable uid
        if {![info exists uid]} {
            set uid 0







|







25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#
# $Id: ripemd128.tcl,v 1.10 2009/05/07 01:12:59 patthoyts Exp $

package require Tcl 8.2;                # tcl minimum version

namespace eval ::ripemd {
    namespace eval ripemd128 {
        variable version 1.0.5
        variable rcsid {$Id: ripemd128.tcl,v 1.10 2009/05/07 01:12:59 patthoyts Exp $}
        variable accel
        array set accel {trf 0}

        variable uid
        if {![info exists uid]} {
            set uid 0
715
716
717
718
719
720
721

722


723
724
725
726
727
728
729
730
731
732
733
734
        RIPEHMAC128Init RIPEHMAC128Update RIPEHMAC128Final
}

# -------------------------------------------------------------------------

# Try and load a compiled extension to help.
namespace eval ::ripemd::ripemd128 {

    foreach e {trf} { if {[LoadAccelerator $e]} { break } }


    unset e
}

package provide ripemd128 $::ripemd::ripemd128::version

# -------------------------------------------------------------------------
# Local Variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:









>
|
>
>










<
<
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735


        RIPEHMAC128Init RIPEHMAC128Update RIPEHMAC128Final
}

# -------------------------------------------------------------------------

# Try and load a compiled extension to help.
namespace eval ::ripemd::ripemd128 {
    variable e {}
    foreach e {trf} {
        if {[LoadAccelerator $e]} break
    }
    unset e
}

package provide ripemd128 $::ripemd::ripemd128::version

# -------------------------------------------------------------------------
# Local Variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:


Changes to modules/ripemd/ripemd160.man.


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

[manpage_begin ripemd160 n 1.0.3]
[see_also md4]
[see_also md5]
[see_also ripemd128]
[see_also sha1]
[keywords hashing]
[keywords md4]
[keywords message-digest]
[keywords {rfc 1320}]
[keywords {rfc 1321}]
[keywords {rfc 2104}]
[keywords RIPEMD]
[keywords security]
[moddesc   {RIPEMD Message-Digest Algorithm}]
[copyright {2004, Pat Thoyts <[email protected]>}]
[titledesc {RIPEMD-160 Message-Digest Algorithm}]
[category  {Hashes, checksums, and encryption}]
[require Tcl 8.2]
[require ripemd160 [opt 1.0.3]]
[description]
[para]

This package is an implementation in Tcl of the RIPEMD-160 message-digest
algorithm (1). This algorithm takes an arbitrary quantity of data and
generates a 160-bit message digest from the input. The RIPEMD-160
algorithm is based upon the MD4 algorithm (2, 4) but has been
>
|

















|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
[vset VERSION 1.0.5]
[manpage_begin ripemd160 n [vset VERSION]]
[see_also md4]
[see_also md5]
[see_also ripemd128]
[see_also sha1]
[keywords hashing]
[keywords md4]
[keywords message-digest]
[keywords {rfc 1320}]
[keywords {rfc 1321}]
[keywords {rfc 2104}]
[keywords RIPEMD]
[keywords security]
[moddesc   {RIPEMD Message-Digest Algorithm}]
[copyright {2004, Pat Thoyts <[email protected]>}]
[titledesc {RIPEMD-160 Message-Digest Algorithm}]
[category  {Hashes, checksums, and encryption}]
[require Tcl 8.2]
[require ripemd160 [opt [vset VERSION]]]
[description]
[para]

This package is an implementation in Tcl of the RIPEMD-160 message-digest
algorithm (1). This algorithm takes an arbitrary quantity of data and
generates a 160-bit message digest from the input. The RIPEMD-160
algorithm is based upon the MD4 algorithm (2, 4) but has been

Changes to modules/ripemd/ripemd160.tcl.

26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# $Id: ripemd160.tcl,v 1.8 2009/05/07 01:12:59 patthoyts Exp $

package require Tcl 8.2;                # tcl minimum version
#catch {package require ripemdc 1.0};   # tcllib critcl alternative

namespace eval ::ripemd {
    namespace eval ripemd160 {
        variable version 1.0.4
        variable rcsid {$Id: ripemd160.tcl,v 1.8 2009/05/07 01:12:59 patthoyts Exp $}
        variable accel
        array set accel {cryptkit 0 trf 0}

        variable uid
        if {![info exists uid]} {
            set uid 0







|







26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# $Id: ripemd160.tcl,v 1.8 2009/05/07 01:12:59 patthoyts Exp $

package require Tcl 8.2;                # tcl minimum version
#catch {package require ripemdc 1.0};   # tcllib critcl alternative

namespace eval ::ripemd {
    namespace eval ripemd160 {
        variable version 1.0.5
        variable rcsid {$Id: ripemd160.tcl,v 1.8 2009/05/07 01:12:59 patthoyts Exp $}
        variable accel
        array set accel {cryptkit 0 trf 0}

        variable uid
        if {![info exists uid]} {
            set uid 0
848
849
850
851
852
853
854

855


856
857
858
859
860
861
862
863
864
865
866
867
        RIPEHMAC160Init RIPEHMAC160Update RIPEHMAC160Final
}

# -------------------------------------------------------------------------

# Try and load a compiled extension to help.
namespace eval ::ripemd::ripemd160 {

    foreach e {cryptkit trf} { if {[LoadAccelerator $e]} { break } }


    unset e
}

package provide ripemd160 $::ripemd::ripemd160::version

# -------------------------------------------------------------------------
# Local Variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:









>
|
>
>












848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
        RIPEHMAC160Init RIPEHMAC160Update RIPEHMAC160Final
}

# -------------------------------------------------------------------------

# Try and load a compiled extension to help.
namespace eval ::ripemd::ripemd160 {
    variable e {}
    foreach e {cryptkit trf} {
        if {[LoadAccelerator $e]} break
    }
    unset e
}

package provide ripemd160 $::ripemd::ripemd160::version

# -------------------------------------------------------------------------
# Local Variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:


Changes to modules/sha1/pkgIndex.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
# Tcl package index file, version 1.1
# This file is generated by the "pkg_mkIndex" command
# and sourced either when an application starts up or
# by a "package unknown" script.  It invokes the
# "package ifneeded" command to set up package-related
# information so that packages will be loaded automatically
# in response to "package require" commands.  When this
# script is sourced, the variable $dir must contain the
# full path name of this file's directory.

if {![package vsatisfies [package provide Tcl] 8.2]} {return}
package ifneeded sha256 1.0.3 [list source [file join $dir sha256.tcl]]
package ifneeded sha1   2.0.3 [list source [file join $dir sha1.tcl]]
package ifneeded sha1   1.1.0 [list source [file join $dir sha1v1.tcl]]













|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# Tcl package index file, version 1.1
# This file is generated by the "pkg_mkIndex" command
# and sourced either when an application starts up or
# by a "package unknown" script.  It invokes the
# "package ifneeded" command to set up package-related
# information so that packages will be loaded automatically
# in response to "package require" commands.  When this
# script is sourced, the variable $dir must contain the
# full path name of this file's directory.

if {![package vsatisfies [package provide Tcl] 8.2]} {return}
package ifneeded sha256 1.0.3 [list source [file join $dir sha256.tcl]]
package ifneeded sha1   2.0.3 [list source [file join $dir sha1.tcl]]
package ifneeded sha1   1.1.1 [list source [file join $dir sha1v1.tcl]]

Changes to modules/sha1/sha1c.tcl.

19
20
21
22
23
24
25

26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
critcl::cflags -DTCL_BYTE_ORDER=$byteOrder

namespace eval ::sha1 {

    critcl::ccode {
        #include "sha1.h"
        #include <stdlib.h>

        #include <assert.h>
        
        static
        Tcl_ObjType sha1_type; /* fast internal access representation */
        
        static void 
        sha1_free_rep(Tcl_Obj* obj)
        {
            SHA1_CTX* mp = (SHA1_CTX*) obj->internalRep.otherValuePtr;
            Tcl_Free(mp);
        }
        
        static void
        sha1_dup_rep(Tcl_Obj* obj, Tcl_Obj* dup)
        {
            SHA1_CTX* mp = (SHA1_CTX*) obj->internalRep.otherValuePtr;
            dup->internalRep.otherValuePtr = Tcl_Alloc(sizeof *mp);







>









|







19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
critcl::cflags -DTCL_BYTE_ORDER=$byteOrder

namespace eval ::sha1 {

    critcl::ccode {
        #include "sha1.h"
        #include <stdlib.h>
        #include <string.h>
        #include <assert.h>
        
        static
        Tcl_ObjType sha1_type; /* fast internal access representation */
        
        static void 
        sha1_free_rep(Tcl_Obj* obj)
        {
            SHA1_CTX* mp = (SHA1_CTX*) obj->internalRep.otherValuePtr;
            Tcl_Free ((char*)mp);
        }
        
        static void
        sha1_dup_rep(Tcl_Obj* obj, Tcl_Obj* dup)
        {
            SHA1_CTX* mp = (SHA1_CTX*) obj->internalRep.otherValuePtr;
            dup->internalRep.otherValuePtr = Tcl_Alloc(sizeof *mp);

Changes to modules/sha1/sha1v1.tcl.

24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# $Id: sha1v1.tcl,v 1.1 2006/03/12 22:46:13 andreas_kupries Exp $

# @mdgen EXCLUDE: sha1c.tcl

package require Tcl 8.2;                # tcl minimum version

namespace eval ::sha1 {
    variable version 1.1.0
    variable rcsid {$Id: sha1v1.tcl,v 1.1 2006/03/12 22:46:13 andreas_kupries Exp $}
    variable accel
    array set accel {critcl 0 cryptkit 0 trf 0}

    namespace export sha1 hmac SHA1Init SHA1Update SHA1Final

    variable uid







|







24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# $Id: sha1v1.tcl,v 1.1 2006/03/12 22:46:13 andreas_kupries Exp $

# @mdgen EXCLUDE: sha1c.tcl

package require Tcl 8.2;                # tcl minimum version

namespace eval ::sha1 {
    variable version 1.1.1
    variable rcsid {$Id: sha1v1.tcl,v 1.1 2006/03/12 22:46:13 andreas_kupries Exp $}
    variable accel
    array set accel {critcl 0 cryptkit 0 trf 0}

    namespace export sha1 hmac SHA1Init SHA1Update SHA1Final

    variable uid
695
696
697
698
699
700
701

702

703
704
705
706
707
708
709
710
711
712
713
    return $r
}

# -------------------------------------------------------------------------

# Try and load a compiled extension to help.
namespace eval ::sha1 {

    foreach e {critcl cryptkit trf} { if {[LoadAccelerator $e]} { break } }

}

package provide sha1 $::sha1::version

# -------------------------------------------------------------------------
# Local Variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:









>

>











695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
    return $r
}

# -------------------------------------------------------------------------

# Try and load a compiled extension to help.
namespace eval ::sha1 {
    variable e {}
    foreach e {critcl cryptkit trf} { if {[LoadAccelerator $e]} { break } }
    unset e
}

package provide sha1 $::sha1::version

# -------------------------------------------------------------------------
# Local Variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:


Changes to modules/sha1/sha256c.tcl.

26
27
28
29
30
31
32

33
34
35
36
37
38
39
    catch {
        #critcl::debug memory symbols
    }

    critcl::ccode {
        #include "sha256.h"
        #include <stdlib.h>

        #include <assert.h>
        
        static
        Tcl_ObjType sha256_type; /* fast internal access representation */
        
        static void 
        sha256_free_rep(Tcl_Obj* obj)







>







26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
    catch {
        #critcl::debug memory symbols
    }

    critcl::ccode {
        #include "sha256.h"
        #include <stdlib.h>
        #include <string.h>
        #include <assert.h>
        
        static
        Tcl_ObjType sha256_type; /* fast internal access representation */
        
        static void 
        sha256_free_rep(Tcl_Obj* obj)

Changes to modules/uuid/pkgIndex.tcl.

1
2
3
4
5
6
7
8
# pkgIndex.tcl - 
#
# uuid package index file
#
# $Id: pkgIndex.tcl,v 1.3 2012/11/19 19:28:24 andreas_kupries Exp $

if {![package vsatisfies [package provide Tcl] 8.2]} {return}
package ifneeded uuid 1.0.3 [list source [file join $dir uuid.tcl]]







|
1
2
3
4
5
6
7
8
# pkgIndex.tcl - 
#
# uuid package index file
#
# $Id: pkgIndex.tcl,v 1.3 2012/11/19 19:28:24 andreas_kupries Exp $

if {![package vsatisfies [package provide Tcl] 8.2]} {return}
package ifneeded uuid 1.0.4 [list source [file join $dir uuid.tcl]]

Changes to modules/uuid/uuid.man.

1
2
3
4
5
6
7
8
[vset UUID_VERSION 1.0.3]
[manpage_begin uuid n [vset UUID_VERSION]]
[keywords GUID]
[keywords UUID]
[moddesc {uuid}]
[copyright {2004, Pat Thoyts <[email protected]>}]
[titledesc {UUID generation and comparison}]
[category  {Hashes, checksums, and encryption}]
|







1
2
3
4
5
6
7
8
[vset UUID_VERSION 1.0.4]
[manpage_begin uuid n [vset UUID_VERSION]]
[keywords GUID]
[keywords UUID]
[moddesc {uuid}]
[copyright {2004, Pat Thoyts <[email protected]>}]
[titledesc {UUID generation and comparison}]
[category  {Hashes, checksums, and encryption}]

Changes to modules/uuid/uuid.tcl.

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# uuid: scheme:
# http://www.globecom.net/ietf/draft/draft-kindel-uuid-uri-00.html
#
# Usage: uuid::uuid generate
#        uuid::uuid equal $idA $idB

namespace eval uuid {
    variable version 1.0.3
    variable accel
    array set accel {critcl 0}

    namespace export uuid

    variable uid
    if {![info exists uid]} {







|







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# uuid: scheme:
# http://www.globecom.net/ietf/draft/draft-kindel-uuid-uri-00.html
#
# Usage: uuid::uuid generate
#        uuid::uuid equal $idA $idB

namespace eval uuid {
    variable version 1.0.4
    variable accel
    array set accel {critcl 0}

    namespace export uuid

    variable uid
    if {![info exists uid]} {
215
216
217
218
219
220
221

222



223
224
225
226
227
228
229
230
231
    set accel($name) $r
}

# -------------------------------------------------------------------------

# Try and load a compiled extension to help.
namespace eval ::uuid {

    foreach e {critcl} { if {[LoadAccelerator $e]} { break } }



}

package provide uuid $::uuid::version

# -------------------------------------------------------------------------
# Local variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:







>
|
>
>
>









215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
    set accel($name) $r
}

# -------------------------------------------------------------------------

# Try and load a compiled extension to help.
namespace eval ::uuid {
    variable e {}
    foreach e {critcl} {
        if {[LoadAccelerator $e]} break
    }
    unset e
}

package provide uuid $::uuid::version

# -------------------------------------------------------------------------
# Local variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End: