{
 $Id$
}

{superbbs 1.18}

Procedure Bbs1;
Type
  FLSearchRec  = Record
                   Name:               String[60];
                   Directory:          String[79];
                   Security:           Integer;
                   Flags:              Array[1..4] of byte;
                   PFilesSec:          Integer;
                   PFlags:             Array[1..4] of byte;
                   Attrib:             Byte;
                   Age:                Byte;
                   ListName:           String[67];    (* If begins with *
                                                         character then the
                                                         rest of the string
                                                         shows the upload
                                                         path *)
                   RequiredBPSrate:    Word;
                   ExtraSpace:         Array[1..28] of Byte;
                 End;

Var
  FFile : File of Flsearchrec;
  F     : Flsearchrec;
  Tel   : Word;
Begin
  Writeln('Converting SuperBBS 1.18 file areas.',#10#13);

  Assign(Ffile, BbsPath + 'FLSEARCH.BBS');
  {$I-} Reset(Ffile); {$I+}
  If ioresult <> 0 then
    Begin
      Writeln('Cannot find '+bbspath+'FLSEARCH.BBS!');
      Halt;
    End;

  AddToFile(false);

  Tel := 0;
  While not eof(ffile) do
    Begin
      {$I-} Read(Ffile,F); {$I+}
      If ioresult <> 0 then
        Begin
          Writeln('Error reading '+bbspath+'FLSEARCH.BBS!');
          Halt;
        End;

      Inc(Tel);
      If F.name <> '' then
        Begin
          Inc(Number);
          Bbs.on   := False;
          Bbs.name := F.Name;
          Bbs.nr   := Tel;
          Bbs.path := F.Directory;
          AddToFile(saveset);
        End;
    End;
  Close(Ffile);
End;


