Intial commit

This commit is contained in:
Mario Fetka
2024-05-27 16:13:40 +02:00
parent f8dc12b10a
commit d71d446104
2495 changed files with 539746 additions and 0 deletions

39
tcl-dp/tests/server Normal file
View File

@@ -0,0 +1,39 @@
if {[lindex $argv 0] == "1"} {
load ../win/dp40.dll
} else {
load ../unix/libdp40[info sharedlibextension]
}
source ../library/dp_atexit.tcl
source ../library/dp_atclose.tcl
source ../library/rpc.tcl
source ../library/acl.tcl
set s [dp_MakeRPCServer [lindex $argv 1]]
if {[string match tcp* $s]} {
set outFile stderr
proc DebugOn {str} {
global outFile
traceProc $str "PrintTrace $outFile"
}
proc PrintTrace {f traceId level args} {
set fmtstr "%[set level]s"
set argstr [format %s $args]
if {[string length $argstr] > 60} {
set argstr "[string range $argstr 0 60] ..."
}
set cr [string first "\n" $argstr]
if {$cr != -1} {
incr cr -1
set argstr "[string range $argstr 0 $cr] ..."
}
puts $f "[format $fmtstr ""] $argstr"
}
vwait forever
} else {
puts stdout "Error creating test RPC server"
}