Program FdFAX;
uses crt,dos;

TYPE
  STATREC = RECORD
    inbound,                                              {Inbound mail calls}
    outbound,                                            {Outbound mail calls}
    humans,                                              {Inbound BBS callers}
    filesin,                                                  {Received files}
    filesout,                                                     {Sent files}
    goodsess,                                                  {Good sessions}
    badsess,                                                 {Failed sessions}
    requests  :WORD;                                   {Inbound file requests}
    date,                                               {UNIX-style timestamp}
    bytesin,                                                  {Received bytes}
    bytesout  :LONGINT;                                           {Sent bytes}
  END;{STATREC}

  LASTCALL = RECORD
    system_name :STRING[30];                            {Remote system's name}
    location    :STRING[40];                        {Remote system's location}
    zone,                                            {Remote system's address}
    net,
    node,
    point       :WORD;
    time        :LONGINT;                               {UNIX-style timestamp}
  END;{LASTCALL}

  ACTIVITY = RECORD
    LastIn,                                           {Last inbound mail call}
    LastOut  :LASTCALL;                              {Last outbound mail call}
    TodayAct,                                               {Today's activity}
    YesterdayAct
            :STATREC;                                   {Yesterday's activity}
  END;{ACTIVITY}

(* end of file "lastcall.inc" *)
Var
 fichier : file of activity;
 act : activity;

Function str_time : string;
(**************************)
var item : string[30];
    hour,minute,second,sec100 : word;
    h,m : string[2];
begin
  gettime(hour,minute,second,sec100);
  str(minute:0,m);
  if length(m) < 2 then m := '0' + m;
  str(hour:0,h);
  if length(h) < 2 then h := '0' + h;
  item := '[** FAX RECEIVED: ' + h + ':' + m + ' **]';
  str_time := item;
end;


Begin
  Assign(fichier,'lastcall.fd');
{$I-}  reset(fichier); {$I+}
if ioresult <> 0 then begin
 Writeln('Impossible d''ouvrir le fichier LASCALL.FD');
 Halt;
end;

  read(fichier,act);
  seek(fichier,0);
  act.Lastin.system_name := str_time;
  act.lastin.location := 'FDFAX 1.0b';
  act.lastin.zone := 0;
  act.lastin.net := 0;
  act.lastin.node := 0;
  act.lastin.point := 0;
  act.lastin.time := 0;
  Write('FD-FAX Version 1.0b By David Robert - FREEWARE...');
  write(fichier,act);
  Writeln(' Ok.');
  delay(100);
  close(fichier);

end.


syntax highlighted by Code2HTML, v. 0.9.1