home *** CD-ROM | disk | FTP | other *** search
/ The Unsorted BBS Collection / thegreatunsorted.tar / thegreatunsorted / hacking / phreak_utils_pc / errcheck.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1995-04-01  |  907 b   |  34 lines

  1. var t,b:text;
  2.     line,s,errmsg,edfile,scol:string;
  3.     f:file of byte;
  4.     x,col:byte;
  5.  
  6. begin
  7.   assign(t,'error');
  8.   reset(t);
  9.   while not eof(t) do begin
  10.     readln(t,s);
  11.     if pos('Error ',s)<>0 then begin
  12.       edfile:=copy(s,1,pos('(',s)-1);
  13.       line:=copy(s,pos('(',s)+1,pos(')',s)-pos('(',s)-1);
  14.       errmsg:='*** '+copy(s,pos(': ',s)+2,length(s)-pos(': ',s)-1)+' ***';
  15.       for x:=1 to length(errmsg) do if errmsg[x]='"' then errmsg[x]:='''';
  16.       readln(t);
  17.       readln(t,s);
  18.       col:=pos('^',s);
  19.       str(col,scol);
  20.       close(t);
  21.       assign(b,'reed.bat');
  22.       rewrite(b);
  23.       writeln(b,'SPFPC /E ',edfile,' /L(',line,',',scol,') /N"',errmsg,'"');
  24.       close(b);
  25.       writeln('error - reloading...');
  26.       halt($FF);
  27.     end;
  28.   end;
  29.   assign(f,'exe\'+paramstr(1)+'.exe');
  30.   reset(f);
  31.   writeln('exe is ',filesize(f),' bytes');
  32.   close(f);
  33. end.
  34.