From 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 Mon Sep 17 00:00:00 2001 From: Joe Hunkeler Date: Tue, 11 Aug 2015 16:51:37 -0400 Subject: Repatch (from linux) of OSX IRAF --- 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