pastojs: clean up

git-svn-id: trunk@40067 -
This commit is contained in:
Mattias Gaertner 2018-10-28 14:52:39 +00:00
parent 01d1cde8a3
commit f6b2b6d4e8
3 changed files with 27 additions and 0 deletions

View File

@ -222,7 +222,9 @@ begin
Result:=false; Result:=false;
RelPath:=Filename; RelPath:=Filename;
if (BaseDirectory='') or (Filename='') then exit; if (BaseDirectory='') or (Filename='') then exit;
{AllowWriteln}
writeln('TryCreateRelativePath ToDo: ',Filename,' Base=',BaseDirectory,' UsePointDirectory=',UsePointDirectory); writeln('TryCreateRelativePath ToDo: ',Filename,' Base=',BaseDirectory,' UsePointDirectory=',UsePointDirectory);
{AllowWriteln-}
end; end;
{$ELSE} {$ELSE}
function IsNameChar(c: char): boolean; inline; function IsNameChar(c: char): boolean; inline;
@ -325,7 +327,9 @@ begin
Len:=length(AFilename); Len:=length(AFilename);
if Len=0 then exit(''); if Len=0 then exit('');
Result:=AFilename; Result:=AFilename;
{AllowWriteln}
writeln('ResolveDots ToDo ',AFilename); writeln('ResolveDots ToDo ',AFilename);
{AllowWriteln-}
end; end;
{$ELSE} {$ELSE}
@ -590,7 +594,10 @@ end;
function CompareFilenames(const File1, File2: string): integer; function CompareFilenames(const File1, File2: string): integer;
begin begin
{$IFDEF Pas2js} {$IFDEF Pas2js}
{AllowWriteln}
writeln('CompareFilenames ToDo ',File1,' ',File2); writeln('CompareFilenames ToDo ',File1,' ',File2);
{AllowWriteln-}
raise Exception.Create('CompareFilenames ToDo');
Result:=0; Result:=0;
{$ELSE} {$ELSE}
Result:=AnsiCompareFileName(File1,File2); Result:=AnsiCompareFileName(File1,File2);
@ -622,7 +629,10 @@ function MatchGlobbing(Mask, Name: string): boolean;
{$IFDEF Pas2js} {$IFDEF Pas2js}
begin begin
if Mask='' then exit(Name=''); if Mask='' then exit(Name='');
{AllowWriteln}
writeln('MatchGlobbing ToDo ',Mask,' Name=',Name); writeln('MatchGlobbing ToDo ',Mask,' Name=',Name);
{AllowWriteln-}
raise Exception.Create('MatchGlobbing ToDo');
Result:=false; Result:=false;
end; end;
{$ELSE} {$ELSE}

View File

@ -17,7 +17,9 @@
function FilenameIsAbsolute(const aFilename: string): boolean; function FilenameIsAbsolute(const aFilename: string): boolean;
begin begin
{AllowWriteln}
writeln('FilenameIsAbsolute ToDo ',aFilename); writeln('FilenameIsAbsolute ToDo ',aFilename);
{AllowWriteln-}
Result:=FilenameIsUnixAbsolute(aFilename); Result:=FilenameIsUnixAbsolute(aFilename);
raise Exception.Create('FilenameIsAbsolute ToDo'); raise Exception.Create('FilenameIsAbsolute ToDo');
end; end;
@ -61,7 +63,9 @@ end;
function GetCurrentDirPJ: String; function GetCurrentDirPJ: String;
begin begin
{AllowWriteln}
writeln('GetCurrentDirPJ ToDo'); writeln('GetCurrentDirPJ ToDo');
{AllowWriteln-}
Result:=''; Result:='';
raise Exception.Create('GetCurrentDirPJ ToDo'); raise Exception.Create('GetCurrentDirPJ ToDo');
end; end;
@ -100,14 +104,18 @@ end;
function ResolveSymLinks(const Filename: string; ExceptionOnError: boolean function ResolveSymLinks(const Filename: string; ExceptionOnError: boolean
): string; ): string;
begin begin
{AllowWriteln}
writeln('ResolveSymLinks ToDo ',Filename,' ',ExceptionOnError); writeln('ResolveSymLinks ToDo ',Filename,' ',ExceptionOnError);
{AllowWriteln-}
Result:=Filename; Result:=Filename;
raise Exception.Create('ResolveSymLinks ToDo'); raise Exception.Create('ResolveSymLinks ToDo');
end; end;
function FileIsWritable(const AFilename: string): boolean; function FileIsWritable(const AFilename: string): boolean;
begin begin
{AllowWriteln}
writeln('FileIsWritable ToDo ',AFilename); writeln('FileIsWritable ToDo ',AFilename);
{AllowWriteln-}
Result := false; Result := false;
raise Exception.Create('FileIsWritable ToDo'); raise Exception.Create('FileIsWritable ToDo');
end; end;

View File

@ -490,18 +490,27 @@ end;
constructor TPas2jsFileStream.Create(Filename: string; Mode: cardinal); constructor TPas2jsFileStream.Create(Filename: string; Mode: cardinal);
begin begin
{AllowWriteln}
writeln('TPas2JSFileStream.Create TODO ',Filename,' Mode=',Mode); writeln('TPas2JSFileStream.Create TODO ',Filename,' Mode=',Mode);
{AllowWriteln-}
raise Exception.Create('TPas2JSFileStream.Create');
end; end;
destructor TPas2jsFileStream.Destroy; destructor TPas2jsFileStream.Destroy;
begin begin
{AllowWriteln}
writeln('TPas2JSFileStream.Destroy TODO'); writeln('TPas2JSFileStream.Destroy TODO');
{AllowWriteln-}
raise Exception.Create('TPas2JSFileStream.Destroy');
inherited Destroy; inherited Destroy;
end; end;
procedure TPas2jsFileStream.Write(const s: string); procedure TPas2jsFileStream.Write(const s: string);
begin begin
{AllowWriteln}
writeln('TPas2JSFileStream.Write TODO s="',s,'"'); writeln('TPas2JSFileStream.Write TODO s="',s,'"');
{AllowWriteln-}
raise Exception.Create('TPas2JSFileStream.Write');
end; end;
{$ENDIF} {$ENDIF}