DEFINITION MODULE FileName; 

(* File name procedures.
   File name consists of three parts:
        - path
        - name
        - extensions.
*)

TYPE
  Format = RECORD
    ok: BOOLEAN;               (* result *)
    dirPos, dirLen : CARDINAL; (* directory position and length *)
    namePos,nameLen: CARDINAL; (* name position and length *)
    extPos, extLen : CARDINAL; (* extension position and length *)
  END;

(*----------------------------------------------------------------*)

PROCEDURE Get(fname: ARRAY OF CHAR; VAR dir,name,ext: ARRAY OF CHAR);

(*----------------------------------------------------------------*)

PROCEDURE GetDir (fname: ARRAY OF CHAR; VAR dir: ARRAY OF CHAR);
PROCEDURE GetName(fname: ARRAY OF CHAR; VAR name: ARRAY OF CHAR);
PROCEDURE GetExt (fname: ARRAY OF CHAR; VAR ext: ARRAY OF CHAR);

(*----------------------------------------------------------------*)

END FileName.
