DEFINITION MODULE MkBase;
(*$ LargeVars:=FALSE LongAlign:=FALSE NameChk:=FALSE *)

FROM Arts IMPORT
 ModName;

FROM DosD IMPORT
 Date;


TYPE
  FileName = ARRAY [0..127] OF CHAR;
  ModType = (noSource, progMod, impMod, noImpMod, libMod);
  ModPtr = POINTER TO ModRec;
  ImportPtr = POINTER TO ImportRec;
  ModRec = RECORD
    next, prev: ModPtr;
    num: INTEGER;
    name: ModName;
    type: ModType;
    importList: ImportPtr;
    srcRead: BOOLEAN;
    symDate: Date;
  END; (* 62 *)
  ImportRec = RECORD
    next: ImportPtr;
    importedMod: ModPtr;
    importedByDef: BOOLEAN;
  END;

VAR
  mainMod: ModPtr;
  isLinkable: BOOLEAN;
  warning: BOOLEAN;
  quiet: BOOLEAN;
  (* 17.11.91/bp neue Option -x *)
  external:BOOLEAN;
  modList: ModPtr;


PROCEDURE AddImport(m, imp: ModPtr; mIsDef: BOOLEAN);
PROCEDURE AddMod(n: ModName): ModPtr;
PROCEDURE FindMod(name: ModName): ModPtr;
PROCEDURE DependsOn(a: ModPtr; bName: ModName; aIsDef: BOOLEAN; VAR err: BOOLEAN);
  (* 'a' imports 'b' *)

PROCEDURE GetDate(VAR fn: ARRAY OF CHAR; VAR date: Date): BOOLEAN;

PROCEDURE CleanList; (* MUSS sein, sonst beim 2. Durchlauf Müll!/bp! *)

END MkBase.def
