tcl-hacks

Check-in [f89c14d2f7]
Login

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

Overview
Comment:more subcommand/option resolution, hacks for zlib
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:f89c14d2f737c447d46faa56e5f6f437ca8603d4
User & Date: aspect 2018-07-21 13:36:59
Context
2018-07-22
01:32
merge procmap-tk, some extra workarounds for Tk command weirdness. Geometry managers give stupid errors check-in: b39089759c user: aspect tags: trunk
2018-07-21
13:36
more subcommand/option resolution, hacks for zlib check-in: f89c14d2f7 user: aspect tags: trunk
12:42
remove debugging prints check-in: ac60259978 user: aspect tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to procmap/procmap.tcl.

26
27
28
29
30
31
32
33
34
35



36
37
38
39
40
41
42
..
44
45
46
47
48
49
50




51
52
53
54
55
56
57
...
302
303
304
305
306
307
308
309

310
311
312
313
314
315
316
...
358
359
360
361
362
363
364

365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384

385
386
387
388
389
390


391
392
393
394
395








396
397
398
399
400
401
402
...
414
415
416
417
418
419
420

421
422
423
424
425
426
427
# This can not be permitted alongside args.
# Alongside that "literal" would be nice too ... or maybe $literal? is an inversion too cute?
#
namespace eval procmap {
    proc DecodeUnknownArgs {err cmd} {
        set re [string map {` \"} {(?:[Bb]ad|[Uu]nknown(?: or ambiguous))? (?:(?:sub)?command|method|option|argument|mode) `([^`]*)`: (?:must|should) be(?: one of)?:? +(.*)}]
        if {[regexp $re $err -> subcmd alts]} {
            set alts [regexp -all -inline {\w+} $alts]
            if {[lindex $alts end-1] eq "or"} {
                set alts [lreplace $alts end-1 end-1]



            }
        } else {
            throw {PROCMAP DECODE} "Failed to decode Unknown message \"$err\""
        }
        if {[string match -* [lindex $alts 0]]} {
            return [dict create options $alts]
        } else {
................................................................................
        }
    }
    proc DecodeWrongArgs {err cmd} {
        set re [string map {` \"} {^wrong # args: should be(.*)$}]
        set qre [string map {` \"} { +`([^`]*)`}]
        if {[regexp $re $err -> match]} {
            set argspecs [lmap {_ match} [regexp -inline -all $qre $match] {




                if {[string match $cmd* $match]} {
                    string range $match [string length $cmd]+1 end
                } else {
                    string range $match [string first " " $match]+1 end
                }
            }]
        } else {
................................................................................
                } trap {PROCMAP DECODE} {} {
                    DecodeUnknownArgs $e $cmd
                }
            } on error {} {
                puts "Unable to parse {$e}: $cmd"
            }
        } on ok {} {
            return -code error "$cmd didn't squeal!"

        }
    }
    proc mapprocs {} {
        variable arghelp
        set maxfirst {
            break continue
            exit cd
................................................................................
            puts "Examining $cmd ..."
            after 10    ;# delay for good luck .. raise this if you're squeamish!
            if {$cmd in $maxfirst} {
                set res [procmap::examine [list {*}$cmd XXXXXXXX {*}[lrepeat 100 100]]]
            } else {
                set res [procmap::examine $cmd]
            }

            if {$cmd in $doms || -1 != [lsearch -glob [dict get $res arghelps] "subcommand*"]} {
                set res [dict merge $res [procmap::examine [list {*}$cmd NOSUCHSUBCOMMANDEVEREVERISAYEVER]]]
            }
            if {[dict exists $res subcommands]} {
                lappend procs {*}[lmap sub [dict get $res subcommands] {list {*}$cmd $sub}]
            }
            if {[dict exists $res arghelps]} {
                foreach argspec [dict get $res arghelps] {
                    # option ?options? ?options...?
                    # "?-option ...?" "?-option value ...?" "?option value ..." "?-option value...?"
                    set re {\moptions?\M|\?-?options?\M[^?]*\?}
                    if {[regexp $re $argspec -> optstr]} {
                        if {[string match "*value*" $optstr]} {
                            regsub $re $argspec "-nosuchoption xxx" argspec
                        } else {
                            regsub $re $argspec "-nosuchoption" argspec
                        }
                        regsub -all {\?.*?\?} $argspec "" argspec
                        regsub -all {\.\.\.} $argspec "" argspec
                        regsub -all channelId $argspec stdin argspec

                        regsub -all className $argspec ::oo::class argspec
                        regsub -all objName $argspec ::oo::object argspec
                        regsub -all cmdname $argspec namespace argspec  ;# this should be an ensemble
                        set res [dict merge $res [procmap::examine [list {*}$cmd {*}$argspec]]]
                    }
                }


            }
            puts ">> $res"
            dict set arghelp $cmd $res
        }
    }








}

if 0 {
    oo::class create foo {method foo {bah hum bug} {}; forward bar puts -nonewline stderr}
    foo create fu
    oo::objdefine fu method fa {lala la} {}
    oo::objdefine fu forward baa puts
................................................................................
    } {
        puts $cmd\t[procmap::whatnext {*}$cmd]
    }
    foreach cmd {puts socket switch procmap::examine {namespace ensemble configure} {namespace HAHA} {fu LOL} {fu fa} {fu baa} {fu bar TOO MANY ARGS}} {
        puts EXAMINE\t$cmd\t[procmap::examine $cmd]
    }
}


apply {{} {
    puts "Are you sure?  This could be dangerous."
    gets stdin
    set outf [open [file join [file dirname [info script]] procmap_lib.tcl] w]
    puts $outf "# Tcl [info patchlevel] from [info nameofexe] at ([clock seconds]) [clock format [clock seconds]]"
    foreach {k v} [array get ::tcl_platform] {







|


>
>
>







 







>
>
>
>







 







|
>







 







>
|


<
<
<
<
|
|
|
|
|
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
>
>





>
>
>
>
>
>
>
>







 







>







26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
..
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
...
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
...
366
367
368
369
370
371
372
373
374
375
376




377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
...
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
# This can not be permitted alongside args.
# Alongside that "literal" would be nice too ... or maybe $literal? is an inversion too cute?
#
namespace eval procmap {
    proc DecodeUnknownArgs {err cmd} {
        set re [string map {` \"} {(?:[Bb]ad|[Uu]nknown(?: or ambiguous))? (?:(?:sub)?command|method|option|argument|mode) `([^`]*)`: (?:must|should) be(?: one of)?:? +(.*)}]
        if {[regexp $re $err -> subcmd alts]} {
            set alts [regexp -all -inline -- {(?:-|\w)+} $alts]
            if {[lindex $alts end-1] eq "or"} {
                set alts [lreplace $alts end-1 end-1]
            }
            if {[lrange $alts end-2 end] eq "or an integer"} {          ;# hack for [after]
                set alts [lreplace $alts end-2 end]
            }
        } else {
            throw {PROCMAP DECODE} "Failed to decode Unknown message \"$err\""
        }
        if {[string match -* [lindex $alts 0]]} {
            return [dict create options $alts]
        } else {
................................................................................
        }
    }
    proc DecodeWrongArgs {err cmd} {
        set re [string map {` \"} {^wrong # args: should be(.*)$}]
        set qre [string map {` \"} { +`([^`]*)`}]
        if {[regexp $re $err -> match]} {
            set argspecs [lmap {_ match} [regexp -inline -all $qre $match] {
                # hack for [zlib push]
                if {[regexp {^::zlib (push|stream) mode } $match] && [regexp {^::zlib (push|stream) } $cmd]} {
                    regsub { mode } $match " [lindex $cmd 2] " match
                }
                if {[string match $cmd* $match]} {
                    string range $match [string length $cmd]+1 end
                } else {
                    string range $match [string first " " $match]+1 end
                }
            }]
        } else {
................................................................................
                } trap {PROCMAP DECODE} {} {
                    DecodeUnknownArgs $e $cmd
                }
            } on error {} {
                puts "Unable to parse {$e}: $cmd"
            }
        } on ok {} {
            puts "NO SQUEAL: $cmd"
            return ""
        }
    }
    proc mapprocs {} {
        variable arghelp
        set maxfirst {
            break continue
            exit cd
................................................................................
            puts "Examining $cmd ..."
            after 10    ;# delay for good luck .. raise this if you're squeamish!
            if {$cmd in $maxfirst} {
                set res [procmap::examine [list {*}$cmd XXXXXXXX {*}[lrepeat 100 100]]]
            } else {
                set res [procmap::examine $cmd]
            }
            dict lappend res arghelps   ;# makes it easier if we can assume this key exists
            if {$cmd in $doms || -1 != [lsearch -regexp [dict get $res arghelps] "^(subcommand)"]} { ;# mode for zlib
                set res [dict merge $res [procmap::examine [list {*}$cmd NOSUCHSUBCOMMANDEVEREVERISAYEVER]]]
            }




            foreach argspec [dict get $res arghelps] {
                # option ?options? ?options...?
                # "?-option ...?" "?-option value ...?" "?option value ..." "?-option value...?"
                set re {\moptions?\M|\?-?options?\M[^?]*\?}
                if {[regexp $re $argspec -> optstr]} {
                    if {[string match "*value*" $optstr]} {
                        regsub $re $argspec "-nosuchoption xxx" argspec
                    } else {
                        regsub $re $argspec "-nosuchoption" argspec
                    }
                    regsub -all {\?.*?\?} $argspec "" argspec
                    regsub -all {\.\.\.} $argspec "" argspec
                    regsub -all channelId $argspec [tempfile] argspec
                    regsub -all channel $argspec [tempfile] argspec
                    regsub -all className $argspec ::oo::class argspec
                    regsub -all objName $argspec ::oo::object argspec
                    regsub -all cmdname $argspec namespace argspec  ;# this should be an ensemble
                    set res [dict merge $res [procmap::examine [list {*}$cmd {*}$argspec]]]
                }
            }
            if {[dict exists $res subcommands]} {
                lappend procs {*}[lmap sub [dict get $res subcommands] {list {*}$cmd $sub}]
            }
            puts ">> $res"
            dict set arghelp $cmd $res
        }
    }

    proc tempfile {} {
        variable tempfile
        if {![info exists tempfile]} {
            set tempfile [file tempfile]
        }
        return $tempfile
    }
}

if 0 {
    oo::class create foo {method foo {bah hum bug} {}; forward bar puts -nonewline stderr}
    foo create fu
    oo::objdefine fu method fa {lala la} {}
    oo::objdefine fu forward baa puts
................................................................................
    } {
        puts $cmd\t[procmap::whatnext {*}$cmd]
    }
    foreach cmd {puts socket switch procmap::examine {namespace ensemble configure} {namespace HAHA} {fu LOL} {fu fa} {fu baa} {fu bar TOO MANY ARGS}} {
        puts EXAMINE\t$cmd\t[procmap::examine $cmd]
    }
}


apply {{} {
    puts "Are you sure?  This could be dangerous."
    gets stdin
    set outf [open [file join [file dirname [info script]] procmap_lib.tcl] w]
    puts $outf "# Tcl [info patchlevel] from [info nameofexe] at ([clock seconds]) [clock format [clock seconds]]"
    foreach {k v} [array get ::tcl_platform] {

Changes to procmap/procmap_lib.tcl.

1
2
3
4
5
6
7
8
...
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
...
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
...
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
...
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
...
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
...
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
...
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
...
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
...
590
591
592
593
594
595
596



597
598
599

















600
601
602
603
604
605
606
607
608
609






610
611
# Tcl 8.6.8 from /bin/tclsh at (1532176769) Sat Jul 21 22:09:29 ACST 2018
#	tcl_platform(osVersion)      = 4.17.3-200.fc28.x86_64
#	tcl_platform(pointerSize)    = 8
#	tcl_platform(byteOrder)      = littleEndian
#	tcl_platform(threaded)       = 1
#	tcl_platform(machine)        = x86_64
#	tcl_platform(platform)       = unix
#	tcl_platform(pathSeparator)  = :
................................................................................
	{::string trimright} ::tcl::string::trimright
	{::string wordend} ::tcl::string::wordend
	{::string wordstart} ::tcl::string::wordstart
	::yield ::yield
}

set ::procmap::arghelp {
	::after {arghelps {{option ?arg ...?}} subcommands {cancel idle info or an integer}}
	::append {arghelps {{varName ?value ...?}}}
	::apply {arghelps {{lambdaExpr ?arg ...?}}}
	::array {arghelps {{subcommand ?arg ...?}} subcommands {anymore donesearch exists get names nextelement set size startsearch statistics unset}}
	{::array anymore} {arghelps {{arrayName searchId}}}
	{::array donesearch} {arghelps {{arrayName searchId}}}
	{::array exists} {arghelps arrayName}
	{::array get} {arghelps {{arrayName ?pattern?}}}
................................................................................
	::auto_execok {arghelps name}
	::auto_import {arghelps pattern}
	::auto_load {arghelps {{cmd ?namespace?}}}
	::auto_load_index {arghelps {{}}}
	::auto_qualify {arghelps {{cmd namespace}}}
	::binary {arghelps {{subcommand ?arg ...?}} subcommands {decode encode format scan}}
	{::binary decode} {arghelps {{subcommand ?arg ...?}} subcommands {base64 hex uuencode}}
	{::binary decode base64} {arghelps {{?options? data}} subcommands strict}
	{::binary decode hex} {arghelps {{?options? data}} subcommands strict}
	{::binary decode uuencode} {arghelps {{?options? data}} subcommands strict}
	{::binary encode} {arghelps {{subcommand ?arg ...?}} subcommands {base64 hex uuencode}}
	{::binary encode base64} {arghelps {{?-maxlen len? ?-wrapchar char? data}}}
	{::binary encode hex} {arghelps data}
	{::binary encode uuencode} {arghelps {{?-maxlen len? ?-wrapchar char? data}}}
	{::binary format} {arghelps {{formatString ?arg ...?}}}
	{::binary scan} {arghelps {{value formatString ?varName ...?}}}
	::break {arghelps ::break}
	::case {arghelps {{string ?in? ?pattern body ...? ?default body?}}}
	::catch {arghelps {{script ?resultVarName? ?optionVarName?}}}
	::cd {arghelps ?dirName?}
	::chan {arghelps {{subcommand ?arg ...?}} subcommands {blocked close configure copy create eof event flush gets names pending pipe pop postevent push puts read seek tell truncate}}
	{::chan blocked} {arghelps channelId}
	{::chan close} {arghelps {{channelId ?direction?}}}
	{::chan configure} {arghelps {{channelId ?-option value ...?}} subcommands {blocking buffering buffersize encoding eofchar translation mode queue ttystatus xchar}}
	{::chan copy} {arghelps {{input output ?-size size? ?-command callback?}}}
	{::chan create} {arghelps {{mode cmdprefix}}}
	{::chan eof} {arghelps channelId}
	{::chan event} {arghelps {{channelId event ?script?}}}
	{::chan flush} {arghelps channelId}
	{::chan gets} {arghelps {{channelId ?varName?}}}
	{::chan names} {arghelps ?pattern?}
................................................................................
	{::encoding convertto} {arghelps {{?encoding? data}}}
	{::encoding dirs} {arghelps ?dirList?}
	{::encoding names} {arghelps {{}}}
	{::encoding system} {arghelps ?encoding?}
	::eof {arghelps channelId}
	::error {arghelps {{message ?errorInfo? ?errorCode?}}}
	::eval {arghelps {{arg ?arg ...?}}}
	::exec {arghelps {{?-option ...? arg ?arg ...?}} subcommands {ignorestderr keepnewline or}}
	::exit {arghelps ?returnCode?}
	::expr {arghelps {{arg ?arg ...?}}}
	::fblocked {arghelps channelId}
	::fconfigure {arghelps {{channelId ?-option value ...?}} subcommands {blocking buffering buffersize encoding eofchar translation mode queue ttystatus xchar}}
	::fcopy {arghelps {{input output ?-size size? ?-command callback?}}}
	::file {arghelps {{subcommand ?arg ...?}} subcommands {atime attributes channels copy delete dirname executable exists extension isdirectory isfile join link lstat mkdir mtime nativename normalize owned pathtype readable readlink rename rootname separator size split stat system tail tempfile type volumes writable}}
	{::file atime} {arghelps {{name ?time?}}}
	{::file attributes} {arghelps {{name ?-option value ...?}} subcommands {group owner permissions}}
	{::file channels} {arghelps ?pattern?}
	{::file copy} {arghelps {{?-option value ...? source ?source ...? target}} subcommands {force or}}
	{::file dirname} {arghelps name}
	{::file executable} {arghelps name}
	{::file exists} {arghelps name}
	{::file extension} {arghelps name}
	{::file isdirectory} {arghelps name}
	{::file isfile} {arghelps name}
	{::file join} {arghelps {{name ?name ...?}}}
................................................................................
	{::file mtime} {arghelps {{name ?time?}}}
	{::file nativename} {arghelps name}
	{::file normalize} {arghelps name}
	{::file owned} {arghelps name}
	{::file pathtype} {arghelps name}
	{::file readable} {arghelps name}
	{::file readlink} {arghelps name}
	{::file rename} {arghelps {{?-option value ...? source ?source ...? target}} subcommands {force or}}
	{::file rootname} {arghelps name}
	{::file separator} {arghelps ?name?}
	{::file size} {arghelps name}
	{::file split} {arghelps name}
	{::file stat} {arghelps {{name varName}}}
	{::file system} {arghelps name}
	{::file tail} {arghelps name}
................................................................................
	{::info class call} {arghelps {{className methodName}}}
	{::info class constructor} {arghelps className}
	{::info class definition} {arghelps {{className methodName}}}
	{::info class destructor} {arghelps className}
	{::info class filters} {arghelps className}
	{::info class forward} {arghelps {{className methodName}}}
	{::info class instances} {arghelps {{className ?pattern?}}}
	{::info class methods} {arghelps {{className ?-option value ...?}} subcommands {all localprivate private}}
	{::info class methodtype} {arghelps {{className methodName}}}
	{::info class mixins} {arghelps className}
	{::info class subclasses} {arghelps {{className ?pattern?}}}
	{::info class superclasses} {arghelps className}
	{::info class variables} {arghelps className}
	{::info cmdcount} {arghelps {{}}}
	{::info commands} {arghelps ?pattern?}
................................................................................
	{::info object} {arghelps {{subcommand ?arg ...?}} subcommands {call class definition filters forward isa methods methodtype mixins namespace variables vars}}
	{::info object call} {arghelps {{objName methodName}}}
	{::info object class} {arghelps {{objName ?className?}}}
	{::info object definition} {arghelps {{objName methodName}}}
	{::info object filters} {arghelps objName}
	{::info object forward} {arghelps {{objName methodName}}}
	{::info object isa} {arghelps {{category objName ?arg ...?}}}
	{::info object methods} {arghelps {{objName ?-option value ...?}} subcommands {all localprivate private}}
	{::info object methodtype} {arghelps {{objName methodName}}}
	{::info object mixins} {arghelps objName}
	{::info object namespace} {arghelps objName}
	{::info object variables} {arghelps objName}
	{::info object vars} {arghelps {{objName ?pattern?}}}
	{::info patchlevel} {arghelps {{}}}
	{::info procs} {arghelps ?pattern?}
................................................................................
	::llength {arghelps list}
	::lmap {arghelps {{varList list ?varList list ...? command}}}
	::load {arghelps {{?-global? ?-lazy? ?--? fileName ?packageName? ?interp?}}}
	::lrange {arghelps {{list first last}}}
	::lrepeat {arghelps {{count ?value ...?}}}
	::lreplace {arghelps {{list first last ?element ...?}}}
	::lreverse {arghelps list}
	::lsearch {arghelps {{?-option value ...? list pattern}} subcommands {all ascii bisect decreasing dictionary exact glob increasing index inline integer nocase not real regexp sorted start subindices}}
	::lset {arghelps {{listVar ?index? ?index ...? value}}}
	::lsort {arghelps {{?-option value ...? list}} subcommands {ascii command decreasing dictionary increasing index indices integer nocase real stride unique}}
	::namespace {arghelps {{subcommand ?arg ...?}} subcommands {children code current delete ensemble eval exists export forget import inscope origin parent path qualifiers tail unknown upvar which}}
	{::namespace children} {arghelps {{?name? ?pattern?}}}
	{::namespace code} {arghelps arg}
	{::namespace current} {arghelps {{}}}
	{::namespace ensemble} {arghelps {{subcommand ?arg ...?}} subcommands {configure create exists}}
	{::namespace eval} {arghelps {{name arg ?arg...?}}}
	{::namespace exists} {arghelps name}
................................................................................
	::open {arghelps {{fileName ?access? ?permissions?}}}
	::package {arghelps {{option ?arg ...?}} subcommands {forget ifneeded names prefer present provide require unknown vcompare versions vsatisfies}}
	::pid {arghelps ?channelId?}
	::proc {arghelps {{name args body}}}
	::puts {arghelps {{?-nonewline? ?channelId? string}}}
	::pwd {arghelps {{}}}
	::read {arghelps {{channelId ?numChars?} {?-nonewline? channelId}}}
	::regexp {arghelps {{?-option ...? exp string ?matchVar? ?subMatchVar ...?}} subcommands {all about indices inline expanded line linestop lineanchor nocase start or}}
	::regsub {arghelps {{?-option ...? exp string subSpec ?varName?}} subcommands {all nocase expanded line linestop lineanchor start or}}
	::rename {arghelps {{oldName newName}}}
	::scan {arghelps {{string format ?varName ...?}}}
	::seek {arghelps {{channelId offset ?origin?}}}
	::set {arghelps {{varName ?newValue?}}}
	::socket {arghelps {{?-myaddr addr? ?-myport myport? ?-async? host port} {-server command ?-myaddr addr? port}}}
	::source {arghelps {{?-encoding name? fileName}}}
	::split {arghelps {{string ?splitChars?}}}
................................................................................
	::unload {arghelps {{?-switch ...? fileName ?packageName? ?interp?}}}
	::update {arghelps ?idletasks?}
	::uplevel {arghelps {{?level? command ?arg ...?}}}
	::upvar {arghelps {{?level? otherVar localVar ?otherVar localVar ...?}}}
	::vwait {arghelps name}
	::while {arghelps {{test command}}}
	::zlib {arghelps {{command arg ?...?}} subcommands {adler32 compress crc32 decompress deflate gunzip gzip inflate push stream}}



	{::namespace ensemble configure} {arghelps {{cmdname ?-option value ...? ?arg ...?}} subcommands {map namespace parameters prefixes subcommands unknown}}
	{::namespace ensemble create} {arghelps {{ensemble create ?option value ...?}}}
	{::namespace ensemble exists} {arghelps cmdname}

















	{::zlib adler32} {arghelps {{data ?startValue?}}}
	{::zlib compress} {arghelps {{data ?level?}}}
	{::zlib crc32} {arghelps {{data ?startValue?}}}
	{::zlib decompress} {arghelps {{data ?bufferSize?}}}
	{::zlib deflate} {arghelps {{data ?level?}}}
	{::zlib gunzip} {arghelps {{data ?-headerVar varName?}}}
	{::zlib gzip} {arghelps {{data ?-level level? ?-header header?}}}
	{::zlib inflate} {arghelps {{data ?bufferSize?}}}
	{::zlib push} {arghelps {{mode channel ?options...?}} subcommands {compress decompress deflate gunzip gzip inflate}}
	{::zlib stream} {arghelps {{stream mode ?-option value...?}}}






}

|







 







|







 







|
|
|













|







 







|



|



|

|







 







|







 







|







 







|







 







|

|







 







|
|







 







>
>
>
|


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










>
>
>
>
>
>


1
2
3
4
5
6
7
8
...
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
...
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
...
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
...
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
...
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
...
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
...
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
...
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
...
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
# Tcl 8.6.8 from /bin/tclsh at (1532180083) Sat Jul 21 23:04:43 ACST 2018
#	tcl_platform(osVersion)      = 4.17.3-200.fc28.x86_64
#	tcl_platform(pointerSize)    = 8
#	tcl_platform(byteOrder)      = littleEndian
#	tcl_platform(threaded)       = 1
#	tcl_platform(machine)        = x86_64
#	tcl_platform(platform)       = unix
#	tcl_platform(pathSeparator)  = :
................................................................................
	{::string trimright} ::tcl::string::trimright
	{::string wordend} ::tcl::string::wordend
	{::string wordstart} ::tcl::string::wordstart
	::yield ::yield
}

set ::procmap::arghelp {
	::after {arghelps {{option ?arg ...?}} subcommands {cancel idle info}}
	::append {arghelps {{varName ?value ...?}}}
	::apply {arghelps {{lambdaExpr ?arg ...?}}}
	::array {arghelps {{subcommand ?arg ...?}} subcommands {anymore donesearch exists get names nextelement set size startsearch statistics unset}}
	{::array anymore} {arghelps {{arrayName searchId}}}
	{::array donesearch} {arghelps {{arrayName searchId}}}
	{::array exists} {arghelps arrayName}
	{::array get} {arghelps {{arrayName ?pattern?}}}
................................................................................
	::auto_execok {arghelps name}
	::auto_import {arghelps pattern}
	::auto_load {arghelps {{cmd ?namespace?}}}
	::auto_load_index {arghelps {{}}}
	::auto_qualify {arghelps {{cmd namespace}}}
	::binary {arghelps {{subcommand ?arg ...?}} subcommands {decode encode format scan}}
	{::binary decode} {arghelps {{subcommand ?arg ...?}} subcommands {base64 hex uuencode}}
	{::binary decode base64} {arghelps {{?options? data}} options -strict}
	{::binary decode hex} {arghelps {{?options? data}} options -strict}
	{::binary decode uuencode} {arghelps {{?options? data}} options -strict}
	{::binary encode} {arghelps {{subcommand ?arg ...?}} subcommands {base64 hex uuencode}}
	{::binary encode base64} {arghelps {{?-maxlen len? ?-wrapchar char? data}}}
	{::binary encode hex} {arghelps data}
	{::binary encode uuencode} {arghelps {{?-maxlen len? ?-wrapchar char? data}}}
	{::binary format} {arghelps {{formatString ?arg ...?}}}
	{::binary scan} {arghelps {{value formatString ?varName ...?}}}
	::break {arghelps ::break}
	::case {arghelps {{string ?in? ?pattern body ...? ?default body?}}}
	::catch {arghelps {{script ?resultVarName? ?optionVarName?}}}
	::cd {arghelps ?dirName?}
	::chan {arghelps {{subcommand ?arg ...?}} subcommands {blocked close configure copy create eof event flush gets names pending pipe pop postevent push puts read seek tell truncate}}
	{::chan blocked} {arghelps channelId}
	{::chan close} {arghelps {{channelId ?direction?}}}
	{::chan configure} {arghelps {{channelId ?-option value ...?}} options {-blocking -buffering -buffersize -encoding -eofchar -translation}}
	{::chan copy} {arghelps {{input output ?-size size? ?-command callback?}}}
	{::chan create} {arghelps {{mode cmdprefix}}}
	{::chan eof} {arghelps channelId}
	{::chan event} {arghelps {{channelId event ?script?}}}
	{::chan flush} {arghelps channelId}
	{::chan gets} {arghelps {{channelId ?varName?}}}
	{::chan names} {arghelps ?pattern?}
................................................................................
	{::encoding convertto} {arghelps {{?encoding? data}}}
	{::encoding dirs} {arghelps ?dirList?}
	{::encoding names} {arghelps {{}}}
	{::encoding system} {arghelps ?encoding?}
	::eof {arghelps channelId}
	::error {arghelps {{message ?errorInfo? ?errorCode?}}}
	::eval {arghelps {{arg ?arg ...?}}}
	::exec {arghelps {{?-option ...? arg ?arg ...?}} options {-ignorestderr -keepnewline --}}
	::exit {arghelps ?returnCode?}
	::expr {arghelps {{arg ?arg ...?}}}
	::fblocked {arghelps channelId}
	::fconfigure {arghelps {{channelId ?-option value ...?}} options {-blocking -buffering -buffersize -encoding -eofchar -translation}}
	::fcopy {arghelps {{input output ?-size size? ?-command callback?}}}
	::file {arghelps {{subcommand ?arg ...?}} subcommands {atime attributes channels copy delete dirname executable exists extension isdirectory isfile join link lstat mkdir mtime nativename normalize owned pathtype readable readlink rename rootname separator size split stat system tail tempfile type volumes writable}}
	{::file atime} {arghelps {{name ?time?}}}
	{::file attributes} {arghelps {{name ?-option value ...?}} options {-group -owner -permissions}}
	{::file channels} {arghelps ?pattern?}
	{::file copy} {arghelps {{?-option value ...? source ?source ...? target}} options {-force --}}
	{::file dirname} {arghelps name}
	{::file executable} {arghelps name}
	{::file exists} {arghelps name}
	{::file extension} {arghelps name}
	{::file isdirectory} {arghelps name}
	{::file isfile} {arghelps name}
	{::file join} {arghelps {{name ?name ...?}}}
................................................................................
	{::file mtime} {arghelps {{name ?time?}}}
	{::file nativename} {arghelps name}
	{::file normalize} {arghelps name}
	{::file owned} {arghelps name}
	{::file pathtype} {arghelps name}
	{::file readable} {arghelps name}
	{::file readlink} {arghelps name}
	{::file rename} {arghelps {{?-option value ...? source ?source ...? target}} options {-force --}}
	{::file rootname} {arghelps name}
	{::file separator} {arghelps ?name?}
	{::file size} {arghelps name}
	{::file split} {arghelps name}
	{::file stat} {arghelps {{name varName}}}
	{::file system} {arghelps name}
	{::file tail} {arghelps name}
................................................................................
	{::info class call} {arghelps {{className methodName}}}
	{::info class constructor} {arghelps className}
	{::info class definition} {arghelps {{className methodName}}}
	{::info class destructor} {arghelps className}
	{::info class filters} {arghelps className}
	{::info class forward} {arghelps {{className methodName}}}
	{::info class instances} {arghelps {{className ?pattern?}}}
	{::info class methods} {arghelps {{className ?-option value ...?}} options {-all -localprivate -private}}
	{::info class methodtype} {arghelps {{className methodName}}}
	{::info class mixins} {arghelps className}
	{::info class subclasses} {arghelps {{className ?pattern?}}}
	{::info class superclasses} {arghelps className}
	{::info class variables} {arghelps className}
	{::info cmdcount} {arghelps {{}}}
	{::info commands} {arghelps ?pattern?}
................................................................................
	{::info object} {arghelps {{subcommand ?arg ...?}} subcommands {call class definition filters forward isa methods methodtype mixins namespace variables vars}}
	{::info object call} {arghelps {{objName methodName}}}
	{::info object class} {arghelps {{objName ?className?}}}
	{::info object definition} {arghelps {{objName methodName}}}
	{::info object filters} {arghelps objName}
	{::info object forward} {arghelps {{objName methodName}}}
	{::info object isa} {arghelps {{category objName ?arg ...?}}}
	{::info object methods} {arghelps {{objName ?-option value ...?}} options {-all -localprivate -private}}
	{::info object methodtype} {arghelps {{objName methodName}}}
	{::info object mixins} {arghelps objName}
	{::info object namespace} {arghelps objName}
	{::info object variables} {arghelps objName}
	{::info object vars} {arghelps {{objName ?pattern?}}}
	{::info patchlevel} {arghelps {{}}}
	{::info procs} {arghelps ?pattern?}
................................................................................
	::llength {arghelps list}
	::lmap {arghelps {{varList list ?varList list ...? command}}}
	::load {arghelps {{?-global? ?-lazy? ?--? fileName ?packageName? ?interp?}}}
	::lrange {arghelps {{list first last}}}
	::lrepeat {arghelps {{count ?value ...?}}}
	::lreplace {arghelps {{list first last ?element ...?}}}
	::lreverse {arghelps list}
	::lsearch {arghelps {{?-option value ...? list pattern}} options {-all -ascii -bisect -decreasing -dictionary -exact -glob -increasing -index -inline -integer -nocase -not -real -regexp -sorted -start -subindices}}
	::lset {arghelps {{listVar ?index? ?index ...? value}}}
	::lsort {arghelps {{?-option value ...? list}} options {-ascii -command -decreasing -dictionary -increasing -index -indices -integer -nocase -real -stride -unique}}
	::namespace {arghelps {{subcommand ?arg ...?}} subcommands {children code current delete ensemble eval exists export forget import inscope origin parent path qualifiers tail unknown upvar which}}
	{::namespace children} {arghelps {{?name? ?pattern?}}}
	{::namespace code} {arghelps arg}
	{::namespace current} {arghelps {{}}}
	{::namespace ensemble} {arghelps {{subcommand ?arg ...?}} subcommands {configure create exists}}
	{::namespace eval} {arghelps {{name arg ?arg...?}}}
	{::namespace exists} {arghelps name}
................................................................................
	::open {arghelps {{fileName ?access? ?permissions?}}}
	::package {arghelps {{option ?arg ...?}} subcommands {forget ifneeded names prefer present provide require unknown vcompare versions vsatisfies}}
	::pid {arghelps ?channelId?}
	::proc {arghelps {{name args body}}}
	::puts {arghelps {{?-nonewline? ?channelId? string}}}
	::pwd {arghelps {{}}}
	::read {arghelps {{channelId ?numChars?} {?-nonewline? channelId}}}
	::regexp {arghelps {{?-option ...? exp string ?matchVar? ?subMatchVar ...?}} options {-all -about -indices -inline -expanded -line -linestop -lineanchor -nocase -start --}}
	::regsub {arghelps {{?-option ...? exp string subSpec ?varName?}} options {-all -nocase -expanded -line -linestop -lineanchor -start --}}
	::rename {arghelps {{oldName newName}}}
	::scan {arghelps {{string format ?varName ...?}}}
	::seek {arghelps {{channelId offset ?origin?}}}
	::set {arghelps {{varName ?newValue?}}}
	::socket {arghelps {{?-myaddr addr? ?-myport myport? ?-async? host port} {-server command ?-myaddr addr? port}}}
	::source {arghelps {{?-encoding name? fileName}}}
	::split {arghelps {{string ?splitChars?}}}
................................................................................
	::unload {arghelps {{?-switch ...? fileName ?packageName? ?interp?}}}
	::update {arghelps ?idletasks?}
	::uplevel {arghelps {{?level? command ?arg ...?}}}
	::upvar {arghelps {{?level? otherVar localVar ?otherVar localVar ...?}}}
	::vwait {arghelps name}
	::while {arghelps {{test command}}}
	::zlib {arghelps {{command arg ?...?}} subcommands {adler32 compress crc32 decompress deflate gunzip gzip inflate push stream}}
	{::after cancel} {arghelps id|command}
	{::after idle} {arghelps {{script ?script ...?}}}
	{::after info} {arghelps ?id?}
	{::namespace ensemble configure} {arghelps {{cmdname ?-option value ...? ?arg ...?}} options {-map -namespace -parameters -prefixes -subcommands -unknown}}
	{::namespace ensemble create} {arghelps {{ensemble create ?option value ...?}}}
	{::namespace ensemble exists} {arghelps cmdname}
	{::package forget} {arghelps {}}
	{::package ifneeded} {arghelps {{package version ?script?}}}
	{::package names} {arghelps {{}}}
	{::package prefer} {arghelps ?latest|stable?}
	{::package present} {arghelps {{?-exact? package ?requirement ...?}}}
	{::package provide} {arghelps {{package ?version?}}}
	{::package require} {arghelps {{?-exact? package ?requirement ...?}}}
	{::package unknown} {arghelps ?command?}
	{::package vcompare} {arghelps {{version1 version2}}}
	{::package versions} {arghelps package}
	{::package vsatisfies} {arghelps {{version ?requirement ...?}}}
	{::trace add} {arghelps {{type ?arg ...?}}}
	{::trace info} {arghelps {{type name}}}
	{::trace remove} {arghelps {{type ?arg ...?}}}
	{::trace variable} {arghelps {{name ops command}}}
	{::trace vdelete} {arghelps {{name ops command}}}
	{::trace vinfo} {arghelps name}
	{::zlib adler32} {arghelps {{data ?startValue?}}}
	{::zlib compress} {arghelps {{data ?level?}}}
	{::zlib crc32} {arghelps {{data ?startValue?}}}
	{::zlib decompress} {arghelps {{data ?bufferSize?}}}
	{::zlib deflate} {arghelps {{data ?level?}}}
	{::zlib gunzip} {arghelps {{data ?-headerVar varName?}}}
	{::zlib gzip} {arghelps {{data ?-level level? ?-header header?}}}
	{::zlib inflate} {arghelps {{data ?bufferSize?}}}
	{::zlib push} {arghelps {{mode channel ?options...?}} subcommands {compress decompress deflate gunzip gzip inflate}}
	{::zlib stream} {arghelps {{stream mode ?-option value...?}}}
	{::zlib push compress} {arghelps {{channel ?options...?}} options {-dictionary -header -level}}
	{::zlib push decompress} {arghelps {{channel ?options...?}} options {-dictionary -header -level -limit}}
	{::zlib push deflate} {arghelps {{channel ?options...?}} options {-dictionary -header -level}}
	{::zlib push gunzip} {arghelps {{channel ?options...?}} options {-dictionary -header -level -limit}}
	{::zlib push gzip} {arghelps {{channel ?options...?}} options {-dictionary -header -level}}
	{::zlib push inflate} {arghelps {{channel ?options...?}} options {-dictionary -header -level -limit}}
}