diff options
Diffstat (limited to 'sys/gio/cursor/grcwarn.x')
-rw-r--r-- | sys/gio/cursor/grcwarn.x | 27 |
1 files changed, 27 insertions, 0 deletions
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 |