tisTrace
Check-in [f8d032e2d8]
Not logged in

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

Overview
Comment:Inlined proc documentation with markdown.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:f8d032e2d86a37af45deafc6aab1c09a3b9bd617
User & Date: jima 2015-11-06 17:24:49
Context
2015-11-06
17:27
Changed name to file to allow fossil md processor to render it. check-in: 28c297b6fa user: jima tags: trunk
17:24
Inlined proc documentation with markdown. check-in: f8d032e2d8 user: jima tags: trunk
2015-11-04
20:54
Added configure script. check-in: aa5aed5de9 user: jima tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Deleted doc/www/procs.md.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# Procs.

----

## Proc Really.

This is the **proc** that gets invoked to really do the tracing.

Arguments:

* **msg** - Message to be sent to screen.

Returns:

* Empty.

Side effects:

* Prints to the screen.

Notes:

* It will decorate the message a bit.

----

## Proc on.

Activates the **invokations** to **proc** *do*.

Arguments:

* None.

Returns:

* Empty.

Side effects:

* Defines the **proc** *::tis::trace::do*.

----

## Proc off.

Deactivates the **invokations** to **proc** *do*.

Arguments:

* None.

Returns:

* Empty.

Side effects:

* Defines the **proc** *::tis::trace::do*.

----

## Proc boot.

Sets up the tracing subsystem in **tis**.

Arguments:

* None.

Returns:

* Empty.

Side effects:

* Deactivates **invokations** to *::tis::trace::do*.
* Defines *yes* (trace) and *no* (no trace) **procs**.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























































































































































Changes to generic/trace.tcl.



1
2
3
4
























5
6
7
8
9
10
11
12
13
14
15
16
17






















18
19
20
21
22
23
24






















25
26
27
28
29



























30
31
32
33
34
35
36
37
38

39
40
41



namespace eval ::tis {

namespace eval trace {

























proc Really {msg} {
    set level [expr {[info level]-1}]
    set decoLen [string length $msg]
    if {$decoLen >= 68} {
        set decoLen 68
    }
    puts [string repeat "+" $decoLen]
    puts "LEVEL = $level"
    puts $msg
    puts [string repeat "-" $decoLen]
    return
}























proc on {} {
    proc ::tis::trace::do {args} {
        return [::tis::trace::Really {*}$args]
    }
    return
}























proc off {} {
    proc ::tis::trace::do {args} {}
    return
}




























proc boot {} {
    off
    proc ::tis::trace::yes {args} {
        return [::tis::trace::Really {*}$args]
    }
    proc ::tis::trace::no {args} {}
    return
}


}

}

>
>
|

|

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
|
|
|
|
|
|
|
|
|
|
|

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
|
|
|
|
|

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
|
|
|

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
|
|
|
|
|
|
|

>
|
|
|
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
# Trace.

    namespace eval ::tis {

    namespace eval trace {

<!-- {

## Proc Really.

This is the **proc** that gets invoked to really do the tracing.

Arguments:

* **msg** - Message to be sent to screen.

Returns:

* Empty.

Side effects:

* Prints to the screen.

Notes:

* It will decorate the message a bit.

} -->

    proc Really {msg} {
        set level [expr {[info level]-1}]
        set decoLen [string length $msg]
        if {$decoLen >= 68} {
            set decoLen 68
        }
        puts [string repeat "+" $decoLen]
        puts "LEVEL = $level"
        puts $msg
        puts [string repeat "-" $decoLen]
        return
    }

----

<!-- {

## Proc on.

Activates the **invokations** to **proc** *do*.

Arguments:

* None.

Returns:

* Empty.

Side effects:

* Defines the **proc** *::tis::trace::do*.

} -->

    proc on {} {
        proc ::tis::trace::do {args} {
            return [::tis::trace::Really {*}$args]
        }
        return
    }

----

<!-- {

## Proc off.

Deactivates the **invokations** to **proc** *do*.

Arguments:

* None.

Returns:

* Empty.

Side effects:

* Defines the **proc** *::tis::trace::do*.

} -->

    proc off {} {
        proc ::tis::trace::do {args} {}
        return
    }

----

<!-- {

## Proc boot.

Sets up the tracing subsystem in **tis**.

Arguments:

* None.

Returns:

* Empty.

Side effects:

* Deactivates **invokations** to *::tis::trace::do*.
* Defines *yes* (trace) and *no* (no trace) **procs**.

Notes:

* This gets invoked when loading the package.

} -->

    proc boot {} {
        off
        proc ::tis::trace::yes {args} {
            return [::tis::trace::Really {*}$args]
        }
        proc ::tis::trace::no {args} {}
        return
    }

----

    }

    }