[AIT logo]

Institut für Astronomie und Astrophysik

Abteilung Astronomie

Sand 1, D-72076 Tübingen, Germany
[Uni logo]


MRD_SKIP Source code in mrd_skip.pro

MRD_SKIP

Name
       MRD_SKIP
Purpose
       Skip a number of bytes from the current location in a file or a pipe
Explanation
       First tries using POINT_LUN and if this doesn't work, perhaps because
       the unit is a pipe, MRD_SKIP will just read in the requisite number
       of bytes.    GZIP files opened with /COMPRESS (in V5.3 or later) are
       also read as a series of bytes, since this is faster than using
       POINT_LUN when not at the beginning of a file.
Calling Sequence
       MRD_SKIP, Unit, Nskip
Input Parameters
       Unit - File unit for the file or pipe in question, integer scalar
       Nskip - Number of bytes to be skipped, positive integer
Note
       This routine should be used in place of POINT_LUN wherever a pipe
       may be the input unit (see the procedure FXPOSIT for an example).
       Note that it assumes that it can only work with nskip >= 0 so it
       doesn't even try for negative values.
       For reading a pipe, MRD_SKIP currently uses a maximum buffer size
       of 8 MB.   This chunk value can be increased for improved efficiency
       (or decreased if you really have little memory.)
Revision History
       Written, Thomas A. McGlynn    July 1995
       Don't even try to skip bytes on a pipe with POINT_LUN, since this
       might reset the current pointer     W. Landsman        April 1996
       Increase buffer size, check fstat.compress W. Landsman  Jan 2001
       Only a warning if trying read past EOF   W. Landsman   Sep 2001
       Use 64bit longword for skipping in very large files W. Landsman Sep 2003

Last modified by pro2html on 2003 September 22 at 03:57 UTC

[Home Page] [Software, Documentation] [IDL Documentation] [Quick Reference] [Feedback]

Jörn Wilms (wilms@astro.uni-tuebingen.de)
Updated automatically