chiark / gitweb /
wip multiplexer
[chiark-tcl-applet.git] / ttyacm-multiplex
index 727edf172d3fe33f4e58ab3fa539b18fa584729c..cdb463851eb65fc5e53afc7f74d81a688221fb2d 100755 (executable)
@@ -106,16 +106,7 @@ proc dchan-readable {args} {
     }
 }
 
-proc async-notif-or-resp-varies {async_values asid l} {
-    set ll [llength [split $l ,]]
-    if {$ll == $async_values} {
-       async-notif $asid $l
-    } elseif {$ll == $async_values+1} {
-       sync-reply $l
-    } else {
-       bad-data $l "async-notif-or-resp-varies $ll"
-    }
-}
+proc async-notif fixme this has wrong arguments
 
 proc async-notif-or-resp-fixed {asid l} {
     global current_command_asid
@@ -214,6 +205,10 @@ proc set-client-echo {c yn} {
     client-command-complete $c OK
 }
 
+proc sync-reply
+
+proc client-command-complete
+
 proc process-client-command {c nl} {
     switch -regexp $l {
        {^AT\+CREG\b} { async-control-max0 $c $l {{0 1 2}} }
@@ -228,16 +223,13 @@ proc process-client-command {c nl} {
 proc dchan-line {l} {
     global cclient
     switch -regexp $l {
-       {\+CREG:}   { async-notif-creg             +CREG   $l }
-       {\+CGREG:}  { async-notif-creg             +CGREG      $l }
-       {\*ERINFO:} { async-notif-or-resp-fixed    *ERINFO $l }
+       {\+CREG:}   { async-notif-creg             +CREG     $l }
+       {\+CGREG:}  { async-notif-creg             +CGREG    $l }
+       {\*ERINFO:} { async-notif-or-resp-fixed    *ERINFO   $l }
        {\+CGEV:}   { async-notif                  +CGEREP   $l }
-
-       {\+CIEV:}   { async-notif                  +CIEV   $l }
+       {\+CIEV:}   { async-notif                  +CMER     $l }
     }
 
-    if {[info exists cclient
-
 proc sendout-async
 proc logquote