diff options
Diffstat (limited to 'sys/clio/clcmdw.x')
-rw-r--r-- | sys/clio/clcmdw.x | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/sys/clio/clcmdw.x b/sys/clio/clcmdw.x new file mode 100644 index 00000000..ca8dfc4c --- /dev/null +++ b/sys/clio/clcmdw.x @@ -0,0 +1,28 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include <syserr.h> +include <clset.h> + +# CLCMDW -- Send a command line to the CL and wait for completion. + +procedure clcmdw (cmd) + +char cmd[ARB] +char junkstr[1] + +int junk +int oscmd(), clstati() +errchk syserr + +begin + if (cmd[1] == '!') + junk = oscmd (cmd[2], "", "", "") + else if (clstati (CL_PRTYPE) != PR_CONNECTED) + call syserr (SYS_CLCMDNC) + else { + call flush (STDOUT) + call putline (CLOUT, cmd) + call putci (CLOUT, '\n') + call clgstr ("cl.version", junkstr, 1) # wait for completion + } +end |