From fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Wed, 8 Jul 2015 20:46:52 -0400 Subject: Initial commit --- sys/clio/clcmdw.x | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 sys/clio/clcmdw.x (limited to 'sys/clio/clcmdw.x') 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 +include + +# 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 -- cgit