Comprehensive TeX Archive Network

closefrm – Tidy up after reading a file

De­fines a ‘close­from’ macro to com­ple­ment the ‘read­from’ prim­i­tive. It op­er­ates by re­peat­edly read­ing from a file un­til reach­ing EOF, which has the side-ef­fect of clos­ing the file.

The macro might be use­ful to avoid run­ning out of read files when us­ing the graph pack­age to pro­cess many data files that con­tain ex­tra junk at the end. (In such cir­cum­stances, read­ing the files will stop short of the end, so leav­ing the file open.)

Sources /graphics/metapost/contrib/macros/misc/closefrm.mp
Ver­sion 1.04
Li­cense Un­known Sta­tus, No In­for­ma­tion Avail­able
Main­tainer Ul­rik Vi­eth
Topics man­age ’s lim­ited i/o streams
Guest Book Sitemap Contact Contact Author