mirror of
https://github.com/vishapoberon/compiler.git
synced 2026-04-05 23:22:25 +00:00
-F doesn'teven try opening existing sym file. -s silently replaces old version sym file.
This commit is contained in:
parent
4c7aa1720a
commit
28d4bc8219
1 changed files with 14 additions and 7 deletions
|
|
@ -588,15 +588,22 @@ MODULE OPM; (* RC 6.3.89 / 28.6.89, J.Templ 10.7.89 / 22.7.96 *)
|
|||
END CloseOldSym;
|
||||
|
||||
PROCEDURE OldSym*(VAR modName: ARRAY OF CHAR; VAR done: BOOLEAN);
|
||||
VAR tag, ver: CHAR; fileName: FileName;
|
||||
VAR tag, ver: CHAR; fileName: FileName; res: INTEGER;
|
||||
BEGIN
|
||||
oldSFile := NIL; done := FALSE;
|
||||
MakeFileName(modName, fileName, SFext);
|
||||
oldSFile := Files.Old(fileName); done := oldSFile # NIL;
|
||||
IF done THEN
|
||||
Files.Set(oldSF, oldSFile, 0); Files.Read(oldSF, tag); Files.Read(oldSF, ver);
|
||||
IF (tag # SFtag) OR (ver # SFver) THEN
|
||||
err(-306); (*possibly a symbol file from another Oberon implementation, e.g. HP-Oberon*)
|
||||
CloseOldSym; done := FALSE
|
||||
IF forcenewsym IN Options THEN
|
||||
Files.Delete(fileName, res)
|
||||
ELSE
|
||||
oldSFile := Files.Old(fileName); done := oldSFile # NIL;
|
||||
IF done THEN
|
||||
Files.Set(oldSF, oldSFile, 0); Files.Read(oldSF, tag); Files.Read(oldSF, ver);
|
||||
IF (tag # SFtag) OR (ver # SFver) THEN
|
||||
(* Possibly a symbol file from another Oberon implementation, e.g. HP-Oberon,
|
||||
or from a symbol incompatible version of this Oberon. *)
|
||||
IF ~(newsf IN Options) THEN err(-306) END;
|
||||
CloseOldSym; done := FALSE
|
||||
END
|
||||
END
|
||||
END
|
||||
END OldSym;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue