summaryrefslogtreecommitdiffstats
path: root/tcllib/modules/term/send.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'tcllib/modules/term/send.tcl')
-rw-r--r--tcllib/modules/term/send.tcl34
1 files changed, 34 insertions, 0 deletions
diff --git a/tcllib/modules/term/send.tcl b/tcllib/modules/term/send.tcl
new file mode 100644
index 0000000..c3e235d
--- /dev/null
+++ b/tcllib/modules/term/send.tcl
@@ -0,0 +1,34 @@
+# -*- tcl -*-
+# ### ### ### ######### ######### #########
+## Terminal packages - Generic sender operations
+
+# ### ### ### ######### ######### #########
+## Requirements
+
+namespace eval ::term::send {}
+
+# ### ### ### ######### ######### #########
+## API. Write to channel, or default (stdout)
+
+proc ::term::send::wr {str} {
+ wrch stdout $str
+ return
+}
+
+proc ::term::send::wrch {ch str} {
+ puts -nonewline $ch $str
+ flush $ch
+ return
+}
+
+namespace eval ::term::send {
+ namespace export wr wrch
+}
+
+# ### ### ### ######### ######### #########
+## Ready
+
+package provide term::send 0.1
+
+##
+# ### ### ### ######### ######### #########