;;; -*- mode:lisp;package:user;base:10.;fonts: cptfontb -*- 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;                              SEQUEN_IOL                          ;;;
;;;								     ;;;
;;; ALEX C. MENG                                     Sept-14-83      ;;;
;;;                                                                  ;;;
;;;                                                                  ;;;
;;; This file is part of a proprietary software project.  Source     ;;;
;;; code and documentation describing implementation details are     ;;;
;;; available on a confidential, non-disclosure basis only.  These   ;;;
;;; materials, including this file in particular, are trade secrets  ;;;
;;; of Computer * Thought Corporation.                               ;;;
;;;                                                                  ;;;
;;; (c) Copyright 1982 and 1983,  Computer * Thought Corporation.    ;;;
;;;     All Rights Reserved.                                         ;;;
;;;                                                                  ;;;
;;; Reference materials:                                             ;;;
;;;   Foderaro and Sklower, The FRANZ LISP Manual, September 1981.   ;;;
;;;   Weinreb and Moon, LISP MACHINE MANUAL, Symbolics, July 1981.   ;;;
;;;   Charniak et al., 1980.  Artificial Intelligence Programming.   ;;;
;;;   Miller, 1982.  The C*T Ada Tutor: Guide to the Implementation. ;;;
;;;   AJPO, Feb 1983.  ANSI/MIL-STD-1815A  Ada Reference Manual.     ;;;
;;; The following code assumes familiarity with these materials.     ;;;
;;;                                                                  ;;;
;;;	        ASSUMES CT_LOAD AND SUITABLE FILEMAP                 ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Ensure presence of needed files. 

(eval-when (compile load eval) (ct_load 'charmac)) ;CT char set extensions.

(eval-when (compile load eval) (ct_load 'aip))	  ;AIP macros pkg. 

(eval-when (compile load eval) (ct_load 'compat)) ;Franz/LM compat pkg.

(eval-when (compile load eval) (ct_load 'stdenv)) ;Franz/LM stdenv pkg.
    
(eval-when (compile load eval) (ct_load 'diana)) ; diana structure    

(eval-when (compile load eval) (ct_load 'sequenio))  ;load the sequen_io
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Compiler Declarations and Global Variables -- 

#+franz (declare (macros t))
(declare (ct_includef 'intrpdcl))			; get the specials

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Externally Call-able Functions/Macros -- 

;;;
;;; Comment on the file management implementation
;;;
;;; The FILE_TYPE for the SEQUEN_IO is a integer which is to be used
;;;   as the index to a list of file objects.
;;; The list is **sequen_file_list**. 

;;;
;;; declare the special *fexpr functions
;;;
(declare (*fexpr is_standard_procedure is_standard_function))



(defun initialize_seq_io ()
  (with_package sequential_io  

 (is_standard_procedure create ada_sequential_io_create	((in_out file file_type)
							 (in mode file_mode)
							 (in name string)
							 (in form string )))

 (is_standard_procedure open ada_sequential_io_open  ((in_out file file_type)
						      (in mode file_mode)
						      (in name string )
						      (in form string )))
 
 (is_standard_procedure close ada_sequential_io_close ((in_out file file_type)))

 (is_standard_procedure delete ada_sequential_io_delete ((in_out file  file_type)))

 (is_standard_procedure reset ada_sequential_io_reset_with_mode
		      	                               ((in_out file file_type)
						       (in mode file_mode)))
 
 (is_standard_procedure reset ada_sequential_io_reset ((in_out file  file_type)))

 (is_standard_function mode ada_sequential_io_mode ((in file  file_type))
		                                                file_mode)

 (is_standard_function name ada_sequential_io_name ((in file  file_type)) string)

 (is_standard_function form ada_sequential_io_form ((in file  file_type)) string)

 (is_standard_function is_open ada_sequential_io_is_open ((in file  file_type))
		                                                      boolean)

 (is_standard_procedure read ada_sequential_io_read ((in file file_type)
			                             (in_out item element_type)))

 (is_standard_procedure write ada_sequential_io_write ((in file file_type)
				  		       (in item element_type)))


 (is_standard_function end_of_file ada_sequential_io_end_of_file
		                                     ((in file  file_type))
						     boolean)
 ))
