mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-02 19:22:05 +01:00
git-svn-id: trunk@8800 -
This commit is contained in:
parent
00fef0fdd0
commit
dab6eec7e2
@ -92,6 +92,17 @@ begin
|
||||
MaybeExtension:=Hstr;
|
||||
end;
|
||||
|
||||
function ExtractFileName(const AFilePath : String): String;
|
||||
var i : Integer;
|
||||
begin
|
||||
i := Length(AFilePath);
|
||||
while (i>0) and (AFilePath[i]<>DirectorySeparator) and
|
||||
(AFilePath[i]<>DriveSeparator) do
|
||||
begin
|
||||
Dec(i);
|
||||
end;
|
||||
ExtractFileName := Copy(AFilePath,i+1,Length(AFilePath));
|
||||
end;
|
||||
|
||||
{*****************************************************************************
|
||||
Options
|
||||
@ -232,11 +243,10 @@ begin
|
||||
Usage;
|
||||
if UnitName='' then
|
||||
begin
|
||||
i:=pos('.',outputfilename)-1;
|
||||
if i<=0 then
|
||||
UnitName:=outputfilename
|
||||
else
|
||||
UnitName:=Copy(OutputFileName,1,i);
|
||||
UnitName := ExtractFileName(outputfilename);
|
||||
i:=pos('.',UnitName)-1;
|
||||
if i>0 then
|
||||
UnitName:=Copy(UnitName,1,i);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
@ -801,31 +801,31 @@ D [0-9]
|
||||
end;
|
||||
"void" if NotInCPlusBlock then return(VOID) else skip_until_eol;
|
||||
"VOID" if NotInCPlusBlock then return(VOID) else skip_until_eol;
|
||||
"#ifdef __cplusplus"[ \t]*\n"extern \"C\" {"\n"#endif"
|
||||
"#ifdef"[ \t]*"__cplusplus"[ \t]*\n"extern \"C\" {"\n"#endif"
|
||||
begin
|
||||
if not stripinfo then
|
||||
writeln(outfile,'{ C++ extern C conditionnal removed }');
|
||||
end;
|
||||
"#ifdef cplusplus"[ \t]*\n"extern \"C\" {"\n"#endif"
|
||||
"#ifdef"[ \t]*"cplusplus"[ \t]*\n"extern \"C\" {"\n"#endif"
|
||||
begin
|
||||
if not stripinfo then
|
||||
writeln(outfile,'{ C++ extern C conditionnal removed }');
|
||||
end;
|
||||
"#ifdef __cplusplus"[ \t]*\n"}"\n"#endif"
|
||||
"#ifdef"[ \t]*"__cplusplus"[ \t]*\n"}"\n"#endif"
|
||||
begin
|
||||
if not stripinfo then
|
||||
writeln(outfile,'{ C++ end of extern C conditionnal removed }');
|
||||
end;
|
||||
"#ifdef cplusplus"[ \t]*\n"}"\n"#endif"
|
||||
"#ifdef"[ \t]*"cplusplus"[ \t]*\n"}"\n"#endif"
|
||||
begin
|
||||
if not stripinfo then
|
||||
writeln(outfile,'{ C++ end of extern C conditionnal removed }');
|
||||
end;
|
||||
"#ifdef cplusplus"[ \t]*
|
||||
"#ifdef"[ \t]*"cplusplus"[ \t]*
|
||||
begin
|
||||
Inc(cplusblocklevel);
|
||||
end;
|
||||
"#ifdef __cplusplus"[ \t]*
|
||||
"#ifdef"[ \t]*"__cplusplus"[ \t]*
|
||||
begin
|
||||
Inc(cplusblocklevel);
|
||||
end;
|
||||
@ -1081,3 +1081,4 @@ end.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
1444
utils/h2pas/scan.pas
1444
utils/h2pas/scan.pas
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user