mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-27 08:11:27 +01:00
utils: implement module options for ppudump
git-svn-id: trunk@14768 -
This commit is contained in:
parent
25298fbcd9
commit
1b55473ad5
@ -2229,6 +2229,54 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure readmoduleoptions(space : string);
|
||||||
|
type
|
||||||
|
tmoduleoption = (mo_none,
|
||||||
|
mo_hint_deprecated,
|
||||||
|
mo_hint_platform,
|
||||||
|
mo_hint_library,
|
||||||
|
mo_hint_unimplemented,
|
||||||
|
mo_hint_experimental,
|
||||||
|
mo_has_deprecated_msg
|
||||||
|
);
|
||||||
|
tmoduleoptions = set of tmoduleoption;
|
||||||
|
tmoduleopt=record
|
||||||
|
mask : tmoduleoption;
|
||||||
|
str : string[30];
|
||||||
|
end;
|
||||||
|
const
|
||||||
|
moduleopts=6;
|
||||||
|
moduleopt : array[1..moduleopts] of tmoduleopt=(
|
||||||
|
(mask:mo_hint_deprecated; str:'Hint Deprecated'),
|
||||||
|
(mask:mo_hint_platform; str:'Hint Platform'),
|
||||||
|
(mask:mo_hint_library; str:'Hint Library'),
|
||||||
|
(mask:mo_hint_unimplemented; str:'Hint Unimplemented'),
|
||||||
|
(mask:mo_hint_experimental; str:'Hint Experimental'),
|
||||||
|
(mask:mo_has_deprecated_msg; str:'Has Deprecated Message')
|
||||||
|
);
|
||||||
|
var
|
||||||
|
moduleoptions : tmoduleoptions;
|
||||||
|
i : longint;
|
||||||
|
first : boolean;
|
||||||
|
begin
|
||||||
|
ppufile.getsmallset(moduleoptions);
|
||||||
|
if moduleoptions<>[] then
|
||||||
|
begin
|
||||||
|
first:=true;
|
||||||
|
for i:=1to moduleopts do
|
||||||
|
if (moduleopt[i].mask in moduleoptions) then
|
||||||
|
begin
|
||||||
|
if first then
|
||||||
|
first:=false
|
||||||
|
else
|
||||||
|
write(', ');
|
||||||
|
write(moduleopt[i].str);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
writeln;
|
||||||
|
if mo_has_deprecated_msg in moduleoptions then
|
||||||
|
writeln(space,'Deprecated : ', ppufile.getstring);
|
||||||
|
end;
|
||||||
|
|
||||||
{****************************************************************************
|
{****************************************************************************
|
||||||
Read General Part
|
Read General Part
|
||||||
@ -2248,6 +2296,9 @@ begin
|
|||||||
ibmodulename :
|
ibmodulename :
|
||||||
Writeln('Module Name: ',getstring);
|
Writeln('Module Name: ',getstring);
|
||||||
|
|
||||||
|
ibmoduleoptions:
|
||||||
|
readmoduleoptions(' ');
|
||||||
|
|
||||||
ibsourcefiles :
|
ibsourcefiles :
|
||||||
begin
|
begin
|
||||||
sourcenumber:=1;
|
sourcenumber:=1;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user