home *** CD-ROM | disk | FTP | other *** search
- (******************************************************************************)
- (* ALLFIX sample procedures *)
- (* Copyright (C) 1992,98 Harms Software Engineering, all rights reserved *)
- (* *)
- (* All information in this documentation is *)
- (* subject to change without prior notice *)
- (******************************************************************************)
-
- Uses Types;
-
- Procedure ReadFileEchos;
-
- (* This procedure demonstrates how to read the FAREAS.FIX file *)
-
- (* The procedures for reading the other configuration files, such as *)
- (* NODEFILE.FIX are identical to this one. For that reason they are not *)
- (* included in the developers kit *)
-
- Var Index, Data : File;
- Rec : FileMgrRec;
- Idx : FileMgrIdx;
- {$IFDEF OS2}
- Nr : LongInt;
- {$ELSE}
- Nr : Word;
- {$ENDIF}
-
- Begin
- WriteLn('Reading FAREAS.FIX');
-
- Assign(Index, 'FAREAS.IDX');
- Reset(Index, Sizeof(Idx));
-
- Assign(Data, 'FAREAS.FIX');
- Reset(Data, Sizeof(Rec));
-
- Blockread(Index, Idx, 1, Nr);
- While Nr > 0 Do
- Begin
- Seek(Data, Idx.Offset);
- Blockread(Data, Rec, 1, Nr);
- WriteLn(Rec.Name);
- Blockread(Index, Idx, 1, Nr);
- End;
-
- Close(Index);
- Close(Data);
- End;
-
- Begin
- ReadFileEchos;
- End.
-