aboutsummaryrefslogtreecommitdiff
path: root/sys/etc/xerpop.x
diff options
context:
space:
mode:
authorJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
committerJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
commit40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch)
tree4464880c571602d54f6ae114729bf62a89518057 /sys/etc/xerpop.x
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'sys/etc/xerpop.x')
-rw-r--r--sys/etc/xerpop.x55
1 files changed, 55 insertions, 0 deletions
diff --git a/sys/etc/xerpop.x b/sys/etc/xerpop.x
new file mode 100644
index 00000000..a4723508
--- /dev/null
+++ b/sys/etc/xerpop.x
@@ -0,0 +1,55 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+include <error.h>
+
+# XERPSH -- Push an error handler on the error "stack". All we really need
+# do is keep track of the number of nested handlers. If an error condition
+# already exists when we are called, an error has occurred which was not
+# caught, probably because of a missing errchk declaration.
+
+procedure xerpsh()
+
+include "error.com"
+
+begin
+ if (xerflg) # error not caught
+ call erract (EA_FATAL)
+ nhandlers = nhandlers + 1
+ xercod = OK
+end
+
+
+# XERPOP -- Pop an error handler, and return the error status flag (true if
+# an error occurred).
+
+bool procedure xerpop()
+
+bool error_status
+include "error.com"
+
+begin
+ nhandlers = nhandlers - 1
+ error_status = xerflg
+ xerflg = false
+
+ return (error_status)
+end
+
+
+# XERPOPI -- Integer version of XERPOP.
+
+int procedure xerpopi()
+
+bool error_status
+include "error.com"
+
+begin
+ nhandlers = nhandlers - 1
+ error_status = xerflg
+ xerflg = false
+
+ if (error_status)
+ return (1)
+ else
+ return (0)
+end