{
 $Id$
}

Procedure Bbs3;
Var
  tel : word;
  t : text;
  tmp : string;
Begin
  Writeln('Converting Maximus 3.0 file areas',#10#13);

  Assign(t, bbspath + 'FILEAREA.CTL');
  {$I-} reset(t); {$I+}
  If ioresult <> 0 then
    Begin
      Writeln('Cannot open '+bbspath+'FILEAREA.CTL');
      Halt;
    End;

  AddToFile(falsE);
  tel := 0;

  While not eof(t) do
    Begin

      {$I-} Readln(t,Tmp); {$I+}
      If ioresult <> 0 then
        Begin
          Writeln('Error reading '+bbspath+'FILEAREA.CTL!');
          Halt;
        End;

      if extractwords(1,1,upper(tmp)) = 'FILEAREA' then
        Begin
          inc(tel);
          fillchar(bbs,sizeof(bbs),#0);

          readln(t,tmp);  {acs}

          readln(t,tmp);  {desc}

          Bbs.Name := extractwords(3,1,tmp);

          readln(t,tmp);   {download dir}

          Bbs.Path := extractwords(1,1,tmp);

          Inc(Number);
          Bbs.on   := False;
          Bbs.nr   := Tel;

          AddToFile(saveset);

        End;
    End;
End;

