mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-02 11:09:33 +01:00
+ system.cmdline variable for go32v2 and win32 added
This commit is contained in:
parent
d10d8cb5fd
commit
67c66987e5
@ -313,6 +313,12 @@ sysseg_move(psp, 128, get_ds, longint(@doscmd), 128);
|
||||
{$IfDef SYSTEMDEBUG}
|
||||
Writeln(stderr,'Dos command line is #',doscmd,'# size = ',length(doscmd));
|
||||
{$EndIf SYSTEMDEBUG}
|
||||
|
||||
// setup cmdline variable
|
||||
getmem(cmdline,length(doscmd)+1);
|
||||
move(doscmd[1],cmdline^,length(doscmd));
|
||||
cmdline[length(doscmd)]:=#0;
|
||||
|
||||
j := 1;
|
||||
quote := #0;
|
||||
for i:=1 to length(doscmd) do
|
||||
@ -1222,7 +1228,10 @@ Begin
|
||||
End.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.6 1999-03-01 15:40:52 peter
|
||||
Revision 1.7 1999-03-10 22:15:28 florian
|
||||
+ system.cmdline variable for go32v2 and win32 added
|
||||
|
||||
Revision 1.6 1999/03/01 15:40:52 peter
|
||||
* use external names
|
||||
* removed all direct assembler modes
|
||||
|
||||
|
||||
@ -106,6 +106,7 @@ const
|
||||
fmInOut = $D7B3;
|
||||
fmAppend = $D7B4;
|
||||
Filemode : byte = 2;
|
||||
CmdLine : PChar = nil;
|
||||
|
||||
Type
|
||||
TErrorProc = Procedure (ErrNo : Longint; Address : Pointer);
|
||||
@ -435,7 +436,10 @@ const
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.51 1999-03-03 15:23:58 michael
|
||||
Revision 1.52 1999-03-10 22:15:30 florian
|
||||
+ system.cmdline variable for go32v2 and win32 added
|
||||
|
||||
Revision 1.51 1999/03/03 15:23:58 michael
|
||||
+ Added setstring for Delphi compatibility
|
||||
|
||||
Revision 1.50 1999/02/01 00:05:16 florian
|
||||
|
||||
@ -640,10 +640,10 @@ procedure setup_arguments;
|
||||
var
|
||||
arglen,
|
||||
count : longint;
|
||||
argstart,
|
||||
cmdline : pchar;
|
||||
argstart,scmdline : pchar;
|
||||
quote : set of char;
|
||||
argsbuf : array[0..127] of pchar;
|
||||
|
||||
begin
|
||||
{ create commandline, it starts with the executed filename which is argv[0] }
|
||||
cmdline:=GetCommandLine;
|
||||
@ -677,6 +677,8 @@ begin
|
||||
{ skip quote }
|
||||
if cmdline^ in quote then
|
||||
inc(longint(cmdline));
|
||||
if count=0 then
|
||||
scmdline:=cmdline-1;
|
||||
inc(count);
|
||||
until false;
|
||||
{ create argc }
|
||||
@ -687,6 +689,8 @@ begin
|
||||
{ create the argv }
|
||||
getmem(argv,count shl 2);
|
||||
move(argsbuf,argv^,count shl 2);
|
||||
// finally setup the abused cmdline variable
|
||||
cmdline:=scmdline;
|
||||
end;
|
||||
|
||||
|
||||
@ -973,7 +977,10 @@ end.
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.33 1999-01-18 10:05:57 pierre
|
||||
Revision 1.34 1999-03-10 22:15:31 florian
|
||||
+ system.cmdline variable for go32v2 and win32 added
|
||||
|
||||
Revision 1.33 1999/01/18 10:05:57 pierre
|
||||
+ system_exit procedure added
|
||||
|
||||
Revision 1.32 1998/12/28 23:30:11 peter
|
||||
|
||||
Loading…
Reference in New Issue
Block a user