Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Comment: | Pulled trunk work into the release, updated embedded docs |
---|---|
Timelines: | family | ancestors | descendants | both | tcllib-1-17-rc |
Files: | files | file ages | folders |
SHA1: |
fd1db41dafcb4a28b11a90fb0701b237 |
User & Date: | aku 2015-04-15 21:17:25 |
2015-04-15
| ||
21:21 | Updated README check-in: 734ccd27b4 user: aku tags: tcllib-1-17-rc | |
21:17 | Pulled trunk work into the release, updated embedded docs check-in: fd1db41daf user: aku tags: tcllib-1-17-rc | |
21:10 | Refreshed the embedded docs. check-in: 4545293d4f user: aku tags: trunk | |
2015-04-14
| ||
22:57 | pt - Fixes to the testsuite, bringing results back into sync with the templates and generators. check-in: 4c0da741b4 user: aku tags: tcllib-1-17-rc | |
Changes to embedded/man/files/modules/cmdline/cmdline.n.
1 2 3 | '\" '\" Generated from file 'cmdline\&.man' by tcllib/doctools with format 'nroff' '\" | | | 1 2 3 4 5 6 7 8 9 10 11 | '\" '\" Generated from file 'cmdline\&.man' by tcllib/doctools with format 'nroff' '\" .TH "cmdline" n 1\&.5 tcllib "Command line and option processing" .\" The -*- nroff -*- definitions below are for supplemental macros used .\" in Tcl/Tk manual entries. .\" .\" .AP type name in/out ?indent? .\" Start paragraph describing an argument to a library procedure. .\" type is type of argument (int, etc.), in/out is either "in", "out", .\" or "in/out" to describe whether procedure reads or modifies arg, |
︙ | ︙ | |||
348 349 350 351 352 353 354 | .sp If \fIflag\fR ends in "\&.arg" then the value is taken from the command line\&. Otherwise it is a boolean and appears in the result if present on the command line\&. If \fIflag\fR ends in "\&.secret", it will not be displayed in the usage\&. .sp The options \fB-?\fR, \fB-help\fR, and \fB--\fR are | | | | > | | 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 | .sp If \fIflag\fR ends in "\&.arg" then the value is taken from the command line\&. Otherwise it is a boolean and appears in the result if present on the command line\&. If \fIflag\fR ends in "\&.secret", it will not be displayed in the usage\&. .sp The options \fB-?\fR, \fB-help\fR, and \fB--\fR are implicitly understood\&. The first two abort option processing by throwing an error and force the generation of the usage message, whereas the the last aborts option processing without an error, leaving all arguments coming after for regular processing, even if starting with a dash\&. .sp The result of the command is a dictionary mapping all options to their values, be they user-specified or defaults\&. .TP \fB::cmdline::getKnownOptions\fR \fIarglistVar\fR \fIoptlist\fR ?\fIusage\fR? Like \fB::cmdline::getoptions\fR, but ignores any unknown options in the input\&. |
︙ | ︙ | |||
385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 | .TP \fB::cmdline::getArgv0\fR This command returns the "sanitized" version of \fIargv0\fR\&. It will strip off the leading path and removes the extension "\&.bin"\&. The latter is used by the pro-apps because they must be wrapped by a shell script\&. .PP .SH EXAMPLES .CS set options { {a "set the atime only"} {m "set the mtime only"} {c "do not create non-existent files"} {r\&.arg "" "use time from ref_file"} {t\&.arg -1 "use specified time"} } set usage ": MyCommandName \\[options] filename \&.\&.\&.\\noptions:" | > > > > > > > > > > > > > > > > > | > > > > > > | 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 | .TP \fB::cmdline::getArgv0\fR This command returns the "sanitized" version of \fIargv0\fR\&. It will strip off the leading path and removes the extension "\&.bin"\&. The latter is used by the pro-apps because they must be wrapped by a shell script\&. .PP .SS "ERROR CODES" Starting with version 1\&.5 all errors thrown by the package have a proper \fB::errorCode\fR for use with Tcl's \fBtry\fR command\&. This code always has the word \fBCMDLINE\fR as its first element\&. .SH EXAMPLES .CS package require Tcl 8\&.5 package require try ;# Tcllib\&. package require cmdline 1\&.5 ;# First version with proper error-codes\&. # Notes: # - Tcl 8\&.6+ has 'try' as a builtin command and therefore does not # need the 'try' package\&. # - Before Tcl 8\&.5 we cannot support 'try' and have to use 'catch'\&. # This then requires a dedicated test (if) on the contents of # ::errorCode to separate the CMDLINE USAGE signal from actual errors\&. set options { {a "set the atime only"} {m "set the mtime only"} {c "do not create non-existent files"} {r\&.arg "" "use time from ref_file"} {t\&.arg -1 "use specified time"} } set usage ": MyCommandName \\[options] filename \&.\&.\&.\\noptions:" try { array set params [::cmdline::getoptions argv $options $usage] } trap {CMDLINE USAGE} {msg o} { # Trap the usage signal, print the message, and exit the application\&. # Note: Other errors are not caught and passed through to higher levels! puts $msg exit 1 } if { $params(a) } { set set_atime "true" } set has_t [expr {$params(t) != -1}] set has_r [expr {[string length $params(r)] > 0}] if {$has_t && $has_r} { return -code error "Cannot specify both -r and -t" } elseif {$has_t} { |
︙ | ︙ |
Changes to embedded/man/files/modules/coroutine/coro_auto.n.
1 2 3 4 | '\" '\" Generated from file 'coro_auto\&.man' by tcllib/doctools with format 'nroff' '\" Copyright (c) 2010-2014 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net> '\" | | | 1 2 3 4 5 6 7 8 9 10 11 12 | '\" '\" Generated from file 'coro_auto\&.man' by tcllib/doctools with format 'nroff' '\" Copyright (c) 2010-2014 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net> '\" .TH "coroutine::auto" n 1\&.1\&.3 tcllib "Coroutine utilities" .\" The -*- nroff -*- definitions below are for supplemental macros used .\" in Tcl/Tk manual entries. .\" .\" .AP type name in/out ?indent? .\" Start paragraph describing an argument to a library procedure. .\" type is type of argument (int, etc.), in/out is either "in", "out", .\" or "in/out" to describe whether procedure reads or modifies arg, |
︙ | ︙ | |||
272 273 274 275 276 277 278 | .. .BS .SH NAME coroutine::auto \- Automatic event and IO coroutine awareness .SH SYNOPSIS package require \fBTcl 8\&.6\fR .sp | | | 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 | .. .BS .SH NAME coroutine::auto \- Automatic event and IO coroutine awareness .SH SYNOPSIS package require \fBTcl 8\&.6\fR .sp package require \fBcoroutine::auto 1\&.1\&.3\fR .sp package require \fBcoroutine 1\&.1\fR .sp .BE .SH DESCRIPTION The \fBcoroutine::auto\fR package provides no commands or other directly visible functionality\&. |
︙ | ︙ |
Changes to embedded/man/files/modules/coroutine/tcllib_coroutine.n.
1 2 | '\" '\" Generated from file 'tcllib_coroutine\&.man' by tcllib/doctools with format 'nroff' | | | | 1 2 3 4 5 6 7 8 9 10 11 12 | '\" '\" Generated from file 'tcllib_coroutine\&.man' by tcllib/doctools with format 'nroff' '\" Copyright (c) 2010-2015 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net> '\" .TH "coroutine" n 1\&.1\&.3 tcllib "Coroutine utilities" .\" The -*- nroff -*- definitions below are for supplemental macros used .\" in Tcl/Tk manual entries. .\" .\" .AP type name in/out ?indent? .\" Start paragraph describing an argument to a library procedure. .\" type is type of argument (int, etc.), in/out is either "in", "out", .\" or "in/out" to describe whether procedure reads or modifies arg, |
︙ | ︙ | |||
272 273 274 275 276 277 278 | .. .BS .SH NAME coroutine \- Coroutine based event and IO handling .SH SYNOPSIS package require \fBTcl 8\&.6\fR .sp | | | 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 | .. .BS .SH NAME coroutine \- Coroutine based event and IO handling .SH SYNOPSIS package require \fBTcl 8\&.6\fR .sp package require \fBcoroutine 1\&.1\&.3\fR .sp \fBcoroutine::util after\fR \fIdelay\fR .sp \fBcoroutine::util await\fR \fIvarname\fR\&.\&.\&. .sp \fBcoroutine::util create\fR \fIarg\fR\&.\&.\&. .sp |
︙ | ︙ | |||
372 373 374 375 376 377 378 | package and/or documentation\&. .SH KEYWORDS after, channel, coroutine, events, exit, gets, global, green threads, read, threads, update, vwait .SH CATEGORY Coroutine .SH COPYRIGHT .nf | | | 372 373 374 375 376 377 378 379 380 381 | package and/or documentation\&. .SH KEYWORDS after, channel, coroutine, events, exit, gets, global, green threads, read, threads, update, vwait .SH CATEGORY Coroutine .SH COPYRIGHT .nf Copyright (c) 2010-2015 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net> .fi |
Changes to embedded/man/files/modules/dns/tcllib_dns.n.
1 2 3 4 | '\" '\" Generated from file 'tcllib_dns\&.man' by tcllib/doctools with format 'nroff' '\" Copyright (c) 2002, Pat Thoyts '\" | | | 1 2 3 4 5 6 7 8 9 10 11 12 | '\" '\" Generated from file 'tcllib_dns\&.man' by tcllib/doctools with format 'nroff' '\" Copyright (c) 2002, Pat Thoyts '\" .TH "dns" n 1\&.3\&.5 tcllib "Domain Name Service" .\" The -*- nroff -*- definitions below are for supplemental macros used .\" in Tcl/Tk manual entries. .\" .\" .AP type name in/out ?indent? .\" Start paragraph describing an argument to a library procedure. .\" type is type of argument (int, etc.), in/out is either "in", "out", .\" or "in/out" to describe whether procedure reads or modifies arg, |
︙ | ︙ | |||
272 273 274 275 276 277 278 | .. .BS .SH NAME dns \- Tcl Domain Name Service Client .SH SYNOPSIS package require \fBTcl 8\&.2\fR .sp | | | 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 | .. .BS .SH NAME dns \- Tcl Domain Name Service Client .SH SYNOPSIS package require \fBTcl 8\&.2\fR .sp package require \fBdns ?1\&.3\&.5?\fR .sp \fB::dns::resolve\fR \fIquery\fR ?\fIoptions\fR? .sp \fB::dns::configure\fR ?\fIoptions\fR? .sp \fB::dns::name\fR \fItoken\fR .sp |
︙ | ︙ |
Changes to embedded/man/files/modules/dns/tcllib_ip.n.
1 2 3 4 5 | '\" '\" Generated from file 'tcllib_ip\&.man' by tcllib/doctools with format 'nroff' '\" Copyright (c) 2004, Pat Thoyts '\" Copyright (c) 2005 Aamer Akhter <aakhter@cisco\&.com> '\" | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 | '\" '\" Generated from file 'tcllib_ip\&.man' by tcllib/doctools with format 'nroff' '\" Copyright (c) 2004, Pat Thoyts '\" Copyright (c) 2005 Aamer Akhter <aakhter@cisco\&.com> '\" .TH "tcllib_ip" n 1\&.3 tcllib "Domain Name Service" .\" The -*- nroff -*- definitions below are for supplemental macros used .\" in Tcl/Tk manual entries. .\" .\" .AP type name in/out ?indent? .\" Start paragraph describing an argument to a library procedure. .\" type is type of argument (int, etc.), in/out is either "in", "out", .\" or "in/out" to describe whether procedure reads or modifies arg, |
︙ | ︙ | |||
273 274 275 276 277 278 279 | .. .BS .SH NAME tcllib_ip \- IPv4 and IPv6 address manipulation .SH SYNOPSIS package require \fBTcl 8\&.2\fR .sp | | > > > > | 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 | .. .BS .SH NAME tcllib_ip \- IPv4 and IPv6 address manipulation .SH SYNOPSIS package require \fBTcl 8\&.2\fR .sp package require \fBip ?1\&.3?\fR .sp \fB::ip::version\fR \fIaddress\fR .sp \fB::ip::is\fR \fIclass\fR \fIaddress\fR .sp \fB::ip::equal\fR \fIaddress\fR \fIaddress\fR .sp \fB::ip::normalize\fR \fIaddress\fR .sp \fB::ip::contract\fR \fIaddress\fR .sp \fB::ip::distance\fR \fIipaddr1\fR \fIipaddr2\fR .sp \fB::ip::nextIp\fR \fIipaddr\fR ?\fIoffset\fR? .sp \fB::ip::prefix\fR \fIaddress\fR .sp \fB::ip::type\fR \fIaddress\fR .sp \fB::ip::mask\fR \fIaddress\fR .sp |
︙ | ︙ | |||
361 362 363 364 365 366 367 368 369 370 371 372 373 374 | are various shorthand ways to write internet addresses, missing out redundant parts or digts\&.\&. This procedure is the opposite of \fBcontract\fR\&. .TP \fB::ip::contract\fR \fIaddress\fR Convert a \fBnormalize\fRd internet address into a more compact form suitable for displaying to users\&. .TP \fB::ip::prefix\fR \fIaddress\fR Returns the address prefix generated by masking the address part with the mask if provided\&. If there is no mask then it is equivalent to calling \fBnormalize\fR .TP \fB::ip::type\fR \fIaddress\fR | > > > > > > > > > > > > > > > > > > > > > > > > | 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 | are various shorthand ways to write internet addresses, missing out redundant parts or digts\&.\&. This procedure is the opposite of \fBcontract\fR\&. .TP \fB::ip::contract\fR \fIaddress\fR Convert a \fBnormalize\fRd internet address into a more compact form suitable for displaying to users\&. .TP \fB::ip::distance\fR \fIipaddr1\fR \fIipaddr2\fR This command computes the (integer) distance from IPv4 address \fIipaddr1\fR to IPv4 address \fIipaddr2\fR, i\&.e\&. "ipaddr2 - ipaddr1" .sp .CS % ::ip::distance 1\&.1\&.1\&.1 1\&.1\&.1\&.5 4 .CE .TP \fB::ip::nextIp\fR \fIipaddr\fR ?\fIoffset\fR? This command adds the integer \fIoffset\fR to the IPv4 address \fIipaddr\fR and returns the new IPv4 address\&. .sp .CS % ::ip::distance 1\&.1\&.1\&.1 4 1\&.1\&.1\&.5 .CE .TP \fB::ip::prefix\fR \fIaddress\fR Returns the address prefix generated by masking the address part with the mask if provided\&. If there is no mask then it is equivalent to calling \fBnormalize\fR .TP \fB::ip::type\fR \fIaddress\fR |
︙ | ︙ |
Changes to embedded/man/files/modules/html/html.n.
1 2 3 | '\" '\" Generated from file 'html\&.man' by tcllib/doctools with format 'nroff' '\" | | | 1 2 3 4 5 6 7 8 9 10 11 | '\" '\" Generated from file 'html\&.man' by tcllib/doctools with format 'nroff' '\" .TH "html" n 1\&.4\&.4 tcllib "HTML Generation" .\" The -*- nroff -*- definitions below are for supplemental macros used .\" in Tcl/Tk manual entries. .\" .\" .AP type name in/out ?indent? .\" Start paragraph describing an argument to a library procedure. .\" type is type of argument (int, etc.), in/out is either "in", "out", .\" or "in/out" to describe whether procedure reads or modifies arg, |
︙ | ︙ | |||
271 272 273 274 275 276 277 | .. .BS .SH NAME html \- Procedures to generate HTML structures .SH SYNOPSIS package require \fBTcl 8\&.2\fR .sp | | | 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 | .. .BS .SH NAME html \- Procedures to generate HTML structures .SH SYNOPSIS package require \fBTcl 8\&.2\fR .sp package require \fBhtml ?1\&.4\&.4?\fR .sp \fB::html::author\fR \fIauthor\fR .sp \fB::html::bodyTag\fR \fIargs\fR .sp \fB::html::cell\fR \fIparam value\fR ?\fItag\fR? .sp |
︙ | ︙ |
Changes to embedded/man/files/modules/struct/pool.n.
1 2 3 4 | '\" '\" Generated from file 'pool\&.man' by tcllib/doctools with format 'nroff' '\" Copyright (c) 2002, Erik Leunissen <e\&.leunissen@hccnet\&.nl> '\" | | | 1 2 3 4 5 6 7 8 9 10 11 12 | '\" '\" Generated from file 'pool\&.man' by tcllib/doctools with format 'nroff' '\" Copyright (c) 2002, Erik Leunissen <e\&.leunissen@hccnet\&.nl> '\" .TH "struct::pool" n 1\&.2\&.3 tcllib "Tcl Data Structures" .\" The -*- nroff -*- definitions below are for supplemental macros used .\" in Tcl/Tk manual entries. .\" .\" .AP type name in/out ?indent? .\" Start paragraph describing an argument to a library procedure. .\" type is type of argument (int, etc.), in/out is either "in", "out", .\" or "in/out" to describe whether procedure reads or modifies arg, |
︙ | ︙ | |||
272 273 274 275 276 277 278 | .. .BS .SH NAME struct::pool \- Create and manipulate pool objects (of discrete items) .SH SYNOPSIS package require \fBTcl 8\&.2\fR .sp | | | 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 | .. .BS .SH NAME struct::pool \- Create and manipulate pool objects (of discrete items) .SH SYNOPSIS package require \fBTcl 8\&.2\fR .sp package require \fBstruct::pool ?1\&.2\&.3?\fR .sp \fB::struct::pool\fR ?\fIpoolName\fR? ?\fImaxsize\fR? .sp \fBpoolName\fR \fIoption\fR ?\fIarg arg \&.\&.\&.\fR? .sp \fIpoolName\fR \fBadd\fR \fIitemName1\fR ?\fIitemName2 itemName3 \&.\&.\&.\fR? .sp |
︙ | ︙ |
Changes to embedded/man/files/modules/textutil/adjust.n.
1 2 3 | '\" '\" Generated from file 'adjust\&.man' by tcllib/doctools with format 'nroff' '\" | | | 1 2 3 4 5 6 7 8 9 10 11 | '\" '\" Generated from file 'adjust\&.man' by tcllib/doctools with format 'nroff' '\" .TH "textutil::adjust" n 0\&.7\&.3 tcllib "Text and string utilities, macro processing" .\" The -*- nroff -*- definitions below are for supplemental macros used .\" in Tcl/Tk manual entries. .\" .\" .AP type name in/out ?indent? .\" Start paragraph describing an argument to a library procedure. .\" type is type of argument (int, etc.), in/out is either "in", "out", .\" or "in/out" to describe whether procedure reads or modifies arg, |
︙ | ︙ | |||
271 272 273 274 275 276 277 | .. .BS .SH NAME textutil::adjust \- Procedures to adjust, indent, and undent paragraphs .SH SYNOPSIS package require \fBTcl 8\&.2\fR .sp | | | 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 | .. .BS .SH NAME textutil::adjust \- Procedures to adjust, indent, and undent paragraphs .SH SYNOPSIS package require \fBTcl 8\&.2\fR .sp package require \fBtextutil::adjust ?0\&.7\&.3?\fR .sp \fB::textutil::adjust::adjust\fR \fIstring\fR ?\fIoption value\&.\&.\&.\fR? .sp \fB::textutil::adjust::readPatterns\fR \fIfilename\fR .sp \fB::textutil::adjust::listPredefined\fR .sp |
︙ | ︙ |
Changes to embedded/man/files/modules/uri/uri.n.
1 2 3 | '\" '\" Generated from file 'uri\&.man' by tcllib/doctools with format 'nroff' '\" | | | 1 2 3 4 5 6 7 8 9 10 11 | '\" '\" Generated from file 'uri\&.man' by tcllib/doctools with format 'nroff' '\" .TH "uri" n 1\&.2\&.5 tcllib "Tcl Uniform Resource Identifier Management" .\" The -*- nroff -*- definitions below are for supplemental macros used .\" in Tcl/Tk manual entries. .\" .\" .AP type name in/out ?indent? .\" Start paragraph describing an argument to a library procedure. .\" type is type of argument (int, etc.), in/out is either "in", "out", .\" or "in/out" to describe whether procedure reads or modifies arg, |
︙ | ︙ | |||
271 272 273 274 275 276 277 | .. .BS .SH NAME uri \- URI utilities .SH SYNOPSIS package require \fBTcl 8\&.2\fR .sp | | | 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 | .. .BS .SH NAME uri \- URI utilities .SH SYNOPSIS package require \fBTcl 8\&.2\fR .sp package require \fBuri ?1\&.2\&.5?\fR .sp \fBuri::split\fR \fIurl\fR ?\fIdefaultscheme\fR? .sp \fBuri::join\fR ?\fIkey\fR \fIvalue\fR?\&.\&.\&. .sp \fBuri::resolve\fR \fIbase\fR \fIurl\fR .sp |
︙ | ︙ |
Changes to embedded/www/tcllib/files/modules/cmdline/cmdline.html.
︙ | ︙ | |||
101 102 103 104 105 106 107 | | <a href="../../../../toc.html">Main Table Of Contents</a> | <a href="../../../toc.html">Table Of Contents</a> | <a href="../../../../index.html">Keyword Index</a> | <a href="../../../../toc0.html">Categories</a> | <a href="../../../../toc1.html">Modules</a> | <a href="../../../../toc2.html">Applications</a> ] <hr> | | | > > > > | 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 | | <a href="../../../../toc.html">Main Table Of Contents</a> | <a href="../../../toc.html">Table Of Contents</a> | <a href="../../../../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">cmdline(n) 1.5 tcllib "Command line and option processing"</h1> <div id="name" class="section"><h2><a name="name">Name</a></h2> <p>cmdline - Procedures to process command lines and options.</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">::argv handling</a></li> <li class="section"><a href="#section3">API</a> <ul> <li class="subsection"><a href="#subsection1">Error Codes</a></li> </ul> </li> <li class="section"><a href="#section4">EXAMPLES</a></li> <li class="section"><a href="#section5">Bugs, Ideas, Feedback</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> |
︙ | ︙ | |||
187 188 189 190 191 192 193 | <p><i class="arg">optlist</i> contains a list of lists where each element specifies an option in the form: <i class="arg">flag</i> <i class="arg">default</i> <i class="arg">comment</i>.</p> <p>If <i class="arg">flag</i> ends in ".arg" then the value is taken from the command line. Otherwise it is a boolean and appears in the result if present on the command line. If <i class="arg">flag</i> ends in ".secret", it will not be displayed in the usage.</p> <p>The options <b class="option">-?</b>, <b class="option">-help</b>, and <b class="option">--</b> are | | | | > | | 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 | <p><i class="arg">optlist</i> contains a list of lists where each element specifies an option in the form: <i class="arg">flag</i> <i class="arg">default</i> <i class="arg">comment</i>.</p> <p>If <i class="arg">flag</i> ends in ".arg" then the value is taken from the command line. Otherwise it is a boolean and appears in the result if present on the command line. If <i class="arg">flag</i> ends in ".secret", it will not be displayed in the usage.</p> <p>The options <b class="option">-?</b>, <b class="option">-help</b>, and <b class="option">--</b> are implicitly understood. The first two abort option processing by throwing an error and force the generation of the usage message, whereas the the last aborts option processing without an error, leaving all arguments coming after for regular processing, even if starting with a dash.</p> <p>The result of the command is a dictionary mapping all options to their values, be they user-specified or defaults.</p></dd> <dt><a name="4"><b class="cmd">::cmdline::getKnownOptions</b> <i class="arg">arglistVar</i> <i class="arg">optlist</i> <span class="opt">?<i class="arg">usage</i>?</span></a></dt> <dd><p>Like <b class="cmd">::cmdline::getoptions</b>, but ignores any unknown options in the input.</p></dd> <dt><a name="5"><b class="cmd">::cmdline::usage</b> <i class="arg">optlist</i> <span class="opt">?<i class="arg">usage</i>?</span></a></dt> <dd><p>Generates and returns an error message that lists the allowed |
︙ | ︙ | |||
218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 | file. The last sentence refers to the pro-tools.</p></dd> <dt><a name="7"><b class="cmd">::cmdline::getArgv0</b></a></dt> <dd><p>This command returns the "sanitized" version of <i class="arg">argv0</i>. It will strip off the leading path and removes the extension ".bin". The latter is used by the pro-apps because they must be wrapped by a shell script.</p></dd> </dl> </div> <div id="section4" class="section"><h2><a name="section4">EXAMPLES</a></h2> <pre class="example"> set options { {a "set the atime only"} {m "set the mtime only"} {c "do not create non-existent files"} {r.arg "" "use time from ref_file"} {t.arg -1 "use specified time"} } set usage ": MyCommandName \[options] filename ...\noptions:" | > > > > > > > > > > > > > > > | > > > > > > | 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 | file. The last sentence refers to the pro-tools.</p></dd> <dt><a name="7"><b class="cmd">::cmdline::getArgv0</b></a></dt> <dd><p>This command returns the "sanitized" version of <i class="arg">argv0</i>. It will strip off the leading path and removes the extension ".bin". The latter is used by the pro-apps because they must be wrapped by a shell script.</p></dd> </dl> <div id="subsection1" class="subsection"><h3><a name="subsection1">Error Codes</a></h3> <p>Starting with version 1.5 all errors thrown by the package have a proper <b class="variable">::errorCode</b> for use with Tcl's <b class="cmd"><a href="../try/tcllib_try.html">try</a></b> command. This code always has the word <b class="const">CMDLINE</b> as its first element.</p> </div> </div> <div id="section4" class="section"><h2><a name="section4">EXAMPLES</a></h2> <pre class="example"> package require Tcl 8.5 package require try ;# Tcllib. package require cmdline 1.5 ;# First version with proper error-codes. # Notes: # - Tcl 8.6+ has 'try' as a builtin command and therefore does not # need the 'try' package. # - Before Tcl 8.5 we cannot support 'try' and have to use 'catch'. # This then requires a dedicated test (if) on the contents of # ::errorCode to separate the CMDLINE USAGE signal from actual errors. set options { {a "set the atime only"} {m "set the mtime only"} {c "do not create non-existent files"} {r.arg "" "use time from ref_file"} {t.arg -1 "use specified time"} } set usage ": MyCommandName \[options] filename ...\noptions:" try { array set params [::cmdline::getoptions argv $options $usage] } trap {CMDLINE USAGE} {msg o} { # Trap the usage signal, print the message, and exit the application. # Note: Other errors are not caught and passed through to higher levels! puts $msg exit 1 } if { $params(a) } { set set_atime "true" } set has_t [expr {$params(t) != -1}] set has_r [expr {[string length $params(r)] > 0}] if {$has_t && $has_r} { return -code error "Cannot specify both -r and -t" } elseif {$has_t} { ... |
︙ | ︙ |
Changes to embedded/www/tcllib/files/modules/coroutine/coro_auto.html.
︙ | ︙ | |||
104 105 106 107 108 109 110 | | <a href="../../../../toc.html">Main Table Of Contents</a> | <a href="../../../toc.html">Table Of Contents</a> | <a href="../../../../index.html">Keyword Index</a> | <a href="../../../../toc0.html">Categories</a> | <a href="../../../../toc1.html">Modules</a> | <a href="../../../../toc2.html">Applications</a> ] <hr> | | | | 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 | | <a href="../../../../toc.html">Main Table Of Contents</a> | <a href="../../../toc.html">Table Of Contents</a> | <a href="../../../../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">coroutine::auto(n) 1.1.3 tcllib "Coroutine utilities"</h1> <div id="name" class="section"><h2><a name="name">Name</a></h2> <p>coroutine::auto - Automatic event and IO coroutine awareness</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">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.6</b></li> <li>package require <b class="pkgname">coroutine::auto 1.1.3</b></li> <li>package require <b class="pkgname">coroutine 1.1</b></li> </ul> </div> </div> <div id="section1" class="section"><h2><a name="section1">Description</a></h2> <p>The <b class="package">coroutine::auto</b> package provides no commands or other directly visible functionality. |
︙ | ︙ |
Changes to embedded/www/tcllib/files/modules/coroutine/tcllib_coroutine.html.
︙ | ︙ | |||
90 91 92 93 94 95 96 | margin-bottom: 1em; border-bottom: 1px solid black; } --></style> </head> <! -- Generated from file 'tcllib_coroutine.man' by tcllib/doctools with format '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 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 | margin-bottom: 1em; border-bottom: 1px solid black; } --></style> </head> <! -- Generated from file 'tcllib_coroutine.man' by tcllib/doctools with format 'html' --> <! -- Copyright © 2010-2015 Andreas Kupries <[email protected]> --> <! -- CVS: $Id$ coroutine.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">coroutine(n) 1.1.3 tcllib "Coroutine utilities"</h1> <div id="name" class="section"><h2><a name="name">Name</a></h2> <p>coroutine - Coroutine based event and IO handling</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">API</a></li> <li class="section"><a href="#section3">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.6</b></li> <li>package require <b class="pkgname">coroutine 1.1.3</b></li> </ul> <ul class="syntax"> <li><a href="#1"><b class="cmd">coroutine::util after</b> <i class="arg">delay</i></a></li> <li><a href="#2"><b class="cmd">coroutine::util await</b> <i class="arg">varname</i>...</a></li> <li><a href="#3"><b class="cmd">coroutine::util create</b> <i class="arg">arg</i>...</a></li> <li><a href="#4"><b class="cmd">coroutine::util exit</b> <span class="opt">?<i class="arg">status</i>?</span></a></li> <li><a href="#5"><b class="cmd">coroutine::util gets</b> <i class="arg">chan</i> <span class="opt">?<i class="arg">varname</i>?</span></a></li> |
︙ | ︙ | |||
213 214 215 216 217 218 219 | <div id="keywords" class="section"><h2><a name="keywords">Keywords</a></h2> <p><a href="../../../../index.html#key409">after</a>, <a href="../../../../index.html#key63">channel</a>, <a href="../../../../index.html#key217">coroutine</a>, <a href="../../../../index.html#key407">events</a>, <a href="../../../../index.html#key410">exit</a>, <a href="../../../../index.html#key411">gets</a>, <a href="../../../../index.html#key408">global</a>, <a href="../../../../index.html#key414">green threads</a>, <a href="../../../../index.html#key406">read</a>, <a href="../../../../index.html#key405">threads</a>, <a href="../../../../index.html#key412">update</a>, <a href="../../../../index.html#key413">vwait</a></p> </div> <div id="category" class="section"><h2><a name="category">Category</a></h2> <p>Coroutine</p> </div> <div id="copyright" class="section"><h2><a name="copyright">Copyright</a></h2> | | | 213 214 215 216 217 218 219 220 221 222 | <div id="keywords" class="section"><h2><a name="keywords">Keywords</a></h2> <p><a href="../../../../index.html#key409">after</a>, <a href="../../../../index.html#key63">channel</a>, <a href="../../../../index.html#key217">coroutine</a>, <a href="../../../../index.html#key407">events</a>, <a href="../../../../index.html#key410">exit</a>, <a href="../../../../index.html#key411">gets</a>, <a href="../../../../index.html#key408">global</a>, <a href="../../../../index.html#key414">green threads</a>, <a href="../../../../index.html#key406">read</a>, <a href="../../../../index.html#key405">threads</a>, <a href="../../../../index.html#key412">update</a>, <a href="../../../../index.html#key413">vwait</a></p> </div> <div id="category" class="section"><h2><a name="category">Category</a></h2> <p>Coroutine</p> </div> <div id="copyright" class="section"><h2><a name="copyright">Copyright</a></h2> <p>Copyright © 2010-2015 Andreas Kupries <[email protected]></p> </div> </div></body></html> |
Changes to embedded/www/tcllib/files/modules/dns/tcllib_dns.html.
︙ | ︙ | |||
104 105 106 107 108 109 110 | | <a href="../../../../toc.html">Main Table Of Contents</a> | <a href="../../../toc.html">Table Of Contents</a> | <a href="../../../../index.html">Keyword Index</a> | <a href="../../../../toc0.html">Categories</a> | <a href="../../../../toc1.html">Modules</a> | <a href="../../../../toc2.html">Applications</a> ] <hr> | | | 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">dns(n) 1.3.5 tcllib "Domain Name Service"</h1> <div id="name" class="section"><h2><a name="name">Name</a></h2> <p>dns - Tcl Domain Name Service Client</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 | <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> | | | 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">dns <span class="opt">?1.3.5?</span></b></li> </ul> <ul class="syntax"> <li><a href="#1"><b class="cmd">::dns::resolve</b> <i class="arg">query</i> <span class="opt">?<i class="arg">options</i>?</span></a></li> <li><a href="#2"><b class="cmd">::dns::configure</b> <span class="opt">?<i class="arg">options</i>?</span></a></li> <li><a href="#3"><b class="cmd">::dns::name</b> <i class="arg">token</i></a></li> <li><a href="#4"><b class="cmd">::dns::address</b> <i class="arg">token</i></a></li> <li><a href="#5"><b class="cmd">::dns::cname</b> <i class="arg">token</i></a></li> |
︙ | ︙ |
Changes to embedded/www/tcllib/files/modules/dns/tcllib_ip.html.
︙ | ︙ | |||
104 105 106 107 108 109 110 | | <a href="../../../../toc.html">Main Table Of Contents</a> | <a href="../../../toc.html">Table Of Contents</a> | <a href="../../../../index.html">Keyword Index</a> | <a href="../../../../toc0.html">Categories</a> | <a href="../../../../toc1.html">Modules</a> | <a href="../../../../toc2.html">Applications</a> ] <hr> | | | 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">tcllib_ip(n) 1.3 tcllib "Domain Name Service"</h1> <div id="name" class="section"><h2><a name="name">Name</a></h2> <p>tcllib_ip - IPv4 and IPv6 address manipulation</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 | <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> | | > > | | | | | | | | | | | | | | | | | | | | | | 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 | <li 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">ip <span class="opt">?1.3?</span></b></li> </ul> <ul class="syntax"> <li><a href="#1"><b class="cmd">::ip::version</b> <i class="arg">address</i></a></li> <li><a href="#2"><b class="cmd">::ip::is</b> <i class="arg">class</i> <i class="arg">address</i></a></li> <li><a href="#3"><b class="cmd">::ip::equal</b> <i class="arg">address</i> <i class="arg">address</i></a></li> <li><a href="#4"><b class="cmd">::ip::normalize</b> <i class="arg">address</i></a></li> <li><a href="#5"><b class="cmd">::ip::contract</b> <i class="arg">address</i></a></li> <li><a href="#6"><b class="cmd">::ip::distance</b> <i class="arg">ipaddr1</i> <i class="arg">ipaddr2</i></a></li> <li><a href="#7"><b class="cmd">::ip::nextIp</b> <i class="arg">ipaddr</i> <span class="opt">?<i class="arg">offset</i>?</span></a></li> <li><a href="#8"><b class="cmd">::ip::prefix</b> <i class="arg">address</i></a></li> <li><a href="#9"><b class="cmd">::ip::type</b> <i class="arg">address</i></a></li> <li><a href="#10"><b class="cmd">::ip::mask</b> <i class="arg">address</i></a></li> <li><a href="#11"><b class="cmd">::ip::prefixToNative</b> <i class="arg">prefix</i></a></li> <li><a href="#12"><b class="cmd">::ip::nativeToPrefix</b> <i class="arg">nativeList</i>|<i class="arg">native</i> <span class="opt">?<b class="option">-ipv4</b>?</span></a></li> <li><a href="#13"><b class="cmd">::ip::intToString</b> <i class="arg">number</i> <span class="opt">?<b class="option">-ipv4</b>?</span></a></li> <li><a href="#14"><b class="cmd">::ip::toInteger</b> <i class="arg">ipaddr</i></a></li> <li><a href="#15"><b class="cmd">::ip::toHex</b> <i class="arg">ipaddr</i></a></li> <li><a href="#16"><b class="cmd">::ip::maskToInt</b> <i class="arg">ipmask</i></a></li> <li><a href="#17"><b class="cmd">::ip::broadcastAddress</b> <i class="arg">prefix</i> <span class="opt">?<b class="option">-ipv4</b>?</span></a></li> <li><a href="#18"><b class="cmd">::ip::maskToLength</b> <i class="arg">dottedMask</i>|<i class="arg">integerMask</i>|<i class="arg">hexMask</i> <span class="opt">?<b class="option">-ipv4</b>?</span></a></li> <li><a href="#19"><b class="cmd">::ip::lengthToMask</b> <i class="arg">maskLength</i> <span class="opt">?<b class="option">-ipv4</b>?</span></a></li> <li><a href="#20"><b class="cmd">::ip::nextNet</b> <i class="arg">ipaddr</i> <i class="arg">ipmask</i> <span class="opt">?<i class="arg">count</i>?</span> <span class="opt">?<b class="option">-ipv4</b>?</span></a></li> <li><a href="#21"><b class="cmd">::ip::isOverlap</b> <i class="arg">prefix</i> <i class="arg">prefix</i>...</a></li> <li><a href="#22"><b class="cmd">::ip::isOverlapNative</b> <span class="opt">?<b class="option">-all</b>?</span> <span class="opt">?<b class="option">-inline</b>?</span> <span class="opt">?<b class="option">-ipv4</b>?</span> <i class="arg">hexipaddr</i> <i class="arg">hexipmask</i> <i class="arg">hexiplist</i></a></li> <li><a href="#23"><b class="cmd">::ip::ipToLayer2Multicast</b> <i class="arg">ipaddr</i></a></li> <li><a href="#24"><b class="cmd">::ip::ipHostFromPrefix</b> <i class="arg">prefix</i> <span class="opt">?<b class="option">-exclude</b> <i class="arg">prefixExcludeList</i>?</span></a></li> <li><a href="#25"><b class="cmd">::ip::reduceToAggregates</b> <i class="arg">prefixlist</i></a></li> <li><a href="#26"><b class="cmd">::ip::longestPrefixMatch</b> <i class="arg">ipaddr</i> <i class="arg">prefixlist</i> <span class="opt">?<b class="option">-ipv4</b>?</span></a></li> <li><a href="#27"><b class="cmd">::ip::collapse</b> <i class="arg">prefixlist</i></a></li> <li><a href="#28"><b class="cmd">::ip::subtract</b> <i class="arg">prefixlist</i></a></li> </ul> </div> </div> <div id="section1" class="section"><h2><a name="section1">Description</a></h2> <p>This package provides a set of commands to help in parsing, displaying and comparing internet addresses. The package can handle both IPv4 (1) and IPv6 (2) address types.</p> |
︙ | ︙ | |||
189 190 191 192 193 194 195 | <dd><p>Convert an IPv4 or IPv6 address into a fully expanded version. There are various shorthand ways to write internet addresses, missing out redundant parts or digts.. This procedure is the opposite of <b class="cmd">contract</b>.</p></dd> <dt><a name="5"><b class="cmd">::ip::contract</b> <i class="arg">address</i></a></dt> <dd><p>Convert a <b class="cmd">normalize</b>d internet address into a more compact form suitable for displaying to users.</p></dd> | > > > > > > > > > > > > > > > > | | | | | | | | | | | | | | | | 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 | <dd><p>Convert an IPv4 or IPv6 address into a fully expanded version. There are various shorthand ways to write internet addresses, missing out redundant parts or digts.. This procedure is the opposite of <b class="cmd">contract</b>.</p></dd> <dt><a name="5"><b class="cmd">::ip::contract</b> <i class="arg">address</i></a></dt> <dd><p>Convert a <b class="cmd">normalize</b>d internet address into a more compact form suitable for displaying to users.</p></dd> <dt><a name="6"><b class="cmd">::ip::distance</b> <i class="arg">ipaddr1</i> <i class="arg">ipaddr2</i></a></dt> <dd><p>This command computes the (integer) distance from IPv4 address <i class="arg">ipaddr1</i> to IPv4 address <i class="arg">ipaddr2</i>, i.e. "ipaddr2 - ipaddr1"</p> <pre class="example"> % ::ip::distance 1.1.1.1 1.1.1.5 4 </pre> </dd> <dt><a name="7"><b class="cmd">::ip::nextIp</b> <i class="arg">ipaddr</i> <span class="opt">?<i class="arg">offset</i>?</span></a></dt> <dd><p>This command adds the integer <i class="arg">offset</i> to the IPv4 address <i class="arg">ipaddr</i> and returns the new IPv4 address.</p> <pre class="example"> % ::ip::distance 1.1.1.1 4 1.1.1.5 </pre> </dd> <dt><a name="8"><b class="cmd">::ip::prefix</b> <i class="arg">address</i></a></dt> <dd><p>Returns the address prefix generated by masking the address part with the mask if provided. If there is no mask then it is equivalent to calling <b class="cmd">normalize</b></p></dd> <dt><a name="9"><b class="cmd">::ip::type</b> <i class="arg">address</i></a></dt> <dd></dd> <dt><a name="10"><b class="cmd">::ip::mask</b> <i class="arg">address</i></a></dt> <dd><p>If the address supplied includes a mask then this is returned otherwise returns an empty string.</p></dd> <dt><a name="11"><b class="cmd">::ip::prefixToNative</b> <i class="arg">prefix</i></a></dt> <dd><p>This command converts the string <i class="arg">prefix</i> from dotted form (<ipaddr>/<mask> format) to native (hex) form. Returns a list containing two elements, ipaddress and mask, in this order, in hexadecimal notation.</p> <pre class="example"> % ip::prefixToNative 1.1.1.0/24 0x01010100 0xffffff00 </pre> </dd> <dt><a name="12"><b class="cmd">::ip::nativeToPrefix</b> <i class="arg">nativeList</i>|<i class="arg">native</i> <span class="opt">?<b class="option">-ipv4</b>?</span></a></dt> <dd><p>This command converts from native (hex) form to dotted form. It is the complement of <b class="cmd">::ip::prefixToNative</b>.</p> <dl class="arguments"> <dt>list <i class="arg">nativeList</i> (in)</dt> <dd><p>List of several ip addresses in native form. The native form is a list as returned by <b class="cmd">::ip::prefixToNative</b>.</p></dd> <dt>list <i class="arg">native</i> (in)</dt> <dd><p>A list as returned by <b class="cmd">::ip::prefixToNative</b>.</p></dd> </dl> <p>The command returns a list of addresses in dotted form if it was called with a list of addresses. Otherwise a single address in dotted form is returned.</p> <pre class="example"> % ip::nativeToPrefix {0x01010100 0xffffff00} -ipv4 1.1.1.0/24 </pre> </dd> <dt><a name="13"><b class="cmd">::ip::intToString</b> <i class="arg">number</i> <span class="opt">?<b class="option">-ipv4</b>?</span></a></dt> <dd><p>This command converts from an ip address specified as integer number to dotted form.</p> <pre class="example"> ip::intToString 4294967295 255.255.255.255 </pre> </dd> <dt><a name="14"><b class="cmd">::ip::toInteger</b> <i class="arg">ipaddr</i></a></dt> <dd><p>This command converts a dotted form ip into an integer number.</p> <pre class="example"> % ::ip::toInteger 1.1.1.0 16843008 </pre> </dd> <dt><a name="15"><b class="cmd">::ip::toHex</b> <i class="arg">ipaddr</i></a></dt> <dd><p>This command converts dotted form ip into a hexadecimal number.</p> <pre class="example"> % ::ip::toHex 1.1.1.0 0x01010100 </pre> </dd> <dt><a name="16"><b class="cmd">::ip::maskToInt</b> <i class="arg">ipmask</i></a></dt> <dd><p>This command convert an ipmask in either dotted (255.255.255.0) form or mask length form (24) into an integer number.</p> <pre class="example"> ::ip::maskToInt 24 4294967040 </pre> </dd> <dt><a name="17"><b class="cmd">::ip::broadcastAddress</b> <i class="arg">prefix</i> <span class="opt">?<b class="option">-ipv4</b>?</span></a></dt> <dd><p>This commands returns a broadcast address in dotted form for the given route <i class="arg">prefix</i>, either in the form "addr/mask", or in native form. The result is in dotted form.</p> <pre class="example"> ::ip::broadcastAddress 1.1.1.0/24 1.1.1.255 ::ip::broadcastAddress {0x01010100 0xffffff00} 0x010101ff </pre> </dd> <dt><a name="18"><b class="cmd">::ip::maskToLength</b> <i class="arg">dottedMask</i>|<i class="arg">integerMask</i>|<i class="arg">hexMask</i> <span class="opt">?<b class="option">-ipv4</b>?</span></a></dt> <dd><p>This command converts the dotted or integer form of an ipmask to the mask length form.</p> <pre class="example"> ::ip::maskToLength 0xffffff00 -ipv4 24 % ::ip::maskToLength 255.255.255.0 24 </pre> </dd> <dt><a name="19"><b class="cmd">::ip::lengthToMask</b> <i class="arg">maskLength</i> <span class="opt">?<b class="option">-ipv4</b>?</span></a></dt> <dd><p>This command converts an ipmask in mask length form to its dotted form.</p> <pre class="example"> ::ip::lengthToMask 24 255.255.255.0 </pre> </dd> <dt><a name="20"><b class="cmd">::ip::nextNet</b> <i class="arg">ipaddr</i> <i class="arg">ipmask</i> <span class="opt">?<i class="arg">count</i>?</span> <span class="opt">?<b class="option">-ipv4</b>?</span></a></dt> <dd><p>This command returns an ipaddress in the same position in the <i class="arg">count</i> next network. The default value for <i class="arg">count</i> is <b class="const">1</b>.</p> <p>The address can be specified as either integer number or in dotted form. The mask can be specified as either integer number, dotted form, or mask length form.</p> <p>The result is in hex form.</p></dd> <dt><a name="21"><b class="cmd">::ip::isOverlap</b> <i class="arg">prefix</i> <i class="arg">prefix</i>...</a></dt> <dd><p>This command checks if the given ip prefixes overlap. All arguments are in dotted "addr/mask" form. All arguments after the first prefix are compared against the first prefix. The result is a boolean value. It is true if an overlap was found for any of the prefixes.</p> <pre class="example"> % ::ip::isOverlap 1.1.1.0/24 2.1.0.1/32 0 ::ip::isOverlap 1.1.1.0/24 2.1.0.1/32 1.1.1.1/32 1 </pre> </dd> <dt><a name="22"><b class="cmd">::ip::isOverlapNative</b> <span class="opt">?<b class="option">-all</b>?</span> <span class="opt">?<b class="option">-inline</b>?</span> <span class="opt">?<b class="option">-ipv4</b>?</span> <i class="arg">hexipaddr</i> <i class="arg">hexipmask</i> <i class="arg">hexiplist</i></a></dt> <dd><p>This command is similar to <b class="cmd">::ip::isOverlap</b>, however the arguments are in the native form, and the form of the result is under greater control of the caller. If the option <b class="option">-all</b> is specified it checks all addresses for overlap, not only until the first one is found. If the option <b class="option">-inline</b> is specified the command returns the overlapping prefix instead of index values.</p> |
︙ | ︙ | |||
333 334 335 336 337 338 339 | <pre class="example"> % ::ip::isOverlapNative 0x01010100 0xffffff00 {{0x02010001 0xffffffff}} 0 % ::ip::isOverlapNative 0x01010100 0xffffff00 {{0x02010001 0xffffffff} {0x01010101 0xffffffff}} 2 </pre> </dd> | | | | | | | | 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 | <pre class="example"> % ::ip::isOverlapNative 0x01010100 0xffffff00 {{0x02010001 0xffffffff}} 0 % ::ip::isOverlapNative 0x01010100 0xffffff00 {{0x02010001 0xffffffff} {0x01010101 0xffffffff}} 2 </pre> </dd> <dt><a name="23"><b class="cmd">::ip::ipToLayer2Multicast</b> <i class="arg">ipaddr</i></a></dt> <dd><p>This command an converts ipv4 address in dotted form into a layer 2 multicast address, also in dotted form.</p> <pre class="example"> % ::ip::ipToLayer2Multicast 224.0.0.2 01.00.5e.00.00.02 </pre> </dd> <dt><a name="24"><b class="cmd">::ip::ipHostFromPrefix</b> <i class="arg">prefix</i> <span class="opt">?<b class="option">-exclude</b> <i class="arg">prefixExcludeList</i>?</span></a></dt> <dd><p>This command returns a host address from a prefix in the form "ipaddr/masklen", also making sure that the result is not an address found in the <i class="arg">prefixExcludeList</i>. The result is an ip address in dotted form.</p> <pre class="example"> %::ip::ipHostFromPrefix 1.1.1.5/24 1.1.1.1 %::ip::ipHostFromPrefix 1.1.1.1/32 1.1.1.1 </pre> </dd> <dt><a name="25"><b class="cmd">::ip::reduceToAggregates</b> <i class="arg">prefixlist</i></a></dt> <dd><p>This command finds nets that overlap and filters out the more specific nets. The prefixes are in either addr/mask form or in native format. The result is a list containing the non-overlapping ip prefixes from the input.</p> <pre class="example"> % ::ip::reduceToAggregates {1.1.1.0/24 1.1.0.0/8 2.1.1.0/24 1.1.1.1/32 } 1.0.0.0/8 2.1.1.0/24 </pre> </dd> <dt><a name="26"><b class="cmd">::ip::longestPrefixMatch</b> <i class="arg">ipaddr</i> <i class="arg">prefixlist</i> <span class="opt">?<b class="option">-ipv4</b>?</span></a></dt> <dd><p>This command finds longest prefix match from set of prefixes, given a specific host address. The prefixes in the list are in either native or dotted form, whereas the host address is in either ipprefix format, dotted form, or integer form. The result is the prefix which is the most specific match to the host address.</p> <pre class="example"> % ::ip::longestPrefixMatch 1.1.1.1 {1.1.1.0/24 1.0.0.0/8 2.1.1.0/24 1.1.1.0/28 } 1.1.1.0/28 </pre> </dd> <dt><a name="27"><b class="cmd">::ip::collapse</b> <i class="arg">prefixlist</i></a></dt> <dd><p>This commands takes a list of prefixes and returns a list prefixes with the largest possible subnet masks covering the input, in this manner collapsing adjacent prefixes into larger ranges.</p> <p>This is different from <b class="cmd">::ip::reduceToAggregates</b> in that the latter only removes specific nets from a list when they are covered by other elements of the input whereas this command actively merges nets into larger ranges when they are adjacent to each other.</p> <pre class="example"> % ::ip::collapse {1.2.2.0/24 1.2.3.0/24} 1.2.2.0/23 </pre> </dd> <dt><a name="28"><b class="cmd">::ip::subtract</b> <i class="arg">prefixlist</i></a></dt> <dd><p>This command takes a list of prefixes, some of which are prefixed by a dash. These latter <i class="term">negative</i> prefixes are used to punch holes into the ranges described by the other, <i class="term">positive</i>, prefixes. I.e. the negative prefixes are subtracted frrom the positive ones, resulting in a larger list of describes describing the covered ranges only as positives.</p></dd> </dl> |
︙ | ︙ |
Changes to embedded/www/tcllib/files/modules/html/html.html.
︙ | ︙ | |||
102 103 104 105 106 107 108 | | <a href="../../../../toc.html">Main Table Of Contents</a> | <a href="../../../toc.html">Table Of Contents</a> | <a href="../../../../index.html">Keyword Index</a> | <a href="../../../../toc0.html">Categories</a> | <a href="../../../../toc1.html">Modules</a> | <a href="../../../../toc2.html">Applications</a> ] <hr> | | | | 102 103 104 105 106 107 108 109 110 111 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">html(n) 1.4.4 tcllib "HTML Generation"</h1> <div id="name" class="section"><h2><a name="name">Name</a></h2> <p>html - Procedures to generate HTML structures</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">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.2</b></li> <li>package require <b class="pkgname">html <span class="opt">?1.4.4?</span></b></li> </ul> <ul class="syntax"> <li><a href="#1"><b class="cmd">::html::author</b> <i class="arg">author</i></a></li> <li><a href="#2"><b class="cmd">::html::bodyTag</b> <i class="arg">args</i></a></li> <li><a href="#3"><b class="cmd">::html::cell</b> <i class="arg">param value</i> <span class="opt">?<i class="arg">tag</i>?</span></a></li> <li><a href="#4"><b class="cmd">::html::checkbox</b> <i class="arg">name value</i></a></li> <li><a href="#5"><b class="cmd">::html::checkSet</b> <i class="arg">key sep list</i></a></li> |
︙ | ︙ |
Changes to embedded/www/tcllib/files/modules/struct/pool.html.
︙ | ︙ | |||
104 105 106 107 108 109 110 | | <a href="../../../../toc.html">Main Table Of Contents</a> | <a href="../../../toc.html">Table Of Contents</a> | <a href="../../../../index.html">Keyword Index</a> | <a href="../../../../toc0.html">Categories</a> | <a href="../../../../toc1.html">Modules</a> | <a href="../../../../toc2.html">Applications</a> ] <hr> | | | 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">struct::pool(n) 1.2.3 tcllib "Tcl Data Structures"</h1> <div id="name" class="section"><h2><a name="name">Name</a></h2> <p>struct::pool - Create and manipulate pool objects (of discrete items)</p> </div> <div id="toc" class="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 | <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> | | | 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">struct::pool <span class="opt">?1.2.3?</span></b></li> </ul> <ul class="syntax"> <li><a href="#1"><b class="cmd">::struct::pool</b> <span class="opt">?<i class="arg">poolName</i>?</span> <span class="opt">?<i class="arg">maxsize</i>?</span></a></li> <li><a href="#2"><b class="cmd">poolName</b> <i class="arg">option</i> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li> <li><a href="#3"><i class="arg">poolName</i> <b class="method">add</b> <i class="arg">itemName1</i> <span class="opt">?<i class="arg">itemName2 itemName3 ...</i>?</span></a></li> <li><a href="#4"><i class="arg">poolName</i> <b class="method">clear</b> <span class="opt">?<b class="option">-force</b>?</span></a></li> <li><a href="#5"><i class="arg">poolName</i> <b class="method">destroy</b> <span class="opt">?<b class="option">-force</b>?</span></a></li> |
︙ | ︙ |
Changes to embedded/www/tcllib/files/modules/textutil/adjust.html.
1 2 3 4 5 6 7 | <html><head> <title>textutil::adjust - Text and string utilities, macro processing</title> <style type="text/css"><!-- HTML { background: #FFFFFF; color: black; } | > | 1 2 3 4 5 6 7 8 | <html><head> <title>textutil::adjust - Text and string utilities, macro processing</title> <style type="text/css"><!-- HTML { background: #FFFFFF; color: black; } |
︙ | ︙ | |||
101 102 103 104 105 106 107 | | <a href="../../../../toc.html">Main Table Of Contents</a> | <a href="../../../toc.html">Table Of Contents</a> | <a href="../../../../index.html">Keyword Index</a> | <a href="../../../../toc0.html">Categories</a> | <a href="../../../../toc1.html">Modules</a> | <a href="../../../../toc2.html">Applications</a> ] <hr> | | | | 102 103 104 105 106 107 108 109 110 111 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">textutil::adjust(n) 0.7.3 tcllib "Text and string utilities, macro processing"</h1> <div id="name" class="section"><h2><a name="name">Name</a></h2> <p>textutil::adjust - Procedures to adjust, indent, and undent paragraphs</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">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.2</b></li> <li>package require <b class="pkgname">textutil::adjust <span class="opt">?0.7.3?</span></b></li> </ul> <ul class="syntax"> <li><a href="#1"><b class="cmd">::textutil::adjust::adjust</b> <i class="arg">string</i> <span class="opt">?<i class="arg">option value...</i>?</span></a></li> <li><a href="#2"><b class="cmd">::textutil::adjust::readPatterns</b> <i class="arg">filename</i></a></li> <li><a href="#3"><b class="cmd">::textutil::adjust::listPredefined</b></a></li> <li><a href="#4"><b class="cmd">::textutil::adjust::getPredefined</b> <i class="arg">filename</i></a></li> <li><a href="#5"><b class="cmd">::textutil::adjust::indent</b> <i class="arg">string</i> <i class="arg">prefix</i> <span class="opt">?<i class="arg">skip</i>?</span></a></li> |
︙ | ︙ |
Changes to embedded/www/tcllib/files/modules/uri/uri.html.
1 2 3 4 5 6 7 | <html><head> <title>uri - Tcl Uniform Resource Identifier Management</title> <style type="text/css"><!-- HTML { background: #FFFFFF; color: black; } | > | 1 2 3 4 5 6 7 8 | <html><head> <title>uri - Tcl Uniform Resource Identifier Management</title> <style type="text/css"><!-- HTML { background: #FFFFFF; color: black; } |
︙ | ︙ | |||
101 102 103 104 105 106 107 | | <a href="../../../../toc.html">Main Table Of Contents</a> | <a href="../../../toc.html">Table Of Contents</a> | <a href="../../../../index.html">Keyword Index</a> | <a href="../../../../toc0.html">Categories</a> | <a href="../../../../toc1.html">Modules</a> | <a href="../../../../toc2.html">Applications</a> ] <hr> | | | 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | | <a href="../../../../toc.html">Main Table Of Contents</a> | <a href="../../../toc.html">Table Of Contents</a> | <a href="../../../../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">uri(n) 1.2.5 tcllib "Tcl Uniform Resource Identifier Management"</h1> <div id="name" class="section"><h2><a name="name">Name</a></h2> <p>uri - URI utilities</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> |
︙ | ︙ | |||
123 124 125 126 127 128 129 | <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.2</b></li> | | | 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 | <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.2</b></li> <li>package require <b class="pkgname">uri <span class="opt">?1.2.5?</span></b></li> </ul> <ul class="syntax"> <li><a href="#1"><b class="cmd">uri::split</b> <i class="arg">url</i> <span class="opt">?<i class="arg">defaultscheme</i>?</span></a></li> <li><a href="#2"><b class="cmd">uri::join</b> <span class="opt">?<i class="arg">key</i> <i class="arg">value</i>?</span>...</a></li> <li><a href="#3"><b class="cmd">uri::resolve</b> <i class="arg">base</i> <i class="arg">url</i></a></li> <li><a href="#4"><b class="cmd">uri::isrelative</b> <i class="arg">url</i></a></li> <li><a href="#5"><b class="cmd">uri::geturl</b> <i class="arg">url</i> <span class="opt">?<i class="arg">options</i>...?</span></a></li> |
︙ | ︙ |
Changes to modules/control/control.tcl.
1 2 3 4 5 6 7 8 9 | # control.tcl -- # # This is the main package provide script for the package # "control". It provides commands that govern the flow of # control of a program. package require Tcl 8.2 namespace eval ::control { | < | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # control.tcl -- # # This is the main package provide script for the package # "control". It provides commands that govern the flow of # control of a program. package require Tcl 8.2 namespace eval ::control { namespace export assert control do no-op rswitch proc control {command args} { # Need to add error handling here namespace eval [list $command] $args } |
︙ | ︙ |
Changes to modules/dns/dns.tcl.
︙ | ︙ | |||
259 260 261 262 263 264 265 | set state(-type) PTR } BuildMessage $token if {$state(-protocol) == "tcp"} { TcpTransmit $token | < < < > > | | 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 | set state(-type) PTR } BuildMessage $token if {$state(-protocol) == "tcp"} { TcpTransmit $token } else { UdpTransmit $token } if {$state(-command) == {}} { wait $token } return $token } # ------------------------------------------------------------------------- # Description: # Return a list of domain names returned as results for the last query. |
︙ | ︙ | |||
1405 1406 1407 1408 1409 1410 1411 | return "dns:$query" } # ------------------------------------------------------------------------- catch {dns::configure -nameserver [lindex [dns::nameservers] 0]} | | | 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 | return "dns:$query" } # ------------------------------------------------------------------------- catch {dns::configure -nameserver [lindex [dns::nameservers] 0]} package provide dns 1.3.5 # ------------------------------------------------------------------------- # Local Variables: # indent-tabs-mode: nil # End: |
Changes to modules/dns/ip.tcl.
︙ | ︙ | |||
541 542 543 544 545 546 547 | # ------------------------------------------------------------------------- # Load extended command set. source [file join [file dirname [info script]] ipMore.tcl] # ------------------------------------------------------------------------- | | | 541 542 543 544 545 546 547 548 549 550 551 552 553 | # ------------------------------------------------------------------------- # Load extended command set. source [file join [file dirname [info script]] ipMore.tcl] # ------------------------------------------------------------------------- package provide ip 1.3 # ------------------------------------------------------------------------- # Local Variables: # indent-tabs-mode: nil # End: |
Changes to modules/dns/ipMore.tcl.
︙ | ︙ | |||
83 84 85 86 87 88 89 | set list [concat [lrange $list 0 [expr $index - 1]] \ [lrange $list [expr $index +1] end]]; return $top; } } # Some additional aliases for backward compatability. Not | | | 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | set list [concat [lrange $list 0 [expr $index - 1]] \ [lrange $list [expr $index +1] end]]; return $top; } } # Some additional aliases for backward compatability. Not # documented. The old names are from previous versions while at Cisco. # # Old command name --> Documented command name interp alias {} ::ip::ToInteger {} ::ip::toInteger interp alias {} ::ip::ToHex {} ::ip::toHex interp alias {} ::ip::MaskToInt {} ::ip::maskToInt interp alias {} ::ip::MaskToLength {} ::ip::maskToLength interp alias {} ::ip::LengthToMask {} ::ip::lengthToMask |
︙ | ︙ | |||
285 286 287 288 289 290 291 | # convert dotted form ip to integer # # Synopsis: # toInteger <ipaddr> # # Arguments: # <ipaddr> | | | 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 | # convert dotted form ip to integer # # Synopsis: # toInteger <ipaddr> # # Arguments: # <ipaddr> # decimal dotted form ip address # # Return Values: # integer form of <ipaddr> # # Description: # # Examples: |
︙ | ︙ | |||
308 309 310 311 312 313 314 | # # See Also: # # End of Header proc ::ip::toInteger {ip} { binary scan [ip::Normalize4 $ip] I out | | | 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 | # # See Also: # # End of Header proc ::ip::toInteger {ip} { binary scan [ip::Normalize4 $ip] I out return [format %lu [expr {$out & 0xffffffff}]] } ##Procedure Header # Copyright (c) 2004 Cisco Systems, Inc. # # Name: # ::ip::toHex |
︙ | ︙ | |||
1210 1211 1212 1213 1214 1215 1216 | variable x for {set x 0} {$x <33} {incr x} { set maskLenToDotted($x) [intToString [maskToInt $x]] } unset x } | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 | variable x for {set x 0} {$x <33} {incr x} { set maskLenToDotted($x) [intToString [maskToInt $x]] } unset x } ##Procedure Header # Copyright (c) 2015 Martin Heinrich <[email protected]> # # Name: # ::ip::distance # # Purpose: # Calculate integer distance between two IPv4 addresses (dotted form or int) # # Synopsis: # distance <ipaddr1> <ipaddr2> # # Arguments: # <ipaddr1> # <ipaddr2> # ip address # # Return Values: # integer distance (addr2 - addr1) # # Description: # # Examples: # % ::ip::distance 1.1.1.0 1.1.1.5 # 5 # # Sample Input: # # Sample Output: proc ::ip::distance {ip1 ip2} { # use package ip for normalization # XXX does not support ipv6 expr {[toInteger $ip2]-[toInteger $ip1]} } ##Procedure Header # Copyright (c) 2015 Martin Heinrich <[email protected]> # # Name: # ::ip::nextIp # # Purpose: # Increment the given IPv4 address by an offset. # Complement to 'distance'. # # Synopsis: # nextIp <ipaddr> ?<offset>? # # Arguments: # <ipaddr> # ip address # # <offset> # The integer to increment the address by. # Default is 1. # # Return Values: # The increment ip address. # # Description: # # Examples: # % ::ip::nextIp 1.1.1.0 5 # 1.1.1.5 # # Sample Input: # # Sample Output: proc ::ip::nextIp {ip {offset 1}} { set int [toInteger $ip] incr int $offset set prot {} # TODO if ipv4 then set prot -ipv4, but # XXX intToString has -ipv4, but never returns ipv6 intToString $int ;# 8.5-ism, avoid: {*}$prot } |
Changes to modules/dns/ipMore.test.
︙ | ︙ | |||
719 720 721 722 723 724 725 726 727 728 729 730 731 732 | } -constraints { } -cleanup { unset iplist } -body { set a [lsort -command ip::cmpDotIP $iplist] } -result {1.0.0.0 2.2.0.0 3.3.3.3 128.0.0.0} } namespace delete ::ip::test testsuiteCleanup # | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 | } -constraints { } -cleanup { unset iplist } -body { set a [lsort -command ip::cmpDotIP $iplist] } -result {1.0.0.0 2.2.0.0 3.3.3.3 128.0.0.0} ::tcltest::test ip::distance-1 {basic distance} -setup { } -constraints { } -cleanup { } -body { ::ip::distance 1.1.1.0 1.1.1.5 } -result 5 ::tcltest::test ip::distance-2 {distance, not enough args} -setup { } -constraints { } -cleanup { } -body { ::ip::distance } -returnCodes error -result {wrong # args: should be "::ip::distance ip1 ip2"} ::tcltest::test ip::distance-3 {distance, too many args} -setup { } -constraints { } -cleanup { } -body { ::ip::distance 1.1.1.1 1.1.1.5 1.1.1.19 } -returnCodes error -result {wrong # args: should be "::ip::distance ip1 ip2"} ::tcltest::test ip::nextIp-1 {basic nextIp} -setup { } -constraints { } -cleanup { } -body { ::ip::nextIp 1.1.1.0 5 } -result 1.1.1.5 ::tcltest::test ip::nextIp-2 {nextIp, not enough args} -setup { } -constraints { } -cleanup { } -body { ::ip::nextIp } -returnCodes error -result {wrong # args: should be "::ip::nextIp ip ?offset?"} ::tcltest::test ip::nextIp-3 {nextIp, too many args} -setup { } -constraints { } -cleanup { } -body { ::ip::nextIp 1.1.1.1 1.1.1.5 1.1.1.19 } -returnCodes error -result {wrong # args: should be "::ip::nextIp ip ?offset?"} foreach {n delta ip1 ip2} { 0 4294967295 0.0.0.0 255.255.255.255 1 -4294967295 255.255.255.255 0.0.0.0 2 7709 10.11.12.13 10.11.42.42 3 -7709 10.11.42.42 10.11.12.13 4 1994195353 54.229.115.42 173.194.116.195 5 -1994195353 173.194.116.195 54.229.115.42 } { ::tcltest::test ip::distance-4.$n {basic distance} -setup { } -constraints { } -cleanup { } -body { ::ip::distance $ip1 $ip2 } -result $delta ::tcltest::test ip::nextIp-4.$n {basic nextIp} -setup { } -constraints { } -cleanup { } -body { ::ip::nextIp $ip1 $delta } -result $ip2 } } namespace delete ::ip::test testsuiteCleanup # |
︙ | ︙ |
Changes to modules/dns/pkgIndex.tcl.
1 2 3 4 5 | # pkgIndex.tcl - # # $Id: pkgIndex.tcl,v 1.21 2010/08/16 17:35:18 andreas_kupries Exp $ if {![package vsatisfies [package provide Tcl] 8.2]} {return} | | | | 1 2 3 4 5 6 7 8 9 | # pkgIndex.tcl - # # $Id: pkgIndex.tcl,v 1.21 2010/08/16 17:35:18 andreas_kupries Exp $ if {![package vsatisfies [package provide Tcl] 8.2]} {return} package ifneeded dns 1.3.5 [list source [file join $dir dns.tcl]] package ifneeded resolv 1.0.3 [list source [file join $dir resolv.tcl]] package ifneeded ip 1.3 [list source [file join $dir ip.tcl]] package ifneeded spf 1.1.1 [list source [file join $dir spf.tcl]] |
Changes to modules/dns/tcllib_dns.man.
|
| | | 1 2 3 4 5 6 7 8 | [vset DNS_VERSION 1.3.5] [manpage_begin dns n [vset DNS_VERSION]] [see_also resolver(5)] [keywords DNS] [keywords {domain name service}] [keywords resolver] [keywords {rfc 1034}] [keywords {rfc 1035}] |
︙ | ︙ |
Changes to modules/dns/tcllib_ip.man.
|
| | | 1 2 3 4 5 6 7 8 | [vset IP_VERSION 1.3] [manpage_begin tcllib_ip n [vset IP_VERSION]] [see_also inet(3)] [see_also ip(7)] [see_also ipv6(7)] [keywords {internet address}] [keywords ip] [keywords ipv4] |
︙ | ︙ | |||
53 54 55 56 57 58 59 60 61 62 63 64 65 66 | redundant parts or digts.. This procedure is the opposite of [cmd contract]. [call [cmd ::ip::contract] [arg address]] Convert a [cmd normalize]d internet address into a more compact form suitable for displaying to users. [call [cmd ::ip::prefix] [arg address]] Returns the address prefix generated by masking the address part with the mask if provided. If there is no mask then it is equivalent to calling [cmd normalize] | > > > > > > > > > > > > > > > > > > > > > > | 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | redundant parts or digts.. This procedure is the opposite of [cmd contract]. [call [cmd ::ip::contract] [arg address]] Convert a [cmd normalize]d internet address into a more compact form suitable for displaying to users. [call [cmd ::ip::distance] [arg ipaddr1] [arg ipaddr2]] This command computes the (integer) distance from IPv4 address [arg ipaddr1] to IPv4 address [arg ipaddr2], i.e. "ipaddr2 - ipaddr1" [para] [example { % ::ip::distance 1.1.1.1 1.1.1.5 4 }] [call [cmd ::ip::nextIp] [arg ipaddr] [opt [arg offset]]] This command adds the integer [arg offset] to the IPv4 address [arg ipaddr] and returns the new IPv4 address. [para] [example { % ::ip::distance 1.1.1.1 4 1.1.1.5 }] [call [cmd ::ip::prefix] [arg address]] Returns the address prefix generated by masking the address part with the mask if provided. If there is no mask then it is equivalent to calling [cmd normalize] |
︙ | ︙ |
Changes to modules/uri/pkgIndex.tcl.
1 2 3 4 | if {![package vsatisfies [package provide Tcl] 8.2]} { # FRINK: nocheck return } | | | 1 2 3 4 5 6 | if {![package vsatisfies [package provide Tcl] 8.2]} { # FRINK: nocheck return } package ifneeded uri 1.2.5 [list source [file join $dir uri.tcl]] package ifneeded uri::urn 1.0.3 [list source [file join $dir urn-scheme.tcl]] |
Changes to modules/uri/uri.man.
|
| > | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | [vset VERSION 1.2.5] [manpage_begin uri n [vset VERSION]] [keywords {fetching information}] [keywords file] [keywords ftp] [keywords gopher] [keywords http] [keywords ldap] [keywords mailto] [keywords news] [keywords prospero] [keywords {rfc 2255}] [keywords {rfc 2396}] [keywords uri] [keywords url] [keywords wais] [keywords www] [moddesc {Tcl Uniform Resource Identifier Management}] [titledesc {URI utilities}] [category Networking] [require Tcl 8.2] [require uri [opt [vset VERSION]]] [description] This package contains two parts. First it provides regular expressions for a number of url/uri schemes. Second it provides a number of commands for manipulating urls/uris and fetching data specified by them. For the latter this package analyses the requested url/uri and then dispatches it to the appropriate package (http, ftp, ...) for |
︙ | ︙ |
Changes to modules/uri/uri.tcl.
︙ | ︙ | |||
651 652 653 654 655 656 657 | # # Results: # Returns a URL proc ::uri::resolve {base url} { if {[string length $url]} { if {[isrelative $url]} { | < > > > > > > < | 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 | # # Results: # Returns a URL proc ::uri::resolve {base url} { if {[string length $url]} { if {[isrelative $url]} { array set baseparts [split $base] switch -- $baseparts(scheme) { http - https - ftp - file { array set relparts [split $baseparts(scheme):$url] if { [string match /* $url] } { catch { set baseparts(path) $relparts(path) } # RFC 3986 section 4.2 - no scheme, but authority (host), keep authority catch { if {$relparts(host) != ""} { set baseparts(host) $relparts(host) } } } elseif { [string match */ $baseparts(path)] } { set baseparts(path) "$baseparts(path)$relparts(path)" } else { if { [string length $relparts(path)] > 0 } { set path [lreplace [::split $baseparts(path) /] end end] set baseparts(path) "[::join $path /]/$relparts(path)" } } catch { set baseparts(query) $relparts(query) } catch { set baseparts(fragment) $relparts(fragment) } return [eval [linsert [array get baseparts] 0 join]] } default { return -code error "unable to resolve relative URL \"$url\"" } } } else { return $url } } else { return $base } } |
︙ | ︙ | |||
1037 1038 1039 1040 1041 1042 1043 | variable filter {[^?]*} # extensions are not handled yet variable schemepart "//${hostOrPort}(/${dn}(\?${attrs}(\?(${scope})(\?${filter})?)?)?)?" variable url "ldap:$schemepart" } | | | 1041 1042 1043 1044 1045 1046 1047 1048 | variable filter {[^?]*} # extensions are not handled yet variable schemepart "//${hostOrPort}(/${dn}(\?${attrs}(\?(${scope})(\?${filter})?)?)?)?" variable url "ldap:$schemepart" } package provide uri 1.2.5 |
Changes to modules/uri/uri.test.
︙ | ︙ | |||
215 216 217 218 219 220 221 222 223 224 225 226 227 228 | } http://www.example.com/?shoo=bee test uri-3.10 {uri::resolve - two queries, one absolute URL, one absolute path} { uri::resolve http://www.example.com/baz?foo=bar /baz?shoo=bee } http://www.example.com/baz?shoo=bee # ------------------------------------------------------------------------- test uri-4.1 {uri::geturl} { set data [info commands] set file [makeFile {} __testdata] set f [open $file w] | > > > > > > > > > > > > > | 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 | } http://www.example.com/?shoo=bee test uri-3.10 {uri::resolve - two queries, one absolute URL, one absolute path} { uri::resolve http://www.example.com/baz?foo=bar /baz?shoo=bee } http://www.example.com/baz?shoo=bee test uri-3.11 {uri::resolve - scheme-relative url with authority, rfc3986 4.2} { uri::resolve http://www.foo.com/ //www.bar.com/ } http://www.bar.com/ test uri-3.12 {uri::resolve - scheme-relative url with authority, rfc3986 4.2} { uri::resolve https://www.foo.com/ //www.bar.com/ } https://www.bar.com/ test uri-3.13 {uri::resolve - scheme-relative url with authority, rfc3986 4.2} { uri::resolve https://www.foo.com/ //www.bar.com } https://www.bar.com/ # ------------------------------------------------------------------------- test uri-4.1 {uri::geturl} { set data [info commands] set file [makeFile {} __testdata] set f [open $file w] |
︙ | ︙ |