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

diff --git a/modules/clock/iso8601.test b/modules/clock/iso8601.test
index 85d6416..6fce938 100644
--- a/modules/clock/iso8601.test
+++ b/modules/clock/iso8601.test
@@ -40,9 +40,8 @@ test clock-iso8601-2.0 {parse_date, bad input} -body {
 } -returnCodes error -result {not an iso8601 date string}
 
 test clock-iso8601-2.1 {parse_date} -body {
-    clock::iso8601 parse_date 1994-11-05
-    # It is unclear if this is influenced by TZ.
-} -result 784022400
+    clock format [clock::iso8601 parse_date 1994-11-05] -format %D
+} -result 11/05/1994
 
 # -------------------------------------------------------------------------
 
diff --git a/modules/doctools/mpformats/_nroff.tcl b/modules/doctools/mpformats/_nroff.tcl
index be73a02..7669d07 100644
--- a/modules/doctools/mpformats/_nroff.tcl
+++ b/modules/doctools/mpformats/_nroff.tcl
@@ -15,7 +15,7 @@
 
 
 proc nr_lp      {}          {return \n\1.LP}
-proc nr_ta      {{text {}}} {return ".ta$text"}
+proc nr_ta      {{text {}}} {return "\1.ta$text"}
 proc nr_bld     {}          {return \1\\fB}
 proc nr_bldt    {t}         {return "\n\1.B $t\n"}
 proc nr_ul      {}          {return \1\\fI}
@@ -75,6 +75,7 @@ set      finalMap [list \
 	"\1\\" "\\" \
 	"\1'"  "'" \
 	"\1."  "." \
+        "."    "\\&." \
 	"\\"   "\\\\"]
 global   textMap
 set      textMap [list "\\" "\\\\"]
@@ -103,8 +104,8 @@ proc nroff_postprocess {nroff} {
     # - Exceptions to the above: Keep empty lines and leading
     #   whitespace when in verbatim sections (no-fill-mode)
 
-    set nfMode   [list .nf .CS]	; # commands which start no-fill mode
-    set fiMode   [list .fi .CE]	; # commands which terminate no-fill mode
+    set nfMode   [list \1.nf \1.CS]	; # commands which start no-fill mode
+    set fiMode   [list \1.fi \1.CE]	; # commands which terminate no-fill mode
     set lines    [list]         ; # Result buffer
     set verbatim 0              ; # Automaton mode/state
 
@@ -139,7 +140,7 @@ proc nroff_postprocess {nroff} {
 		    set lines [lreplace $lines end end]
 		    set line "$last $line"
 		}
-	    } elseif {[string match {['.]*} $line]} {
+	    } elseif {[string match {[']*} $line]} {
 		# Apostrophes or periods at the beginning of a line have to
 		# quoted to prevent misinterpretation as comments or directives.
 		# The true comments and directive are quoted with \1
@@ -166,10 +167,11 @@ proc nroff_postprocess {nroff} {
     # Remove superfluous .IP commands (empty paragraph). The first
     # identity mapping is there to avoid smashing a man macro
     # definition.
-    set lines [string map [list \
-	       \n\1.IP\n\1..\n  \n\1.IP\n\1..\n \
-	       \n\1.IP\n\1.     \n\1.] \
-	   $lines]
+
+    lappend map	\n\1.IP\n\1.\1.\n  \n\1.IP\n\1.\1.\n
+    lappend map \n\1.IP\n\1.       \n\1.
+
+    set lines [string map $map $lines]
 
     # Return the modified result buffer
     return [string map $finalMap $lines]
diff --git a/modules/doctools/mpformats/fmt.nroff b/modules/doctools/mpformats/fmt.nroff
index e844dbf..5230688 100644
--- a/modules/doctools/mpformats/fmt.nroff
+++ b/modules/doctools/mpformats/fmt.nroff
@@ -269,11 +269,11 @@ proc fmt_image {text {label {}}} {
 
     set img [dt_imgdata $text {pic}]
     if {$img ne {}} {
-	return \n.PS\n$img\n.PE\n
+	return \n\1.PS\n$img\n\1.PE\n
     }
     set img [dt_imgdata $text {txt}]
     if {$img ne {}} {
-	return \n.PS\n.nf\n$img\n.fi\n.PE\n
+	return \n\1.PS\n\1.nf\n$img\n\1.fi\n\1.PE\n
     }
     if {$label eq {}} {
 	return "IMAGE: $text"
diff --git a/modules/doctools/tests/nroff/00 b/modules/doctools/tests/nroff/00
index 8ac0ebf..8f68ee1 100644
--- a/modules/doctools/tests/nroff/00
+++ b/modules/doctools/tests/nroff/00
@@ -1,15 +1,15 @@
 '\"
-'\" Generated from file '.FILE.' by tcllib/doctools with format 'nroff'
-'\" Copyright (c) .COPYRIGHT.
+'\" Generated from file '\&.FILE\&.' by tcllib/doctools with format 'nroff'
+'\" Copyright (c) \&.COPYRIGHT\&.
 '\"
 .so man.macros
-.TH "TEST" z 3.14.15.926 .MODULE. ""
+.TH "TEST" z 3\&.14\&.15\&.926 \&.MODULE\&. ""
 .BS
 .SH NAME
 TEST \-
 .SH DESCRIPTION
 .SH COPYRIGHT
 .nf
-Copyright (c) .COPYRIGHT.
+Copyright (c) \&.COPYRIGHT\&.
 
 .fi
\ No newline at end of file
diff --git a/modules/doctools/tests/nroff/01 b/modules/doctools/tests/nroff/01
index 3a4563f..588894a 100644
--- a/modules/doctools/tests/nroff/01
+++ b/modules/doctools/tests/nroff/01
@@ -1,9 +1,9 @@
 '\"
-'\" Generated from file '.FILE.' by tcllib/doctools with format 'nroff'
+'\" Generated from file '\&.FILE\&.' by tcllib/doctools with format 'nroff'
 '\" Copyright (c) **Copyright**
 '\"
 .so man.macros
-.TH "TEST" z 3.14.15.926 .MODULE. ""
+.TH "TEST" z 3\&.14\&.15\&.926 \&.MODULE\&. ""
 .BS
 .SH NAME
 TEST \-
diff --git a/modules/doctools/tests/nroff/02 b/modules/doctools/tests/nroff/02
index 89d6cb7..49fbf18 100644
--- a/modules/doctools/tests/nroff/02
+++ b/modules/doctools/tests/nroff/02
@@ -1,12 +1,12 @@
 '\"
-'\" Generated from file '.FILE.' by tcllib/doctools with format 'nroff'
-'\" Copyright (c) .COPYRIGHT.
+'\" Generated from file '\&.FILE\&.' by tcllib/doctools with format 'nroff'
+'\" Copyright (c) \&.COPYRIGHT\&.
 '\"
 .so man.macros
-.TH "TEST" z 3.14.15.926 .MODULE. "..THE_MODULE.."
+.TH "TEST" z 3\&.14\&.15\&.926 \&.MODULE\&. "\&.\&.THE_MODULE\&.\&."
 .BS
 .SH NAME
-TEST \- ..THE_TITLE..
+TEST \- \&.\&.THE_TITLE\&.\&.
 .SH SYNOPSIS
 package require \fBAAA \fR
 .sp
@@ -20,6 +20,6 @@ ELSE, OTHER
 KEYA, KEYZ
 .SH COPYRIGHT
 .nf
-Copyright (c) .COPYRIGHT.
+Copyright (c) \&.COPYRIGHT\&.
 
 .fi
\ No newline at end of file
diff --git a/modules/doctools/tests/nroff/03 b/modules/doctools/tests/nroff/03
index eb0bdd3..6393ecb 100644
--- a/modules/doctools/tests/nroff/03
+++ b/modules/doctools/tests/nroff/03
@@ -1,9 +1,9 @@
 '\"
-'\" Generated from file '.FILE.' by tcllib/doctools with format 'nroff'
-'\" Copyright (c) .COPYRIGHT.
+'\" Generated from file '\&.FILE\&.' by tcllib/doctools with format 'nroff'
+'\" Copyright (c) \&.COPYRIGHT\&.
 '\"
 .so man.macros
-.TH "TEST" z 3.14.15.926 .MODULE. ""
+.TH "TEST" z 3\&.14\&.15\&.926 \&.MODULE\&. ""
 .BS
 .SH NAME
 TEST \-
@@ -12,18 +12,18 @@ TEST \-
 1
 .SH BBB
 22
-.SS BBB.CCC
+.SS BBB\&.CCC
 333
-.SS BBB.DDD
+.SS BBB\&.DDD
 4444
 .SH EEE
 5555
 .PP
-At \fBAaA\fR.
+At \fBAaA\fR\&.
 .PP
-At \fB__undefined__\fR.
+At \fB__undefined__\fR\&.
 .SH COPYRIGHT
 .nf
-Copyright (c) .COPYRIGHT.
+Copyright (c) \&.COPYRIGHT\&.
 
 .fi
\ No newline at end of file
diff --git a/modules/doctools/tests/nroff/04 b/modules/doctools/tests/nroff/04
index ee22d7a..27aa037 100644
--- a/modules/doctools/tests/nroff/04
+++ b/modules/doctools/tests/nroff/04
@@ -1,9 +1,9 @@
 '\"
-'\" Generated from file '.FILE.' by tcllib/doctools with format 'nroff'
-'\" Copyright (c) .COPYRIGHT.
+'\" Generated from file '\&.FILE\&.' by tcllib/doctools with format 'nroff'
+'\" Copyright (c) \&.COPYRIGHT\&.
 '\"
 .so man.macros
-.TH "TEST" z 3.14.15.926 .MODULE. ""
+.TH "TEST" z 3\&.14\&.15\&.926 \&.MODULE\&. ""
 .BS
 .SH NAME
 TEST \-
@@ -27,6 +27,6 @@ Next Line
 FERTIG
 .SH COPYRIGHT
 .nf
-Copyright (c) .COPYRIGHT.
+Copyright (c) \&.COPYRIGHT\&.
 
 .fi
\ No newline at end of file
diff --git a/modules/doctools/tests/nroff/05 b/modules/doctools/tests/nroff/05
index c25c179..3df0180 100644
--- a/modules/doctools/tests/nroff/05
+++ b/modules/doctools/tests/nroff/05
@@ -1,9 +1,9 @@
 '\"
-'\" Generated from file '.FILE.' by tcllib/doctools with format 'nroff'
-'\" Copyright (c) .COPYRIGHT.
+'\" Generated from file '\&.FILE\&.' by tcllib/doctools with format 'nroff'
+'\" Copyright (c) \&.COPYRIGHT\&.
 '\"
 .so man.macros
-.TH "BASIC" a 5 .MODULE. ""
+.TH "BASIC" a 5 \&.MODULE\&. ""
 .BS
 .SH NAME
 BASIC \-
@@ -91,6 +91,6 @@ caramel
 KO
 .SH COPYRIGHT
 .nf
-Copyright (c) .COPYRIGHT.
+Copyright (c) \&.COPYRIGHT\&.
 
 .fi
\ No newline at end of file
diff --git a/modules/doctools/tests/nroff/06 b/modules/doctools/tests/nroff/06
index e7fee7c..10fed25 100644
--- a/modules/doctools/tests/nroff/06
+++ b/modules/doctools/tests/nroff/06
@@ -1,9 +1,9 @@
 '\"
-'\" Generated from file '.FILE.' by tcllib/doctools with format 'nroff'
-'\" Copyright (c) .COPYRIGHT.
+'\" Generated from file '\&.FILE\&.' by tcllib/doctools with format 'nroff'
+'\" Copyright (c) \&.COPYRIGHT\&.
 '\"
 .so man.macros
-.TH "TEST" z 3.14.15.926 .MODULE. ""
+.TH "TEST" z 3\&.14\&.15\&.926 \&.MODULE\&. ""
 .BS
 .SH NAME
 TEST \-
@@ -50,6 +50,6 @@ c
 .PP
 .SH COPYRIGHT
 .nf
-Copyright (c) .COPYRIGHT.
+Copyright (c) \&.COPYRIGHT\&.
 
 .fi
\ No newline at end of file
diff --git a/modules/doctools/tests/nroff/07 b/modules/doctools/tests/nroff/07
index 696a715..08ff9ee 100644
--- a/modules/doctools/tests/nroff/07
+++ b/modules/doctools/tests/nroff/07
@@ -1,9 +1,9 @@
 '\"
-'\" Generated from file '.FILE.' by tcllib/doctools with format 'nroff'
-'\" Copyright (c) .COPYRIGHT.
+'\" Generated from file '\&.FILE\&.' by tcllib/doctools with format 'nroff'
+'\" Copyright (c) \&.COPYRIGHT\&.
 '\"
 .so man.macros
-.TH "TEST" z 3.14.15.926 .MODULE. ""
+.TH "TEST" z 3\&.14\&.15\&.926 \&.MODULE\&. ""
 .BS
 .SH NAME
 TEST \-
@@ -40,6 +40,6 @@ a
 .PP
 .SH COPYRIGHT
 .nf
-Copyright (c) .COPYRIGHT.
+Copyright (c) \&.COPYRIGHT\&.
 
 .fi
\ No newline at end of file
diff --git a/modules/doctools/tests/nroff/08 b/modules/doctools/tests/nroff/08
index b1bc4ea..50cecb6 100644
--- a/modules/doctools/tests/nroff/08
+++ b/modules/doctools/tests/nroff/08
@@ -1,12 +1,12 @@
 '\"
-'\" Generated from file '.FILE.' by tcllib/doctools with format 'nroff'
+'\" Generated from file '\&.FILE\&.' by tcllib/doctools with format 'nroff'
 '\" Copyright (c) **Copyright**
 '\"
 .so man.macros
-.TH "ALL" a 5 .MODULE. "..THE_MODULE.."
+.TH "ALL" a 5 \&.MODULE\&. "\&.\&.THE_MODULE\&.\&."
 .BS
 .SH NAME
-ALL \- ..THE_TITLE..
+ALL \- \&.\&.THE_TITLE\&.\&.
 .SH SYNOPSIS
 package require \fBAAA \fR
 .sp
@@ -14,11 +14,11 @@ package require \fBBBB  VVV\fR
 .sp
 package require \fBCCC  ?VVV?\fR
 .sp
-CMDNAME ...
+CMDNAME \&.\&.\&.
 .sp
-CMDNAME ...
+CMDNAME \&.\&.\&.
 .sp
-CMDNAME ...
+CMDNAME \&.\&.\&.
 .sp
 .BE
 .SH DESCRIPTION
@@ -75,7 +75,7 @@ DESCRIPTION ::\fBMethod\fR::
 TERM
 DESCRIPTION
 .TP
-CMDNAME ...
+CMDNAME \&.\&.\&.
 DESCRIPTION ::\fBNamespace\fR::
 .RS
 .TP
@@ -96,10 +96,10 @@ DESCRIPTION ::?Optional?::
 .CE
 .RE
 .TP
-CMDNAME ...
+CMDNAME \&.\&.\&.
 DESCRIPTION ::\fBPackage\fR::
 .TP
-CMDNAME ...
+CMDNAME \&.\&.\&.
 DESCRIPTION ::\fBSystemCommand\fR::
 .RS
 .TP
diff --git a/support/devel/sak/validate/syntax.tcl b/support/devel/sak/validate/syntax.tcl
index 20b7d33..24e06d2 100644
--- a/support/devel/sak/validate/syntax.tcl
+++ b/support/devel/sak/validate/syntax.tcl
@@ -194,7 +194,9 @@ proc ::sak::validate::syntax::Setup {} {
 	interp eval $ip [list ::rename $c {}]
     }
 
-    interp eval $ip [list ::namespace delete ::tcl]
+    if {![package vsatisfies [package present Tcl] 8.6]} {
+	interp eval $ip [list ::namespace delete ::tcl]
+    }
     interp eval $ip [list ::rename namespace {}]
     interp eval $ip [list ::rename rename    {}]
 
diff --git a/support/devel/sak/validate/testsuites.tcl b/support/devel/sak/validate/testsuites.tcl
index 7072662..71ea694 100644
--- a/support/devel/sak/validate/testsuites.tcl
+++ b/support/devel/sak/validate/testsuites.tcl
@@ -139,7 +139,9 @@ proc ::sak::validate::testsuites::Setup {} {
 	interp eval $ip [list ::rename $c {}]
     }
 
-    interp eval $ip [list ::namespace delete ::tcl]
+    if {![package vsatisfies [package present Tcl] 8.6]} {
+	interp eval $ip [list ::namespace delete ::tcl]
+    }
     interp eval $ip [list ::rename namespace {}]
     interp eval $ip [list ::rename rename    {}]