implement newOrNil, changes to stdlib
- newOrNil works like new, but sets the variable to nil if the heap allocation failed - change stdlib to use newOrNil in openfile and openvolumeid - changes to programs that use openvolumeid
This commit is contained in:
parent
165517a9c8
commit
14d6de059d
10 changed files with 68 additions and 48 deletions
|
|
@ -14,8 +14,8 @@ var dirs:DirectorySlot;
|
|||
error:integer;
|
||||
begin
|
||||
lastSlot := volumeTable[volid].part.dirSize - 1;
|
||||
openvolumeid(volid);
|
||||
|
||||
openvolumeid(volid, error); (* we just ignore error here because
|
||||
we should always have enough heap space *)
|
||||
for i := 0 to lastSlot do
|
||||
begin
|
||||
getdirslot(volid, i, dirs, error);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue