Modula-2 || Compiler & Tools || Library || Search Engine


Ulm's Modula-2 Library:
Archive


NAME

Archive, AFILE, AStat, ArchiveOpen, ArchiveReopen, ArchiveClose, ArchiveRead, ArchiveStat - reading archive files

SYNOPSIS

FROM SystemTypes IMPORT TIME, OFF;

CONST NameLength = 14;

TYPE AFILE;

TYPE FileName = ARRAY[0..NameLength-1] OF CHAR;

TYPE AStat =
      RECORD
         name: FileName;
         uid, gid: CARDINAL;
         date: TIME;
         size: OFF;
         mode: BITSET;
      END;

PROCEDURE ArchiveOpen(VAR a: AFILE; archive: ARRAY OF CHAR;
                      filename: ARRAY OF CHAR) : BOOLEAN;

PROCEDURE ArchiveReopen(a: AFILE;
                        filename: ARRAY OF CHAR) : BOOLEAN;

PROCEDURE ArchiveClose(a: AFILE);

PROCEDURE ArchiveRead(a: AFILE; VAR ch: CHAR) : BOOLEAN;

PROCEDURE ArchiveStat(a: AFILE; VAR buf: AStat);

DESCRIPTION

ArchiveOpen opens the file filename archived in the archive archive for reading. A identifies the stream in subsequent operations.

ArchiveReopen searches for the file filename in the archive of a.

ArchiveClose closes the opened stream a.

ArchiveRead stores a single character of the stream a into ch and returns FALSE on end of file.

ArchiveStat stores the status information of the archive file referenced by a into the status buffer buf.

DIAGNOSTICS

ArchiveOpen returns FALSE if the archive file cannot be opened for reading, if archive isn't a archive file, or if filename cannot be found in archive. ArchiveReopen returns FALSE if filename cannot be found.

SEE ALSO

ar(1), ar(5) more about archives
SystemTypes module SystemTypes
Edited by: martin, last change: 1996/12/09, revision: 1.2, converted to HTML: 1996/12/11

Modula-2 || Compiler & Tools || Library || Search Engine