From 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 Mon Sep 17 00:00:00 2001 From: Joe Hunkeler Date: Tue, 11 Aug 2015 16:51:37 -0400 Subject: Repatch (from linux) of OSX IRAF --- sys/plio/plclear.x | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 sys/plio/plclear.x (limited to 'sys/plio/plclear.x') diff --git a/sys/plio/plclear.x b/sys/plio/plclear.x new file mode 100644 index 00000000..5ece1b5d --- /dev/null +++ b/sys/plio/plclear.x @@ -0,0 +1,32 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include + +# PL_CLEAR -- Clear a mask. The entire surface is cleared. This is equivalent +# to a full surface pl_rop with rop=PIX_CLR, but is more convenient and can be +# implemented more efficiently since the entire surface is cleared. + +procedure pl_clear (pl) + +pointer pl #I mask descriptor + +pointer lp +int n_len, i +errchk realloc + +begin + # Clear the line list buffer. + lp = Ref (pl, PL_EMPTYLINE) + PL_LLOP(pl) = LP_BLEN(lp) + LP_NREFS(lp) = PL_NLP(pl) + + do i = 1, PL_NLP(pl) + PL_LP(pl,i) = PL_EMPTYLINE + + n_len = PL_LLBUFLEN + call realloc (PL_LLBP(pl), n_len, TY_SHORT) + + PL_LLLEN(pl) = n_len + PL_LLFREE(pl) = 0 + PL_LLNUPDATES(pl) = 0 +end -- cgit