TYPE Mstr = String[30];

TYPE mailrec = RECORD
       title,
       sentby    : mstr;
       when      : longint;
       anon,
       read      : boolean;
       sentto,
       line,
       fileindex : integer
{       AnonPost  : BOOLEAN;   }
     End;

     Ext_mailRec = RECORD
       title,
       sentby    : mstr;
       when      : longint;
       anon,
       read      : boolean;
       sentto,
       line,
       fileindex : integer;
       AnonPost  : BOOLEAN;
     End;

VAR Mail1 : FILE OF MailRec;
    Mail2 : FILE Of Ext_mailRec;
    c1    : LONGINT;
    Inrec : MailRec;
    OutRec : Ext_mailRec;

Begin
  Assign(Mail1,'MAIL');
  Assign(Mail2,'NewMail');
  Reset(Mail1);
  Rewrite(Mail2);
  For c1 := 0 TO FileSize(Mail1)-1 DO
    Begin
      Seek(Mail1,c1);
      Read(Mail1,Inrec);
      OutRec.title := InRec.Title;
      OutRec.sentby := InRec.SentBy;
      OutRec.when := inRec.When;
      OutREc.anon := inRec.Anon;
      Outrec.read := InRec.Read;
      Outrec.sentto := InRec.Sentto;
      Outrec.line := InRec.Line;
      OutRec.fileindex := Inrec.FileIndex;
      OutRec.AnonPost := FALSE;
      Seek(Mail2,c1);
      Write(Mail2,OutRec);
      Write(c1,'  ');
    End;
  Close(Mail1);
  Close(Mail2);
End.