aboutsummaryrefslogtreecommitdiff
path: root/sys/qpoe/qpgetb.x
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
commitfa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch)
treebdda434976bc09c864f2e4fa6f16ba1952b1e555 /sys/qpoe/qpgetb.x
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
Diffstat (limited to 'sys/qpoe/qpgetb.x')
-rw-r--r--sys/qpoe/qpgetb.x26
1 files changed, 26 insertions, 0 deletions
diff --git a/sys/qpoe/qpgetb.x b/sys/qpoe/qpgetb.x
new file mode 100644
index 00000000..cea5c5be
--- /dev/null
+++ b/sys/qpoe/qpgetb.x
@@ -0,0 +1,26 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+include <syserr.h>
+include "qpoe.h"
+
+# QP_GETB -- Return the boolean value of the named header parameter. Type
+# conversion is not permitted between boolean and the other datatypes.
+
+bool procedure qp_getb (qp, param)
+
+pointer qp #I QPOE descriptor
+char param[ARB] #I parameter name
+
+pointer pp
+int qp_getparam()
+errchk qp_getparam, syserrs
+
+begin
+ # Lookup the parameter and it's value.
+ if (qp_getparam (qp, param, pp) != TY_BOOL)
+ call syserrs (SYS_QPBADCONV, param)
+ else if (pp == NULL)
+ call syserrs (SYS_QPNOVAL, param)
+
+ return (Memb[pp])
+end