Consolidate use of ©. Indenting

This commit is contained in:
jan.nijtmans
2026-08-10 09:58:38 +00:00
parent 085a472096
commit 52d1487dfb
40 changed files with 251 additions and 251 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 1999 Henry Spencer. All rights reserved.
* Copyright © 1998, 1999 Henry Spencer. All rights reserved.
*
* Development of this software was funded, in part, by Cray Research Inc.,
* UUNET Communications Services Inc., Sun Microsystems Inc., and Scriptics
+1 -1
View File
@@ -6,7 +6,7 @@
/*
* regular expressions
*
* Copyright (c) 1998, 1999 Henry Spencer. All rights reserved.
* Copyright © 1998, 1999 Henry Spencer. All rights reserved.
*
* Development of this software was funded, in part, by Cray Research Inc.,
* UUNET Communications Services Inc., Sun Microsystems Inc., and Scriptics
+1 -1
View File
@@ -1,7 +1,7 @@
/*
* Internal interface definitions, etc., for the reg package
*
* Copyright (c) 1998, 1999 Henry Spencer. All rights reserved.
* Copyright © 1998, 1999 Henry Spencer. All rights reserved.
*
* Development of this software was funded, in part, by Cray Research Inc.,
* UUNET Communications Services Inc., Sun Microsystems Inc., and Scriptics
+5 -5
View File
@@ -4,11 +4,11 @@
* This header file describes the externally-visible facilities of the
* Tcl interpreter.
*
* Copyright (c) 1987-1994 The Regents of the University of California.
* Copyright (c) 1993-1996 Lucent Technologies.
* Copyright (c) 1994-1998 Sun Microsystems, Inc.
* Copyright (c) 1998-2000 by Scriptics Corporation.
* Copyright (c) 2002 by Kevin B. Kenny. All rights reserved.
* Copyright © 1987-1994 The Regents of the University of California.
* Copyright © 1993-1996 Lucent Technologies.
* Copyright © 1994-1998 Sun Microsystems, Inc.
* Copyright © 1998-2000 by Scriptics Corporation.
* Copyright © 2002 by Kevin B. Kenny. All rights reserved.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
+5 -5
View File
@@ -1,11 +1,11 @@
/*
* tclCompile.h --
*
* Copyright (c) 1996-1998 Sun Microsystems, Inc.
* Copyright (c) 1998-2000 by Scriptics Corporation.
* Copyright (c) 2001 by Kevin B. Kenny. All rights reserved.
* Copyright (c) 2007 Daniel A. Steffen <das@users.sourceforge.net>
* Copyright (c) 2025 Donal K. Fellows <dkf@users.sourceforge.net>
* Copyright © 1996-1998 Sun Microsystems, Inc.
* Copyright © 1998-2000 by Scriptics Corporation.
* Copyright © 2001 by Kevin B. Kenny. All rights reserved.
* Copyright © 2007 Daniel A. Steffen <das@users.sourceforge.net>
* Copyright © 2025 Donal K. Fellows <dkf@users.sourceforge.net>
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
+1 -1
View File
@@ -3,7 +3,7 @@
*
* Tcl DTrace provider.
*
* Copyright (c) 2007-2008 Daniel A. Steffen <das@users.sourceforge.net>
* Copyright © 2007-2008 Daniel A. Steffen <das@users.sourceforge.net>
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
+1 -1
View File
@@ -4,7 +4,7 @@
* This header file handles common usage of clock primitives
* between tclDate.c (yacc), tclClock.c and tclClockFmt.c.
*
* Copyright (c) 2014 Serg G. Brester (aka sebres)
* Copyright © 2014 Serg G. Brester (aka sebres)
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+1 -1
View File
@@ -3,7 +3,7 @@
*
* Declarations of functions in the platform independent public Tcl API.
*
* Copyright (c) 1998-1999 by Scriptics Corporation.
* Copyright © 1998-1999 by Scriptics Corporation.
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+1 -1
View File
@@ -4,7 +4,7 @@
* This file contains the common definitions and prototypes for use by
* Tcl's filesystem and path handling layers.
*
* Copyright (c) 2003 Vince Darley.
* Copyright © 2003 Vince Darley.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
+1 -1
View File
@@ -142,7 +142,7 @@ IsPossibleContinuation (
case UTF8PROC_BOUNDCLASS_EXTEND:
case UTF8PROC_BOUNDCLASS_SPACINGMARK:
case UTF8PROC_BOUNDCLASS_ZWJ:
/* hangul-syllable */
/* hangul-syllable */
case UTF8PROC_BOUNDCLASS_L:
case UTF8PROC_BOUNDCLASS_V:
case UTF8PROC_BOUNDCLASS_T:
+2 -2
View File
@@ -4,8 +4,8 @@
* This file provides the generic portions (those that are the same on
* all platforms and for all channel types) of Tcl's IO facilities.
*
* Copyright (c) 1998-2000 Ajuba Solutions
* Copyright (c) 1995-1997 Sun Microsystems, Inc.
* Copyright © 1998-2000 Ajuba Solutions
* Copyright © 1995-1997 Sun Microsystems, Inc.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
+4 -4
View File
@@ -466,10 +466,10 @@ Tcl_ReadObjCmd(
Tcl_SetErrorCode(interp, "TCL", "VALUE", "NUMBER", (char *)NULL);
return TCL_ERROR;
}
if (toRead > TCL_SIZE_MAX) {
/* Bug 6e82720e14 */
toRead = TCL_SIZE_MAX;
}
if (toRead > TCL_SIZE_MAX) {
/* Bug 6e82720e14 */
toRead = TCL_SIZE_MAX;
}
}
TclNewObj(resultPtr);
+8 -8
View File
@@ -3,14 +3,14 @@
*
* Declarations of things used internally by the Tcl interpreter.
*
* Copyright (c) 1987-1993 The Regents of the University of California.
* Copyright (c) 1993-1997 Lucent Technologies.
* Copyright (c) 1994-1998 Sun Microsystems, Inc.
* Copyright (c) 1998-1999 by Scriptics Corporation.
* Copyright (c) 2001, 2002 by Kevin B. Kenny. All rights reserved.
* Copyright (c) 2007 Daniel A. Steffen <das@users.sourceforge.net>
* Copyright (c) 2006-2008 by Joe Mistachkin. All rights reserved.
* Copyright (c) 2008 by Miguel Sofer. All rights reserved.
* Copyright © 1987-1993 The Regents of the University of California.
* Copyright © 1993-1997 Lucent Technologies.
* Copyright © 1994-1998 Sun Microsystems, Inc.
* Copyright © 1998-1999 by Scriptics Corporation.
* Copyright © 2001, 2002 by Kevin B. Kenny. All rights reserved.
* Copyright © 2007 Daniel A. Steffen <das@users.sourceforge.net>
* Copyright © 2006-2008 by Joe Mistachkin. All rights reserved.
* Copyright © 2008 by Miguel Sofer. All rights reserved.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
+1 -1
View File
@@ -6,7 +6,7 @@
* interfaces are not guaranteed to remain the same between
* versions. Use at your own risk.
*
* Copyright (c) 1998-1999 by Scriptics Corporation.
* Copyright © 1998-1999 by Scriptics Corporation.
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+1 -1
View File
@@ -6,7 +6,7 @@
* interfaces are not guaranteed to remain the same between
* versions. Use at your own risk.
*
* Copyright (c) 1998-1999 by Scriptics Corporation.
* Copyright © 1998-1999 by Scriptics Corporation.
* All rights reserved.
*/
+1 -1
View File
@@ -4,7 +4,7 @@
* This file contains the public API definitions and some of the function
* declarations for the object-system (NB: not Tcl_Obj, but ::oo).
*
* Copyright (c) 2006-2010 by Donal K. Fellows
* Copyright © 2006-2010 by Donal K. Fellows
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
+1 -1
View File
@@ -4,7 +4,7 @@
* This file contains the structure definitions and some of the function
* declarations for the object-system (NB: not Tcl_Obj, but ::oo).
*
* Copyright (c) 2006-2012 by Donal K. Fellows
* Copyright © 2006-2012 by Donal K. Fellows
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
+1 -1
View File
@@ -3,7 +3,7 @@
*
* Declarations of platform specific Tcl APIs.
*
* Copyright (c) 1998-1999 by Scriptics Corporation.
* Copyright © 1998-1999 by Scriptics Corporation.
* All rights reserved.
*/
+1 -1
View File
@@ -5,7 +5,7 @@
* of differences between systems. It reads in platform specific
* portability files.
*
* Copyright (c) 1994-1995 Sun Microsystems, Inc.
* Copyright © 1994-1995 Sun Microsystems, Inc.
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+2 -2
View File
@@ -4,8 +4,8 @@
* This file contains definitions used internally by Henry Spencer's
* regular expression code.
*
* Copyright (c) 1998 by Sun Microsystems, Inc.
* Copyright (c) 1998-1999 by Scriptics Corporation.
* Copyright © 1998 by Sun Microsystems, Inc.
* Copyright © 1998-1999 by Scriptics Corporation.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
+1 -1
View File
@@ -4,7 +4,7 @@
* Declarations of string index tries and other primitives currently
* back-ported from tclSE.
*
* Copyright (c) 2016 Serg G. Brester (aka sebres)
* Copyright © 2016 Serg G. Brester (aka sebres)
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+2 -2
View File
@@ -8,8 +8,8 @@
* it may be stored in an encoding form such as a modified version of UTF-8
* or UTF-32.
*
* Copyright (c) 1995-1997 Sun Microsystems, Inc.
* Copyright (c) 1999 by Scriptics Corporation.
* Copyright © 1995-1997 Sun Microsystems, Inc.
* Copyright © 1999 by Scriptics Corporation.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
+5 -5
View File
@@ -5,11 +5,11 @@
* from a string by [string trim] by default. It's only needed by Tcl's
* implementation; it does not form a public or private API at all.
*
* Copyright (c) 1987-1993 The Regents of the University of California.
* Copyright (c) 1994-1997 Sun Microsystems, Inc.
* Copyright (c) 1998-2000 Scriptics Corporation.
* Copyright (c) 2002 ActiveState Corporation.
* Copyright (c) 2003-2013 Donal K. Fellows.
* Copyright © 1987-1993 The Regents of the University of California.
* Copyright © 1994-1997 Sun Microsystems, Inc.
* Copyright © 1998-2000 Scriptics Corporation.
* Copyright © 2002 ActiveState Corporation.
* Copyright © 2003-2013 Donal K. Fellows.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
+1 -1
View File
@@ -6,7 +6,7 @@
* This file contains the declarations for the 'libtommath'
* functions that are exported by the Tcl library.
*
* Copyright (c) 2005 by Kevin B. Kenny. All rights reserved.
* Copyright © 2005 by Kevin B. Kenny. All rights reserved.
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+1 -1
View File
@@ -4,7 +4,7 @@
# uses the standard Unix build system in tcl/unix (which can be used directly instead of this
# if you are not using the tk/macosx projects).
#
# Copyright (c) 2002-2008 Daniel A. Steffen <das@users.sourceforge.net>
# Copyright © 2002-2008 Daniel A. Steffen <das@users.sourceforge.net>
#
# See the file "license.terms" for information on usage and redistribution of
# this file, and for a DISCLAIMER OF ALL WARRANTIES.
+1 -1
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!--
Copyright (c) 2005-2007 Daniel A. Steffen <das@users.sourceforge.net>
Copyright © 2005-2007 Daniel A. Steffen <das@users.sourceforge.net>
See the file "license.terms" for information on usage and redistribution of
this file, and for a DISCLAIMER OF ALL WARRANTIES.
+1 -1
View File
@@ -9,7 +9,7 @@
#
# ------------------------------------------------------------------------
#
# Copyright (c) 2024 Serg G. Brester (aka sebres)
# Copyright © 2024 Serg G. Brester (aka sebres)
#
# See the file "license.terms" for information on usage and redistribution
# of this file.
+1 -1
View File
@@ -9,7 +9,7 @@
#
# ------------------------------------------------------------------------
#
# Copyright (c) 2024 Serg G. Brester (aka sebres)
# Copyright © 2024 Serg G. Brester (aka sebres)
#
# See the file "license.terms" for information on usage and redistribution
# of this file.
+1 -1
View File
@@ -9,7 +9,7 @@
#
# ------------------------------------------------------------------------
#
# Copyright (c) 2024 Serg G. Brester (aka sebres)
# Copyright © 2024 Serg G. Brester (aka sebres)
#
# See the file "license.terms" for information on usage and redistribution
# of this file.
+69 -69
View File
@@ -23,9 +23,9 @@ namespace eval grapheme::test {
variable graphemes
variable text
variable l
proc cleanupVars {} {
unset -nocomplain {*}
unset -nocomplain {*}
}
# The -ucd- tests all run off the test vectors from the Unicode Character
@@ -37,16 +37,16 @@ namespace eval grapheme::test {
tcltests::testnumargs "grapheme next" "string strIndex" ""
foreach testCase [list [list 0 "empty string" ""] {*}[getGraphemeData]] {
lassign $testCase testNum comment graphemes
test grapheme-next-ucd-$testNum.0 $comment -body {
set text [join $graphemes ""]
set l {}
set i 0
while {[set grapheme [grapheme next $text i]] ne ""} {
lappend l $grapheme
}
set l
} -result $graphemes
lassign $testCase testNum comment graphemes
test grapheme-next-ucd-$testNum.0 $comment -body {
set text [join $graphemes ""]
set l {}
set i 0
while {[set grapheme [grapheme next $text i]] ne ""} {
lappend l $grapheme
}
set l
} -result $graphemes
}
### grapheme prev
@@ -54,16 +54,16 @@ namespace eval grapheme::test {
tcltests::testnumargs "grapheme prev" "string strIndex" ""
foreach testCase [list [list 0 "empty string" ""] {*}[getGraphemeData]] {
lassign $testCase testNum comment graphemes
test grapheme-prev-ucd-$testNum.0 $comment -body {
set text [join $graphemes ""]
set l {}
set i end
while {[set grapheme [grapheme prev $text i]] ne ""} {
lappend l $grapheme
}
lreverse $l
} -result $graphemes
lassign $testCase testNum comment graphemes
test grapheme-prev-ucd-$testNum.0 $comment -body {
set text [join $graphemes ""]
set l {}
set i end
while {[set grapheme [grapheme prev $text i]] ne ""} {
lappend l $grapheme
}
lreverse $l
} -result $graphemes
}
### grapheme length
@@ -71,13 +71,13 @@ namespace eval grapheme::test {
tcltests::testnumargs "grapheme length" "string" ""
foreach testCase [getGraphemeData] {
lassign $testCase testNum comment graphemes
test grapheme-length-ucd-$testNum.0 $comment -body {
grapheme length [join $graphemes ""]
} -result [llength $graphemes]
lassign $testCase testNum comment graphemes
test grapheme-length-ucd-$testNum.0 $comment -body {
grapheme length [join $graphemes ""]
} -result [llength $graphemes]
}
test grapheme-length-empty-1.0 $comment -body {
grapheme length ""
grapheme length ""
} -result 0
### grapheme index
@@ -85,14 +85,14 @@ namespace eval grapheme::test {
tcltests::testnumargs "grapheme index" "string grIndex" ""
foreach testCase [list [list 0 "empty string" ""] {*}[getGraphemeData]] {
lassign $testCase testNum comment graphemes
set text [join $graphemes ""]
set len [llength $graphemes]
foreach index [list end-[expr {$len+2}] -1 {*}[lseq $len] $len end end-1 end+1] {
test grapheme-index-ucd-$testNum.$index $comment -body {
grapheme index $text $index
} -result [lindex $graphemes $index]
}
lassign $testCase testNum comment graphemes
set text [join $graphemes ""]
set len [llength $graphemes]
foreach index [list end-[expr {$len+2}] -1 {*}[lseq $len] $len end end-1 end+1] {
test grapheme-index-ucd-$testNum.$index $comment -body {
grapheme index $text $index
} -result [lindex $graphemes $index]
}
}
### grapheme offset
@@ -100,22 +100,22 @@ namespace eval grapheme::test {
tcltests::testnumargs "grapheme offset" "string grIndex" ""
foreach testCase [getGraphemeData] {
lassign $testCase testNum comment graphemes
set text [join $graphemes ""]
set len [llength $graphemes]
set offset 0
for {set i 0} {$i < $len} {incr i} {
test grapheme-offset-ucd-$testNum.$offset $comment -body {
grapheme offset $text $i
} -result $offset
incr offset [string length [lindex $graphemes $i]]
}
lassign $testCase testNum comment graphemes
set text [join $graphemes ""]
set len [llength $graphemes]
set offset 0
for {set i 0} {$i < $len} {incr i} {
test grapheme-offset-ucd-$testNum.$offset $comment -body {
grapheme offset $text $i
} -result $offset
incr offset [string length [lindex $graphemes $i]]
}
}
test grapheme-offset-oob-1.0 {Negative index} -body {
grapheme offset abc -42
grapheme offset abc -42
} -result -1
test grapheme-offset-oob-1.1 {Index too large} -body {
grapheme offset abc 42
grapheme offset abc 42
} -result -1
### grapheme range
@@ -123,17 +123,17 @@ namespace eval grapheme::test {
tcltests::testnumargs "grapheme range" "string grFirst grLast" ""
foreach testCase [list [list 0 "empty string" ""] {*}[getGraphemeData]] {
lassign $testCase testNum comment graphemes
set text [join $graphemes ""]
set len [llength $graphemes]
lassign $testCase testNum comment graphemes
set text [join $graphemes ""]
set len [llength $graphemes]
foreach grStart [list -1 {*}[lseq $len] $len end end-1] {
foreach grEnd [list -1 {*}[lseq $len] $len end end-1] {
test grapheme-range-ucd-$testNum.$grStart:$grEnd $comment -body {
grapheme range $text $grStart $grEnd
} -result [join [lrange $graphemes $grStart $grEnd] ""]
}
}
foreach grStart [list -1 {*}[lseq $len] $len end end-1] {
foreach grEnd [list -1 {*}[lseq $len] $len end end-1] {
test grapheme-range-ucd-$testNum.$grStart:$grEnd $comment -body {
grapheme range $text $grStart $grEnd
} -result [join [lrange $graphemes $grStart $grEnd] ""]
}
}
}
### grapheme reverse
@@ -141,12 +141,12 @@ namespace eval grapheme::test {
tcltests::testnumargs "grapheme reverse" "string" ""
foreach testCase [list [list 0 "empty string" ""] {*}[getGraphemeData]] {
lassign $testCase testNum comment graphemes
set text [join $graphemes ""]
set len [llength $graphemes]
test grapheme-reverse-ucd-$testNum $comment -body {
grapheme reverse $text
} -result [join [lreverse $graphemes] ""]
lassign $testCase testNum comment graphemes
set text [join $graphemes ""]
set len [llength $graphemes]
test grapheme-reverse-ucd-$testNum $comment -body {
grapheme reverse $text
} -result [join [lreverse $graphemes] ""]
}
### grapheme split
@@ -154,12 +154,12 @@ namespace eval grapheme::test {
tcltests::testnumargs "grapheme split" "string" ""
foreach testCase [list [list 0 "empty string" ""] {*}[getGraphemeData]] {
lassign $testCase testNum comment graphemes
set text [join $graphemes ""]
set len [llength $graphemes]
test grapheme-split-ucd-$testNum $comment -body {
grapheme split $text
} -result $graphemes
lassign $testCase testNum comment graphemes
set text [join $graphemes ""]
set len [llength $graphemes]
test grapheme-split-ucd-$testNum $comment -body {
grapheme split $text
} -result $graphemes
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
# This file tests list command on each internal list representation.
#
# Copyright (c) 2025 Ashok P. Nadkarni
# Copyright © 2025 Ashok P. Nadkarni
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+1 -1
View File
@@ -4,7 +4,7 @@
# built-in commands. Sourcing this file into Tcl runs the tests and
# generates output for errors. No output means no errors were found.
#
# Copyright (c) 2025 Ashok P. Nadkarni
# Copyright © 2025 Ashok P. Nadkarni
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+47 -47
View File
@@ -219,62 +219,62 @@ namespace eval tcltests::ucd {
}
proc readGraphemeBreaks {} {
variable graphemeBreaksDataFile
variable graphemeBreaksData
variable graphemeBreaksDataFile
variable graphemeBreaksData
set fd [open $graphemeBreaksDataFile]
fconfigure $fd -encoding utf-8
set lineno 0
# See comments atop $graphemeBreaksDataFile for format
while {[gets $fd line] >= 0} {
incr lineno
set line [string trim $line]
set fd [open $graphemeBreaksDataFile]
fconfigure $fd -encoding utf-8
set lineno 0
# See comments atop $graphemeBreaksDataFile for format
while {[gets $fd line] >= 0} {
incr lineno
set line [string trim $line]
if {[string index $line 0] in {{} #}} {
continue
}
# Line is of the form
# (SEP XXXX)+ SEP (# comment)?
# where SEP is
# ÷ (U+00F7) wherever there is a break opportunity, and
# × (U+00D7) wherever there is not.
set break \u00f7
set nobreak \u00d7
lassign [split $line #] definition comment
set definition [string trim $definition]
if {[string index $definition 0] ne $break || [string index $definition end] ne $break} {
puts stderr "Unexpected format of line $lineno in $graphemeBreaksDataFile $definition"
continue
}
set record [list $lineno $comment]
set grapheme {}
set graphemes [list ]
foreach {hex breakChar} [regexp -all -inline {\S+} [string range $definition 1 end]] {
append grapheme [format %c 0x$hex]
if {$breakChar eq $break} {
lappend graphemes $grapheme
set grapheme ""
} elseif {$breakChar ne $nobreak} {
puts stderr "Unexpected separator character $breakChar"
unset record
break
}
}
if {[info exists record]} {
lappend record $graphemes
lappend graphemeBreaksData $record
}
}
# Line is of the form
# (SEP XXXX)+ SEP (# comment)?
# where SEP is
# ÷ (U+00F7) wherever there is a break opportunity, and
# × (U+00D7) wherever there is not.
set break \u00f7
set nobreak \u00d7
lassign [split $line #] definition comment
set definition [string trim $definition]
if {[string index $definition 0] ne $break || [string index $definition end] ne $break} {
puts stderr "Unexpected format of line $lineno in $graphemeBreaksDataFile $definition"
continue
}
set record [list $lineno $comment]
set grapheme {}
set graphemes [list ]
foreach {hex breakChar} [regexp -all -inline {\S+} [string range $definition 1 end]] {
append grapheme [format %c 0x$hex]
if {$breakChar eq $break} {
lappend graphemes $grapheme
set grapheme ""
} elseif {$breakChar ne $nobreak} {
puts stderr "Unexpected separator character $breakChar"
unset record
break
}
}
if {[info exists record]} {
lappend record $graphemes
lappend graphemeBreaksData $record
}
}
}
# Returns the test vectors for graphemes as a list of triples comprising
# the line number in GraphemeBreakTest.txt, the comment and the test case
# data. This last is a list of strings each of which is a single grapheme.
proc getGraphemeData {} {
readGraphemeBreaks
proc getGraphemeData {} {
variable graphemeBreaksData
return $graphemeBreaksData
}
tailcall getGraphemeData
readGraphemeBreaks
proc getGraphemeData {} {
variable graphemeBreaksData
return $graphemeBreaksData
}
tailcall getGraphemeData
}
}
+1 -1
View File
@@ -4,7 +4,7 @@
# normal script level commands. There tests are NOT intended to check
# correctness of encodings; those are elsewhere.
#
# Copyright (c) 2023 Ashok P. Nadkarni
# Copyright © 2023 Ashok P. Nadkarni
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+32 -32
View File
@@ -435,37 +435,37 @@ test console-bug-f10d91c2 {
Test termination of console process with extreme prejudice
} -constraints {win havePowershell} -setup {
set tclScript [tcltest::makeFile {
#stdin fileevent + 1s heartbeat. Optional argv 0: heartbeat file path.
if {[llength $argv]} {
set hbf [lindex $argv 0]
} else {
set hbf [file join [file dirname [info script]] heartbeat.txt]
}
chan configure stdin -blocking 0
chan event stdin readable {
set status [catch {read stdin} data]
puts stderr "readable fired"
flush stderr
if {$status} {
puts stderr "Error: $data - exiting"
exit 0
} else {
if {[chan eof stdin]} {
puts stderr "eof - exiting"
exit 0
}
}
}
proc heartbeat {} {
set f [open $::hbf a]
puts $f "[clock format [clock seconds] -format %H:%M:%S] alive - pid [pid]"
close $f
after 1000 heartbeat
}
heartbeat
puts stderr "armed - pid [pid]"
flush stderr
vwait ::forever
#stdin fileevent + 1s heartbeat. Optional argv 0: heartbeat file path.
if {[llength $argv]} {
set hbf [lindex $argv 0]
} else {
set hbf [file join [file dirname [info script]] heartbeat.txt]
}
chan configure stdin -blocking 0
chan event stdin readable {
set status [catch {read stdin} data]
puts stderr "readable fired"
flush stderr
if {$status} {
puts stderr "Error: $data - exiting"
exit 0
} else {
if {[chan eof stdin]} {
puts stderr "eof - exiting"
exit 0
}
}
}
proc heartbeat {} {
set f [open $::hbf a]
puts $f "[clock format [clock seconds] -format %H:%M:%S] alive - pid [pid]"
close $f
after 1000 heartbeat
}
heartbeat
puts stderr "armed - pid [pid]"
flush stderr
vwait ::forever
} bug-f10d91.tcl ]
# The powershell driver script
@@ -483,7 +483,7 @@ $tclpid = $null
foreach ($i in 1..20) {
Start-Sleep -Milliseconds 500
if ((Test-Path $err) -and ((Get-Content $err -Raw) -match 'armed - pid (\d+)')) {
$tclpid = [int]$Matches[1]; break
$tclpid = [int]$Matches[1]; break
}
}
if (-not $tclpid) { throw "payload never armed (see $err)" }
+41 -41
View File
@@ -115,21 +115,21 @@ proc parseSddl {sddl} {
# D: DACL - optional control flags, followed by parenthesized ACE list
# S: SACL - ditto
set sddlRe {(?x)
^
(?: (O:) ( [A-Za-z0-9-]+? ) (?=G:|D:|S:|$) )?
(?: (G:) ( [A-Za-z0-9-]+? ) (?=D:|S:|$) )?
(?: (D:) ((?: [A-Z]+ )? (?: \( [^)]* \) )*))?
(?: (S:) ((?: [A-Z]+ )? (?: \( [^)]* \) )*))?
$
^
(?: (O:) ( [A-Za-z0-9-]+? ) (?=G:|D:|S:|$) )?
(?: (G:) ( [A-Za-z0-9-]+? ) (?=D:|S:|$) )?
(?: (D:) ((?: [A-Z]+ )? (?: \( [^)]* \) )*))?
(?: (S:) ((?: [A-Z]+ )? (?: \( [^)]* \) )*))?
$
}
if {![regexp $sddlRe $sddl -> ownerTag owner groupTag group daclTag dacl saclTag sacl]} {
error "Could not parse SDDL \"$sddl\""
error "Could not parse SDDL \"$sddl\""
}
set result [dict create]
foreach field {owner group dacl sacl} {
if {[set ${field}Tag] ne ""} {
dict set result $field [set $field]
}
if {[set ${field}Tag] ne ""} {
dict set result $field [set $field]
}
}
return $result
}
@@ -1344,37 +1344,37 @@ test winFCmd-16.15 {Windows file normalization - invalid drive} -setup {
# failed.
proc test_bug_d40d8db3 {id comment subdir} {
set testScript {
test @ID@ {
@COMMENT@
} -constraints {
win testchmod testfilesddl allowfilesecuritychanges
} -setup {
set dir [tcltest::makeDirectory @ID@]
if {[file exists $dir]} {
testchmod 0o777 $dir
file delete -force $dir
if {[file exists $dir]} {
error "Could not delete $dir"
}
}
set aclTarget [file join $dir @SUBDIR@]
set path [file join $aclTarget tail]
file mkdir $path
set secd [parseSddl [testfilesddl $aclTarget]]
set dacl [dict getdef $secd dacl ""]
lassign [parseSddlAcl [dict getdef $secd dacl ""]] aclFlags aces
ledit aces 0 -1 "(D;;0x1;;;[dict get $secd owner])"
set sddl "D:$aclFlags[join $aces {}]"
testfilesddl $aclTarget $sddl
} -cleanup {
testchmod 0o777 $path
testchmod 0o777 $aclTarget
testchmod 0o777 $dir
file delete -force $dir
unset -nocomplain dir path secd dacl aclFlags aces sddl
} -body {
file normalize $path
} -result [file join [tcltest::temporaryDirectory] @ID@ @SUBDIR@ tail]
test @ID@ {
@COMMENT@
} -constraints {
win testchmod testfilesddl allowfilesecuritychanges
} -setup {
set dir [tcltest::makeDirectory @ID@]
if {[file exists $dir]} {
testchmod 0o777 $dir
file delete -force $dir
if {[file exists $dir]} {
error "Could not delete $dir"
}
}
set aclTarget [file join $dir @SUBDIR@]
set path [file join $aclTarget tail]
file mkdir $path
set secd [parseSddl [testfilesddl $aclTarget]]
set dacl [dict getdef $secd dacl ""]
lassign [parseSddlAcl [dict getdef $secd dacl ""]] aclFlags aces
ledit aces 0 -1 "(D;;0x1;;;[dict get $secd owner])"
set sddl "D:$aclFlags[join $aces {}]"
testfilesddl $aclTarget $sddl
} -cleanup {
testchmod 0o777 $path
testchmod 0o777 $aclTarget
testchmod 0o777 $dir
file delete -force $dir
unset -nocomplain dir path secd dacl aclFlags aces sddl
} -body {
file normalize $path
} -result [file join [tcltest::temporaryDirectory] @ID@ @SUBDIR@ tail]
}
uplevel 1 [string map [list @ID@ $id @COMMENT@ $comment @SUBDIR@ $subdir] $testScript]
}
+2 -2
View File
@@ -12,8 +12,8 @@
* Much of the material in this file was originally contributed by Karl
* Lehenbauer, Mark Diekhans and Peter da Silva.
*
* Copyright (c) 1991-1994 The Regents of the University of California.
* Copyright (c) 1994-1997 Sun Microsystems, Inc.
* Copyright © 1991-1994 The Regents of the University of California.
* Copyright © 1994-1997 Sun Microsystems, Inc.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
+1 -1
View File
@@ -3,7 +3,7 @@
*
* Declarations of Windows-specific shared variables and procedures.
*
* Copyright (c) 1994-1996 Sun Microsystems, Inc.
* Copyright © 1994-1996 Sun Microsystems, Inc.
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+1 -1
View File
@@ -5,7 +5,7 @@
* differences between Windows and Unix. It should be the only
* file that contains #ifdefs to handle different flavors of OS.
*
* Copyright (c) 1994-1997 Sun Microsystems, Inc.
* Copyright © 1994-1997 Sun Microsystems, Inc.
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+1 -1
View File
@@ -775,7 +775,7 @@ TestfilesddlCmd (
SDDL_REVISION_1, secInfo, &sddlPtr, NULL)) {
err = GetLastError();
errorMessage = "Failed to convert security descriptor to SDDL";
goto vamoose;
goto vamoose;
}
(void)Tcl_Char16ToUtfDString(sddlPtr, -1, &ds);