aboutsummaryrefslogtreecommitdiff
path: root/lib/acme.rc
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2005-01-04 22:12:12 +0000
committerrsc <devnull@localhost>2005-01-04 22:12:12 +0000
commit8a9c112ae169f96d4bf11622575e07efa19ed6f5 (patch)
tree96c7248c3ea4942c513db379dec455dd6170ebc1 /lib/acme.rc
parent3ff9213bcd3493446f29942ea9f1a78a59d48823 (diff)
downloadplan9port-8a9c112ae169f96d4bf11622575e07efa19ed6f5.tar.gz
plan9port-8a9c112ae169f96d4bf11622575e07efa19ed6f5.tar.bz2
plan9port-8a9c112ae169f96d4bf11622575e07efa19ed6f5.zip
more files
Diffstat (limited to 'lib/acme.rc')
-rw-r--r--lib/acme.rc43
1 files changed, 43 insertions, 0 deletions
diff --git a/lib/acme.rc b/lib/acme.rc
new file mode 100644
index 00000000..c37c72fe
--- /dev/null
+++ b/lib/acme.rc
@@ -0,0 +1,43 @@
+fn newwindow {
+ winctl=`{9p read acme/new/ctl}
+ winid=$winctl(1)
+ winctl noscroll
+}
+
+fn winctl {
+ echo $* | 9p write acme/acme/$winid/ctl
+}
+
+fn winread {
+ 9p read acme/acme/$winid/$1
+}
+
+fn winwrite {
+ 9p write acme/acme/$winid/$1
+}
+
+fn windump {
+ if(! ~ $1 - '')
+ winctl dumpdir $1
+ if(! ~ $2 - '')
+ winctl dump $2
+}
+
+fn winname {
+ winctl name $1
+}
+
+fn winwriteevent {
+ echo $1$2$3 $4 | winwrite event
+}
+
+fn windel {
+ if(~ $1 sure)
+ winctl delete
+ if not
+ winctl del
+}
+
+fn wineventloop {
+ . <{winread event >[2]/dev/null | acmeevent}
+}