mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-06-02 18:58:24 +02:00
+ Statistics of warnings, hints and notes - (modified/fixed) patch from Naj Kejah, part of wishlist item 4897, plus hardcoded text moved to message file
git-svn-id: trunk@3181 -
This commit is contained in:
parent
7b9c5f5c50
commit
c17b57db07
@ -77,7 +77,10 @@ type
|
||||
currentcolumn : longint; { current line and column }
|
||||
{ Total Status }
|
||||
compiledlines : longint; { the number of lines which are compiled }
|
||||
errorcount : longint; { number of generated errors }
|
||||
errorcount,
|
||||
countWarnings,
|
||||
countNotes,
|
||||
countHints : longint; { number of found errors/warnings/notes/hints }
|
||||
codesize,
|
||||
datasize : aint;
|
||||
{ program info }
|
||||
|
@ -382,10 +382,19 @@ begin
|
||||
starttime:=starttime+3600.0*24.0;
|
||||
timestr:=tostr(trunc(starttime))+'.'+tostr(trunc(frac(starttime)*10));
|
||||
if status.codesize<>-1 then
|
||||
linkstr:=', '+tostr(status.codesize)+' bytes code, '+tostr(status.datasize)+' bytes data'
|
||||
linkstr:=', '+tostr(status.codesize)+' ' +strpas(MessagePChar(general_text_bytes_code))+', '+tostr(status.datasize)+' '+strpas(MessagePChar(general_text_bytes_data))
|
||||
else
|
||||
linkstr:='';
|
||||
Message3(general_i_abslines_compiled,tostr(status.compiledlines),timestr,linkstr);
|
||||
if (Status.Verbosity and V_Warning = V_Warning) and
|
||||
(Status.CountWarnings <> 0) then
|
||||
Message1 (general_i_number_of_warnings, tostr (Status.CountWarnings));
|
||||
if (Status.Verbosity and V_Hint = V_Hint) and
|
||||
(Status.CountHints <> 0) then
|
||||
Message1 (general_i_number_of_hints, tostr (Status.CountHints));
|
||||
if (Status.Verbosity and V_Note = V_Note) and
|
||||
(Status.CountNotes <> 0) then
|
||||
Message1 (general_i_number_of_notes, tostr (Status.CountNotes));
|
||||
end;
|
||||
finally
|
||||
{ no message possible after this !! }
|
||||
|
@ -45,8 +45,10 @@
|
||||
#
|
||||
# General
|
||||
#
|
||||
# 01016 is the last used one
|
||||
# 01023 is the last used one
|
||||
#
|
||||
general_text_bytes_code=01019_bytes code
|
||||
general_text_bytes_data=01020_bytes data
|
||||
# BeginOfTeX
|
||||
% \section{General compiler messages}
|
||||
% This section gives the compiler messages which are not fatal, but which
|
||||
@ -79,7 +81,7 @@ general_t_objectpath=01007_T_Using object path: $1
|
||||
% When the \var{-vt} switch is used, this line tells you where the compiler
|
||||
% looks for object files you link in (files used in \var{\{\$L xxx\}} statements).
|
||||
% You can set this path with the \var{-Fo} option.
|
||||
general_i_abslines_compiled=01008_I_$1 Lines compiled, $2 sec$3
|
||||
general_i_abslines_compiled=01008_I_$1 lines compiled, $2 sec$3
|
||||
% When the \var{-vi} switch is used, the compiler reports the number
|
||||
% of lines compiled, and the time it took to compile them (real time,
|
||||
% not program time).
|
||||
@ -113,6 +115,13 @@ general_i_hint=01016_I_Hint:
|
||||
general_e_path_does_not_exist=01017_E_Path "$1" does not exist
|
||||
% The specified path does not exist.
|
||||
general_f_compilation_aborted=01018_F_Compilation aborted
|
||||
% Compilation was aborted.
|
||||
general_i_number_of_warnings=01021_I_$1 warning(s) issued
|
||||
% Total number of warnings issued during compilation.
|
||||
general_i_number_of_hints=01022_I_$1 hint(s) issued
|
||||
% Total number of hints issued during compilation.
|
||||
general_i_number_of_notes=01023_I_$1 note(s) issued
|
||||
% Total number of notes issued during compilation.
|
||||
% \end{description}
|
||||
#
|
||||
# Scanner
|
||||
|
@ -1,4 +1,6 @@
|
||||
const
|
||||
general_text_bytes_code=01019;
|
||||
general_text_bytes_data=01020;
|
||||
general_t_compilername=01000;
|
||||
general_d_sourceos=01001;
|
||||
general_i_targetos=01002;
|
||||
@ -18,6 +20,9 @@ const
|
||||
general_i_hint=01016;
|
||||
general_e_path_does_not_exist=01017;
|
||||
general_f_compilation_aborted=01018;
|
||||
general_i_number_of_warnings=01021;
|
||||
general_i_number_of_hints=01022;
|
||||
general_i_number_of_notes=01023;
|
||||
scan_f_end_of_file=02000;
|
||||
scan_f_string_exceeds_line=02001;
|
||||
scan_f_illegal_char=02002;
|
||||
@ -673,9 +678,9 @@ const
|
||||
option_info=11024;
|
||||
option_help_pages=11025;
|
||||
|
||||
MsgTxtSize = 39720;
|
||||
MsgTxtSize = 39829;
|
||||
|
||||
MsgIdxMax : array[1..20] of longint=(
|
||||
19,75,219,60,62,47,100,22,135,60,
|
||||
24,75,219,60,62,47,100,22,135,60,
|
||||
41,1,1,1,1,1,1,1,1,1
|
||||
);
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -517,19 +517,25 @@ var
|
||||
begin
|
||||
v:=v or V_Warning;
|
||||
if status.errorwarning then
|
||||
inc(status.errorcount);
|
||||
inc(status.errorcount)
|
||||
else
|
||||
inc(status.countWarnings);
|
||||
end;
|
||||
'N' :
|
||||
begin
|
||||
v:=v or V_Note;
|
||||
if status.errornote then
|
||||
inc(status.errorcount);
|
||||
inc(status.errorcount)
|
||||
else
|
||||
inc(status.countNotes);
|
||||
end;
|
||||
'H' :
|
||||
begin
|
||||
v:=v or V_Hint;
|
||||
if status.errorhint then
|
||||
inc(status.errorcount);
|
||||
inc(status.errorcount)
|
||||
else
|
||||
inc(status.countHints);
|
||||
end;
|
||||
'I' :
|
||||
v:=v or V_Info;
|
||||
@ -830,3 +836,4 @@ finalization
|
||||
{ Be sure to close the redirect files to flush all data }
|
||||
DoneRedirectFile;
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user