home *** CD-ROM | disk | FTP | other *** search
- (*************************************************************************
-
- $RCSfile: ASLUtil.mod $
- Description: Support for clients of asl.library
-
- Created by: fjc (Frank Copeland)
- $Revision: 3.7 $
- $Author: fjc $
- $Date: 1995/01/26 00:30:04 $
-
- Copyright © 1994, Frank Copeland.
- This file is part of the Oberon-A Library.
- See Oberon-A.doc for conditions of use and distribution.
-
- *************************************************************************)
-
- <* STANDARD- *> <* INITIALISE- *> <* MAIN- *>
- <*$ CaseChk- IndexChk- LongVars+ NilChk- *>
- <*$ RangeChk- StackChk- TypeChk- OvflChk- *>
-
- MODULE ASLUtil;
-
- IMPORT SYS := SYSTEM, u := Utility, i := Intuition, ASL;
-
- (*------------------------------------*)
- (*
- Simple wrapper for calling the ASL FileRequester.
- *)
-
- PROCEDURE RequestFile * (
- window : i.WindowPtr;
- hail : ARRAY OF CHAR;
- VAR file : ARRAY OF CHAR;
- VAR directory : ARRAY OF CHAR )
- : BOOLEAN;
-
- VAR
- fr : ASL.FileRequesterPtr; result : BOOLEAN;
-
- <*$CopyArrays-*>
- BEGIN (* RequestFile *)
- fr := SYS.VAL (ASL.FileRequesterPtr,
- ASL.AllocAslRequestTags
- ( ASL.fileRequest,
- ASL.hail, SYS.ADR (hail),
- ASL.window, window,
- ASL.file, SYS.ADR (file),
- ASL.dir, SYS.ADR (directory),
- u.end ));
- IF fr # NIL THEN
- result := ASL.AslRequestTags (fr, u.end);
- IF result THEN COPY (fr.drawer^, directory); COPY (fr.file^, file) END;
- ASL.FreeAslRequest (fr)
- ELSE
- result := FALSE
- END;
- RETURN result
- END RequestFile;
-
- END ASLUtil.
-
-