(*										*)
(* MDALIB.PAS									*)
(*										*)
(* This file is intended to be INHERITED into a Pascal program			*)
(* requiring use of one or more of the routines defined in the			*)
(* MDALIB object library.							*)
(*										*)
(*										*)
(* JA Lloyd									*)
(* MDA Computing Services							*)
(* 84.03.13									*)
(*										*)
(* 1985 07 08 / JA Lloyd							*)
(*    Added PRINTFF								*)
MODULE MDALIBPAS ;
[HIDDEN] TYPE
    $BYTE	= [BYTE] -128..127;
    $WORD	= [WORD] -32768..32767;
    $QUAD	= [QUAD,UNSAFE] RECORD L0:UNSIGNED; L1:INTEGER END;
    $UBYTE	= [BYTE] 0..255;
    $UWORD	= [WORD] 0..65535;
    $ULONG	= UNSIGNED;
    $B128	= 0..127;
    $UBYTE_PTR	= ^$UBYTE;
    $SET128	= SET OF $B128;

[ASYNCHRONOUS] FUNCTION LOC_BATCH : BOOLEAN; EXTERNAL;
[ASYNCHRONOUS] PROCEDURE LOC_BSWAP(
    %REF word_array : [UNSAFE] PACKED ARRAY [$l1..$u1:integer] OF $UWORD;
    	 word_count : INTEGER );  EXTERNAL;
[ASYNCHRONOUS] PROCEDURE LOC_COPYARRAY(
    %REF src_array  : [UNSAFE] PACKED ARRAY [$l1..$u1:integer] OF $UBYTE;
    %REF dest_array : [UNSAFE] PACKED ARRAY [$l2..$u2:integer] OF $UBYTE;
    	       size : INTEGER ); EXTERNAL;
[ASYNCHRONOUS] FUNCTION LOC_INTER : BOOLEAN; EXTERNAL;
[ASYNCHRONOUS] FUNCTION LOC_IOFAST$CLOSE(
    unit : INTEGER ) : INTEGER; EXTERNAL;
[ASYNCHRONOUS] FUNCTION LOC_IOFAST$GET(
    unit : INTEGER;
    record_buf : [CLASS_S] PACKED ARRAY [$l2..$u2:integer] OF CHAR;
    VAR  record_siz : INTEGER
     ) : INTEGER; EXTERNAL;
[ASYNCHRONOUS] FUNCTION LOC_IOFAST$OPEN(
    unit : INTEGER;
    filename : [CLASS_S] PACKED ARRAY [$l2..$u2:integer] OF CHAR;
    defaultfile : [CLASS_S] PACKED ARRAY [$l3..$u3:integer] OF CHAR := %IMMED 0
    ) : INTEGER; EXTERNAL;
[ASYNCHRONOUS] FUNCTION LOC_IOFAST$OPENA(
    unit : INTEGER;
    filename : [CLASS_S] PACKED ARRAY [$l2..$u2:integer] OF CHAR;
    defaultname : [CLASS_S] PACKED ARRAY [$l3..$u3:integer] OF CHAR := %IMMED 0
    ) : INTEGER; EXTERNAL;
[ASYNCHRONOUS] FUNCTION LOC_IOFAST$OPENW(
    unit : INTEGER;
    filename : [CLASS_S] PACKED ARRAY [$l2..$u2:integer] OF CHAR;
    defaultname : [CLASS_S] PACKED ARRAY [$l3..$u3:integer] OF CHAR := %IMMED 0
    ) : INTEGER; EXTERNAL;
[ASYNCHRONOUS] FUNCTION LOC_IOFAST$PUT(
    unit : INTEGER;
    buffer : [CLASS_S] PACKED ARRAY [$l2..$u2:integer] OF CHAR
    ) : INTEGER; EXTERNAL;
[ASYNCHRONOUS] FUNCTION LOC_JOBSUBMIT(
    filename : [CLASS_S] PACKED ARRAY [$l1..$u1:integer] OF CHAR;
    que_name : [CLASS_S] PACKED ARRAY [$l2..$u2:integer] OF CHAR := %IMMED 0;
    job_name : [CLASS_S] PACKED ARRAY [$l3..$u3:integer] OF CHAR := %IMMED 0;
    after_quad_time : $QUAD := %IMMED 0;
    log_file_name : [CLASS_S] PACKED ARRAY [$l5..$u5:integer] OF CHAR := %IMMED 0;
    spool_bit  : [UNSAFE] boolean := %IMMED 0;
    delete_bit : [UNSAFE] boolean := %IMMED 0;
    VAR job_id : [UNSAFE] $ULONG  := %IMMED 0;
    p1 : [CLASS_S] PACKED ARRAY [$l9..$u9:integer]   OF CHAR := %IMMED 0;
    p2 : [CLASS_S] PACKED ARRAY [$l10..$u10:integer] OF CHAR := %IMMED 0;
    p3 : [CLASS_S] PACKED ARRAY [$l11..$u11:integer] OF CHAR := %IMMED 0;
    p4 : [CLASS_S] PACKED ARRAY [$l12..$u12:integer] OF CHAR := %IMMED 0;
    p5 : [CLASS_S] PACKED ARRAY [$l13..$u13:integer] OF CHAR := %IMMED 0;
    p6 : [CLASS_S] PACKED ARRAY [$l14..$u14:integer] OF CHAR := %IMMED 0;
    p7 : [CLASS_S] PACKED ARRAY [$l15..$u15:integer] OF CHAR := %IMMED 0;
    p8 : [CLASS_S] PACKED ARRAY [$l16..$u16:integer] OF CHAR := %IMMED 0
    ) : INTEGER; EXTERNAL;
[ASYNCHRONOUS] FUNCTION LOC_NARGS(
    arg_nbr : [UNSAFE] INTEGER := %IMMED 0 ) : INTEGER; EXTERNAL;
[ASYNCHRONOUS] FUNCTION LOC_NETWORK : boolean; EXTERNAL;
[ASYNCHRONOUS] FUNCTION LOC_PRINT(
    filename : [CLASS_S] PACKED ARRAY [$l1..$u1:integer] OF CHAR;
    que_name : [CLASS_S] PACKED ARRAY [$l2..$u2:integer] OF CHAR := %IMMED 0;
    job_name : [CLASS_S] PACKED ARRAY [$l3..$u3:integer] OF CHAR := %IMMED 0;
    after_quad_time : $QUAD := %IMMED 0;
    copies : [UNSAFE] $UBYTE := %IMMED 0;
    characteristics  : [UNSAFE] $SET128 := %IMMED 0;
    form : [UNSAFE] $UBYTE := %IMMED 0;
    flag : [UNSAFE] boolean := %IMMED 0;
    VAR jobid : [UNSAFE] $ULONG := %IMMED 0 ) : INTEGER; EXTERNAL;
[ASYNCHRONOUS] FUNCTION LOC_PRINTFF(
    filename : [CLASS_S] PACKED ARRAY [$l1..$u1:integer] OF CHAR;
    que_name : [CLASS_S] PACKED ARRAY [$l2..$u2:integer] OF CHAR := %IMMED 0;
    job_name : [CLASS_S] PACKED ARRAY [$l3..$u3:integer] OF CHAR := %IMMED 0;
    after_quad_time : $QUAD := %IMMED 0;
    prior : [UNSAFE] $UBYTE := %IMMED 0;
    copies : [UNSAFE] $UBYTE := %IMMED 0;
    paginate : [UNSAFE] $UBYTE := %IMMED 0;
    del_flag : [UNSAFE] $UBYTE := %IMMED 0;
    flag_page : [UNSAFE] $UBYTE := %IMMED 0;
    passall : [UNSAFE] $UBYTE := %IMMED 0;
    notify : [UNSAFE] $UBYTE := %IMMED 0;
    characteristics : [CLASS_S] PACKED ARRAY [$l4..$u4:integer] OF CHAR := %IMMED 0;
    form : [CLASS_S] PACKED ARRAY [$l5..$u5:integer] OF CHAR := %IMMED 0;
    setup_modules : [CLASS_S] PACKED ARRAY [$l6..$u6:integer] OF CHAR := %IMMED 0;
    jobnote : [CLASS_S] PACKED ARRAY [$l7..$u7:integer] OF CHAR := %IMMED 0;
    VAR job_id : [UNSAFE] $ULONG := %IMMED 0;
    p1 : [CLASS_S] PACKED ARRAY [$l9..$u9:integer]   OF CHAR := %IMMED 0;
    p2 : [CLASS_S] PACKED ARRAY [$l10..$u10:integer] OF CHAR := %IMMED 0;
    p3 : [CLASS_S] PACKED ARRAY [$l11..$u11:integer] OF CHAR := %IMMED 0;
    p4 : [CLASS_S] PACKED ARRAY [$l12..$u12:integer] OF CHAR := %IMMED 0;
    p5 : [CLASS_S] PACKED ARRAY [$l13..$u13:integer] OF CHAR := %IMMED 0;
    p6 : [CLASS_S] PACKED ARRAY [$l14..$u14:integer] OF CHAR := %IMMED 0;
    p7 : [CLASS_S] PACKED ARRAY [$l15..$u15:integer] OF CHAR := %IMMED 0;
    p8 : [CLASS_S] PACKED ARRAY [$l16..$u16:integer] OF CHAR := %IMMED 0
	 ) : INTEGER; EXTERNAL;
[ASYNCHRONOUS] PROCEDURE LOC_ZEROARRAY(
    %REF dest_array : [UNSAFE] PACKED ARRAY [$l1..$u1:integer] OF INTEGER;
               size : [UNSAFE] INTEGER ); EXTERNAL;
END.	(* MDALIB module *)
