DEFINITION MODULE OptOwnDevUnitL {"owndevunit.library", -2};
(* 16-Mar-1994 /bp *)

IMPORT	R,
	A:Arts,
	d:OwnDevUnitD;

CONST
  ownDevUnitName="owndevunit.library";

VAR
  ownDevUnitVersion:INTEGER;
  ownDevUnitBase:d.OwnDevUnitBasePtr;

PROCEDURE AttemptDevUnit(
		device{R.A0}: A.StrPtr;
		unit{R.D0}: LONGCARD;
		ownerName{R.A1}: A.StrPtr;
		notifyBit{R.D1}: SHORTCARD
		): A.StrPtr; CODE -36; (* NIL=Ok *)

PROCEDURE AvailDevUnit(
		device{R.A0}: A.StrPtr;
		unit{R.D0}: LONGCARD
		): BOOLEAN; CODE -54; (* NIL=Ok *)

PROCEDURE FreeDevUnit(
		device{R.A0}: A.StrPtr;
		unit{R.D0}: LONGCARD
		); CODE -42;

PROCEDURE LockDevUnit(
		device{R.A0}: A.StrPtr;
		unit{R.D0}: LONGCARD;
		ownerName{R.A1}: A.StrPtr;
		notifyBit{R.D1}: SHORTCARD
		): A.StrPtr; CODE -30; (* NIL=Ok *)

PROCEDURE NameDevUnit(
		device{R.A0}: A.StrPtr;
		unit{R.D0}: LONGCARD;
		ownerName{R.A1}: A.StrPtr
		); CODE -48;

END OptOwnDevUnitL.optlib
