{
 $Id$
}

{roboboard 1.08}

Procedure Bbs12;
Type
  FBaserecord  = record
    Name           : String[40];
    Reserved1      : Byte; { RESERVED}
    CDROMFILENUM   : Byte;
    KILLOLDERTHAN  : Byte; {Will be used by ROBOUTIL}
    ACCESSTYPE     : byte; { 1 is >=   2 is <=   3 is = }
    Security       : Word; {Max 255, future in mind}
    SysopSecurity  : Word; {assumed 255, never used}
    Path           : String[60];
    MenuOnly       : String[12];
    fileflags      : array[1..8] of boolean;
    expansion      : array[1..120] of byte;
  End;
Var
  FFile : File of FBaserecord;
  F     : FBaserecord;
  Tel   : Word;
Begin
  Writeln('Converting RoboBoard 1.08 file areas.',#10#13);

  Assign(Ffile, BbsPath + 'FILEAREA.DEF');
  {$I-} Reset(Ffile); {$I+}
  If ioresult <> 0 then
    Begin
      Writeln('Cannot find '+bbspath+'FILEAREA.DEF!');
      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+'FILEAREA.DEF!');
          Halt;
        End;

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

