|
@@ -48,6 +48,23 @@ const
|
|
|
sLineBreak = LineEnding;
|
|
|
DefaultTextLineBreakStyle : TTextLineBreakStyle = tlbsLF;
|
|
|
|
|
|
+var
|
|
|
+ argc: longint;
|
|
|
+ argv: PPChar;
|
|
|
+ envp: PPChar;
|
|
|
+
|
|
|
+function ConvertToFdRelativePath(path: ansistring; out fd: LongInt; out relfd_path: ansistring): Boolean;
|
|
|
+
|
|
|
+implementation
|
|
|
+
|
|
|
+{$I wasitypes.inc}
|
|
|
+{$I wasiprocs.inc}
|
|
|
+
|
|
|
+function HasDriveLetter(const path: rawbytestring): Boolean;
|
|
|
+begin
|
|
|
+ HasDriveLetter:=(path<>'') and (UpCase(path[1]) in ['A'..'Z']) and (path[2] = ':');
|
|
|
+end;
|
|
|
+
|
|
|
type
|
|
|
PPreopenedDir = ^TPreopenedDir;
|
|
|
TPreopenedDir = record
|
|
@@ -60,27 +77,12 @@ type
|
|
|
end;
|
|
|
|
|
|
var
|
|
|
- argc: longint;
|
|
|
- argv: PPChar;
|
|
|
- envp: PPChar;
|
|
|
preopened_dirs_count: longint;
|
|
|
preopened_dirs: PPreopenedDir;
|
|
|
drives_count: longint;
|
|
|
current_dirs: PCurrentDir;
|
|
|
current_drive: longint;
|
|
|
|
|
|
-function ConvertToFdRelativePath(path: ansistring; out fd: LongInt; out relfd_path: ansistring): Boolean;
|
|
|
-
|
|
|
-implementation
|
|
|
-
|
|
|
-{$I wasitypes.inc}
|
|
|
-{$I wasiprocs.inc}
|
|
|
-
|
|
|
-function HasDriveLetter(const path: rawbytestring): Boolean;
|
|
|
-begin
|
|
|
- HasDriveLetter:=(path<>'') and (UpCase(path[1]) in ['A'..'Z']) and (path[2] = ':');
|
|
|
-end;
|
|
|
-
|
|
|
{$I system.inc}
|
|
|
|
|
|
var
|