# Copyright restrictions apply - see stsdas$copyright.stsdas # include include # APPEND -- Combine several lines into one long concatenated line. # # B.Simon 03-Sep-87 Original procedure append (in_ptr, out_image, factor) pointer in_ptr # i: Pointer to input image template char out_image[ARB] # i: Output image name int factor # i: Stepping factor #-- char in_image[SZ_FNAME] bool junk int step pointer imi, imo, inbuf, outbuf, outptr bool tp_fetch() long clktime() pointer immap(), imgl1r(), impl1r() real ahivr(), alovr() begin # Open output image as new copy of input image. junk = tp_fetch (in_ptr, in_image) imi = immap (in_image, READ_ONLY, NULL) imo = immap (out_image, NEW_COPY, imi) IM_LEN(imo,1) = IM_LEN(imi,1) * factor outbuf = impl1r (imo) outptr = outbuf do step = 1, factor { if (step > 1) { junk = tp_fetch (in_ptr, in_image) imi = immap (in_image, READ_ONLY, NULL) } inbuf = imgl1r (imi) call amovr (Memr[inbuf], Memr[outptr], IM_LEN(imi,1)) outptr = outptr + IM_LEN(imi,1) call imunmap (imi) } IM_MIN(imo) = alovr (Memr[outbuf], IM_LEN(imo,1)) IM_MAX(imo) = ahivr (Memr[outbuf], IM_LEN(imo,1)) IM_LIMTIME(imo) = clktime (long(0)) call imunmap (imo) end