* small fix for aktfilepos

This commit is contained in:
peter 1998-08-19 14:57:50 +00:00
parent aff857167c
commit 273fc24dbb
3 changed files with 35 additions and 22 deletions

View File

@ -690,7 +690,19 @@ const
if c=',' then if c=',' then
begin begin
current_scanner^.readchar; {Remove , } current_scanner^.readchar; {Remove , }
hs:=current_scanner^.readid; {Check for multiple switches on one line} { read next switch, support $v+,$+}
hs:=current_scanner^.readid;
if (hs='') then
begin
if (c='$') and not(cs_tp_compatible in aktmoduleswitches) then
begin
current_scanner^.readchar; { skip $ }
hs:=current_scanner^.readid;
end;
if (hs='') then
Message1(scan_w_illegal_directive,'$'+c);
end
else
Message1(scan_d_handling_switch,'$'+hs); Message1(scan_d_handling_switch,'$'+hs);
end end
else else
@ -720,8 +732,8 @@ const
{ {
$Log$ $Log$
Revision 1.21 1998-08-19 00:30:22 peter Revision 1.22 1998-08-19 14:57:50 peter
* in_main -> in_global * small fix for aktfilepos
Revision 1.20 1998/08/18 15:11:52 peter Revision 1.20 1998/08/18 15:11:52 peter
* recompiles again * recompiles again

View File

@ -593,6 +593,7 @@ implementation
{$ifdef SourceLine} {$ifdef SourceLine}
hp : plongint; hp : plongint;
{$endif SourceLine} {$endif SourceLine}
oldaktfilepos : tfileposinfo;
begin begin
if (byte(inputpointer^)=0) and if (byte(inputpointer^)=0) and
filenotatend then filenotatend then
@ -629,10 +630,13 @@ implementation
end; end;
plongint(longint(linebuf)+line_no*2)^:=lastlinepos; plongint(longint(linebuf)+line_no*2)^:=lastlinepos;
{$endif SourceLine} {$endif SourceLine}
{ update for status and call the show status routine } { update for status and call the show status routine,
but don't touch aktfilepos ! }
oldaktfilepos:=aktfilepos;
gettokenpos; { update for v_status } gettokenpos; { update for v_status }
inc(status.compiledlines); inc(status.compiledlines);
ShowStatus; ShowStatus;
aktfilepos:=oldaktfilepos;
end; end;
@ -1548,7 +1552,10 @@ exit_label:
end. end.
{ {
$Log$ $Log$
Revision 1.41 1998-08-18 14:17:10 pierre Revision 1.42 1998-08-19 14:57:51 peter
* small fix for aktfilepos
Revision 1.41 1998/08/18 14:17:10 pierre
* bug about assigning the return value of a function to * bug about assigning the return value of a function to
a procvar fixed : warning a procvar fixed : warning
assigning a proc to a procvar need @ in FPC mode !! assigning a proc to a procvar need @ in FPC mode !!

View File

@ -229,7 +229,11 @@ begin
begin begin
status.currentsource:=current_module^.sourcefiles.get_file_name(aktfilepos.fileindex); status.currentsource:=current_module^.sourcefiles.get_file_name(aktfilepos.fileindex);
lastmoduleidx:=current_module^.unit_index; lastmoduleidx:=current_module^.unit_index;
lastfileidx:=aktfilepos.fileindex; { update lastfileidx only if name known PM }
if status.currentsource<>'' then
lastfileidx:=aktfilepos.fileindex
else
lastfileidx:=0;
end; end;
end; end;
@ -327,20 +331,7 @@ begin
Replace(s,'$VER',version_string); Replace(s,'$VER',version_string);
Replace(s,'$TARGET',target_string); Replace(s,'$TARGET',target_string);
{ fix status } { fix status }
status.currentline:=aktfilepos.line; UpdateStatus;
status.currentcolumn:=aktfilepos.column;
if assigned(current_module) and
((current_module^.unit_index<>lastmoduleidx) or
(aktfilepos.fileindex<>lastfileidx)) then
begin
status.currentsource:=current_module^.sourcefiles.get_file_name(aktfilepos.fileindex);
lastmoduleidx:=current_module^.unit_index;
{ update lastfileidx only if name known PM }
if status.currentsource<>'' then
lastfileidx:=aktfilepos.fileindex
else
lastfileidx:=0;
end;
{ show comment } { show comment }
if do_comment(v,s) or dostop or (status.errorcount>=status.maxerrorcount) then if do_comment(v,s) or dostop or (status.errorcount>=status.maxerrorcount) then
stop; stop;
@ -389,7 +380,10 @@ end.
{ {
$Log$ $Log$
Revision 1.16 1998-08-18 14:17:15 pierre Revision 1.17 1998-08-19 14:57:52 peter
* small fix for aktfilepos
Revision 1.16 1998/08/18 14:17:15 pierre
* bug about assigning the return value of a function to * bug about assigning the return value of a function to
a procvar fixed : warning a procvar fixed : warning
assigning a proc to a procvar need @ in FPC mode !! assigning a proc to a procvar need @ in FPC mode !!