mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 10:09:20 +02:00
+ DirectoryExists added for main branch OS/2 too
This commit is contained in:
parent
c4ddcc78a8
commit
9e9a775a2e
@ -817,11 +817,40 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
{$ASMMODE INTEL}
|
||||||
|
function DirectoryExists (const Directory: string): boolean;
|
||||||
|
{$IFOPT H+}
|
||||||
|
assembler;
|
||||||
|
{$ELSE}
|
||||||
|
var FN: string;
|
||||||
|
begin
|
||||||
|
FN := Directory + #0;
|
||||||
|
{$ENDIF}
|
||||||
|
asm
|
||||||
|
mov ax, 4300h
|
||||||
|
{$IFOPT H+}
|
||||||
|
mov edx, Directory
|
||||||
|
{$ELSE}
|
||||||
|
lea edx, FN
|
||||||
|
inc edx
|
||||||
|
{$ENDIF}
|
||||||
|
call syscall
|
||||||
|
mov eax, 0
|
||||||
|
jc @FExistsEnd
|
||||||
|
test cx, 10h
|
||||||
|
jz @FExistsEnd
|
||||||
|
inc eax
|
||||||
|
@FExistsEnd:
|
||||||
|
{$IFOPT H-}
|
||||||
|
end;
|
||||||
|
{$ENDIF}
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
{****************************************************************************
|
{****************************************************************************
|
||||||
Time Functions
|
Time Functions
|
||||||
****************************************************************************}
|
****************************************************************************}
|
||||||
|
|
||||||
{$asmmode intel}
|
|
||||||
procedure GetLocalTime (var SystemTime: TSystemTime); assembler;
|
procedure GetLocalTime (var SystemTime: TSystemTime); assembler;
|
||||||
asm
|
asm
|
||||||
(* Expects the default record alignment (word)!!! *)
|
(* Expects the default record alignment (word)!!! *)
|
||||||
@ -954,7 +983,10 @@ end.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.2 2003-03-23 23:11:17 hajny
|
Revision 1.3 2003-03-29 15:01:20 hajny
|
||||||
|
+ DirectoryExists added for main branch OS/2 too
|
||||||
|
|
||||||
|
Revision 1.2 2003/03/23 23:11:17 hajny
|
||||||
+ emx target added
|
+ emx target added
|
||||||
|
|
||||||
Revision 1.1 2002/11/17 16:22:54 hajny
|
Revision 1.1 2002/11/17 16:22:54 hajny
|
||||||
|
@ -817,11 +817,40 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
{$ASMMODE INTEL}
|
||||||
|
function DirectoryExists (const Directory: string): boolean;
|
||||||
|
{$IFOPT H+}
|
||||||
|
assembler;
|
||||||
|
{$ELSE}
|
||||||
|
var FN: string;
|
||||||
|
begin
|
||||||
|
FN := Directory + #0;
|
||||||
|
{$ENDIF}
|
||||||
|
asm
|
||||||
|
mov ax, 4300h
|
||||||
|
{$IFOPT H+}
|
||||||
|
mov edx, Directory
|
||||||
|
{$ELSE}
|
||||||
|
lea edx, FN
|
||||||
|
inc edx
|
||||||
|
{$ENDIF}
|
||||||
|
call syscall
|
||||||
|
mov eax, 0
|
||||||
|
jc @FExistsEnd
|
||||||
|
test cx, 10h
|
||||||
|
jz @FExistsEnd
|
||||||
|
inc eax
|
||||||
|
@FExistsEnd:
|
||||||
|
{$IFOPT H-}
|
||||||
|
end;
|
||||||
|
{$ENDIF}
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
{****************************************************************************
|
{****************************************************************************
|
||||||
Time Functions
|
Time Functions
|
||||||
****************************************************************************}
|
****************************************************************************}
|
||||||
|
|
||||||
{$asmmode intel}
|
|
||||||
procedure GetLocalTime (var SystemTime: TSystemTime); assembler;
|
procedure GetLocalTime (var SystemTime: TSystemTime); assembler;
|
||||||
asm
|
asm
|
||||||
(* Expects the default record alignment (word)!!! *)
|
(* Expects the default record alignment (word)!!! *)
|
||||||
@ -954,7 +983,10 @@ end.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.22 2003-03-01 21:19:14 hajny
|
Revision 1.23 2003-03-29 15:01:20 hajny
|
||||||
|
+ DirectoryExists added for main branch OS/2 too
|
||||||
|
|
||||||
|
Revision 1.22 2003/03/01 21:19:14 hajny
|
||||||
* FileClose bug fixed
|
* FileClose bug fixed
|
||||||
|
|
||||||
Revision 1.21 2003/01/04 16:25:08 hajny
|
Revision 1.21 2003/01/04 16:25:08 hajny
|
||||||
|
Loading…
Reference in New Issue
Block a user