aboutsummaryrefslogtreecommitdiff
path: root/sys/fmio/fmlfdel.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/fmio/fmlfdel.x
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
Diffstat (limited to 'sys/fmio/fmlfdel.x')
-rw-r--r--sys/fmio/fmlfdel.x29
1 files changed, 29 insertions, 0 deletions
diff --git a/sys/fmio/fmlfdel.x b/sys/fmio/fmlfdel.x
new file mode 100644
index 00000000..001de927
--- /dev/null
+++ b/sys/fmio/fmlfdel.x
@@ -0,0 +1,29 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+include <syserr.h>
+include "fmio.h"
+
+# FM_LFDELETE -- Delete an lfile.
+
+procedure fm_lfdelete (fm, lfile)
+
+pointer fm #I FMIO descriptor
+int lfile #I lfile number
+
+pointer lf
+errchk syserrs, fmio_bind, fmio_errchk
+
+begin
+ call fmio_bind (fm)
+ call fmio_errchk (fm)
+
+ # Verify input.
+ if (lfile < 0 || lfile > FM_NLFILES(fm))
+ call syserrs (SYS_FMLFNOOB, FM_DFNAME(fm))
+
+ lf = FM_FTABLE(fm) + lfile * LEN_FTE
+ LF_FLAGS(lf) = or (LF_FLAGS(lf), LFF_DELETED)
+
+ FM_DHMODIFIED(fm) = YES
+ call fmio_tick (fm)
+end