unit pscplm;

	(*
	!	PASCAL86 declarations for UDI routines.
	!	NLA/ 83.12.01
    *)

interface
	CONST
		string_length	=	80;
		buffer_length	=	128;
                rtpstringmax    =       255;
                max_word = $FFFF;

	TYPE
                ptr_string = ^string;
		dword			=	RECORD
								CASE BOOLEAN OF
									FALSE:	(word1,word2	:	word);
									TRUE:	(long		:	longint);
							END;
		date_time		=	RECORD
								date,time	:	PACKED ARRAY [1..8] OF byte;
							END;
		coded_time		=	RECORD
								system_time	:	dword;
								date, time	:	ARRAY [1..8] OF char
							END;
		three_char		=	string[3];
		conn_info		=	RECORD
 								open, access, seek	:	byte;
								file_ptr			:	dword
							END;

		buffer			=	ARRAY [ 1..buffer_length ] OF byte;
		file_data		=	RECORD
								owner			:	ARRAY [ 1..15 ] OF char;
								length			:	dword;
								file_type		,
								owner_acc		,
								world_acc		:	byte;
								create_time		,
								last_mod_time	:	dword;
								reserved		:	ARRAY [ 1..20 ] OF char
							END;


  VAR
    systempath : string[20];
implementation
uses overlay;

var aaa : longint;
    i : integer;
begin
systempath := ParamStr(0);
i := length(systempath);
while i <> 0 DO
begin
 if systempath[i] <> '\' then
  begin
   delete(systempath,i,1);
   i := i - 1;
  end
 else
  begin
   i := 0;
  end
end;
{$IFDEF rtp86}
ovrinit(systempath + 'RTP86.OVR');
{$ELSE}
ovrinit(systempath + 'RTP.OVR');
{$ENDIF}
ovrInitEMS;
ovrsetbuf(100000);
end.


