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/gio/cursor/grcwarn.x | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 sys/gio/cursor/grcwarn.x (limited to 'sys/gio/cursor/grcwarn.x') diff --git a/sys/gio/cursor/grcwarn.x b/sys/gio/cursor/grcwarn.x new file mode 100644 index 00000000..ba9fcb0e --- /dev/null +++ b/sys/gio/cursor/grcwarn.x @@ -0,0 +1,27 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +# GRC_WARN -- Called in an error handler to intercept an error message string +# and write it to the workstation in the status line. + +procedure grc_warn (fd) + +int fd # output stream + +int errcode +pointer sp, msg, ip +int errget() + +begin + call smark (sp) + call salloc (msg, SZ_LINE, TY_CHAR) + + errcode = errget (Memc[msg], SZ_LINE) + for (ip=msg; Memc[ip] != EOS && Memc[ip] != '\n'; ip=ip+1) + ; + Memc[ip] = EOS + + call stg_putline (fd, " - ") + call stg_putline (fd, Memc[msg]) + + call sfree (sp) +end -- cgit