-all: lcoretest
-
-lcoretest: *.pas *.inc lcoretest.dpr
- fpc -Sd -dipv6 lcoretest.dpr
-
-clean:
- -rm *.o
- -rm *.ppu
- -rm *.exe
- -rm *.dcu
- -rm lcoretest
-
-date := $(shell date +%Y%m%d)
-
-zip:
- mkdir -p lcorewin32_$(date)
- cp -a *.pas lcorewin32_$(date)
- cp -a *.inc lcorewin32_$(date)
- cp -a *.dpr lcorewin32_$(date)
- cp -a Makefile lcorewin32_$(date)
- -rm ../lcorewin32_$(date).zip
- zip -r ../lcorewin32_$(date).zip lcorewin32_$(date)
+all: lcoretest\r
+\r
+lcoretest: *.pas *.inc lcoretest.dpr\r
+ fpc -Sd -dipv6 lcoretest.dpr\r
+ \r
+clean:\r
+ -rm *.o\r
+ -rm *.ppu\r
+ -rm *.exe\r
+ -rm *.dcu\r
+ -rm lcoretest\r
+\r
+date := $(shell date +%Y%m%d)\r
+\r
+zip:\r
+ mkdir -p lcorewin32_$(date)\r
+ cp -a *.pas lcorewin32_$(date)\r
+ cp -a *.inc lcorewin32_$(date)\r
+ cp -a *.dpr lcorewin32_$(date)\r
+ cp -a Makefile lcorewin32_$(date)\r
+ -rm ../lcorewin32_$(date).zip\r
+ zip -r ../lcorewin32_$(date).zip lcorewin32_$(date)\r
rm -rf lcorewin32_$(date)
\ No newline at end of file
Procedure FD_Zero(var fds:fdSet);\r
Procedure FD_Set(fd:longint;var fds:fdSet);\r
Function FD_IsSet(fd:longint;var fds:fdSet):boolean;\r
-
-{$ifdef fpc}
- {$ifndef ver1_0}
- {$define useinline}
- {$endif}
+\r
+{$ifdef fpc}\r
+ {$ifndef ver1_0}\r
+ {$define useinline}\r
+ {$endif}\r
{$endif}\r
\r
implementation \r
-{ Copyright (C) 2005 Bas Steendijk and Peter Green
- For conditions of distribution and use, see copyright notice in zlib_license.txt
- which is included in the package
- ----------------------------------------------------------------------------- }
+{ Copyright (C) 2005 Bas Steendijk and Peter Green\r
+ For conditions of distribution and use, see copyright notice in zlib_license.txt\r
+ which is included in the package\r
+ ----------------------------------------------------------------------------- }\r
\r
unit lcoregtklaz;\r
{$mode delphi}\r
For conditions of distribution and use, see copyright notice in zlib_license.txt\r
which is included in the package\r
----------------------------------------------------------------------------- }\r
-
-{$ifdef fpc}
- {$ifndef ver1_0}
- {$define useinline}
- {$endif}
+\r
+{$ifdef fpc}\r
+ {$ifndef ver1_0}\r
+ {$define useinline}\r
+ {$endif}\r
{$endif}\r
\r
unit lcoreselect;\r
\r
var\r
fdsrmaster , fdswmaster : fdset ;\r
-
+\r
function getfdsrmaster : fdset; {$ifdef fpc}inline;{$endif}\r
begin\r
result := fdsrmaster;\r
begin\r
result := fdswmaster;\r
end;\r
-
-
+\r
+\r
Function doSelect(timeOut:PTimeVal):longint;//inline;\r
var\r
localtimeval : ttimeval;\r
\r
\r
implementation\r
-uses
-{$ifdef ver1_0}
- linux;
-{$else}
- baseunix,unix,unixutil;
-{$endif}
-{$i unixstuff.inc}
-
+uses\r
+{$ifdef ver1_0}\r
+ linux;\r
+{$else}\r
+ baseunix,unix,unixutil; \r
+{$endif}\r
+{$i unixstuff.inc}\r
+\r
constructor tlloopback.create(aowner:tcomponent);\r
begin\r
inherited create(aowner);\r
firstsignal : tlsignal;\r
blockset : sigset;\r
signalloopback : tlloopback ;\r
-
+ \r
implementation\r
{$include unixstuff.inc}\r
\r
initialization\r
fillchar(blockset,sizeof(blockset),0);\r
blockset[0] := $FFFFFFFF - (1 shl sigstop) - (1 shl sigkill) - (1 shl sigsegv);\r
- {$ifdef ver1_0}
- saction.sa_mask := blockset[0];
- {$else}
+ {$ifdef ver1_0}\r
+ saction.sa_mask := blockset[0];\r
+ {$else}\r
saction.sa_mask := blockset;\r
{$endif}\r
end.\r
result := winsock.recv(fd,buf,size,0);\r
end;\r
{$endif}\r
-
+\r
end.\r
\r
-{ Copyright (C) 2005 Bas Steendijk and Peter Green
- For conditions of distribution and use, see copyright notice in zlib_license.txt
- which is included in the package
+{ Copyright (C) 2005 Bas Steendijk and Peter Green\r
+ For conditions of distribution and use, see copyright notice in zlib_license.txt\r
+ which is included in the package\r
----------------------------------------------------------------------------- }\r
type\r
{delphi 3 and before do not have a 32 bits unsigned integer type,\r
{$define dup2 := fpdup2}\r
{$ifndef ver1_9_2}\r
{$define flock := fpflock}\r
- {$ifndef ver1_9_4}
- procedure Execl(Todo:string);inline;
- var
- p : ppchar;
- begin
- p := unixutil.StringToPPChar(Todo,1);
- if (p=nil) or (p^=nil) then exit;
- fpexecv(p^,p);
- end;
- {$endif}
+ {$ifndef ver1_9_4}\r
+ procedure Execl(Todo:string);inline;\r
+ var\r
+ p : ppchar;\r
+ begin\r
+ p := unixutil.StringToPPChar(Todo,1);\r
+ if (p=nil) or (p^=nil) then exit;\r
+ fpexecv(p^,p);\r
+ end;\r
+ {$endif}\r
{$endif}\r
procedure gettimeofday(var tv:ttimeval);inline;\r
begin\r
end;\r
\r
tltimer=class(tlcomponent)\r
+ private\r
+ fenabled : boolean;\r
+ procedure setenabled(newvalue : boolean);\r
public\r
ontimer:tnotifyevent;\r
initialevent:boolean;\r
prevtimer:tltimer;\r
nexttimer:tltimer;\r
interval:integer; {miliseconds, default 1000}\r
- enabled:boolean;\r
nextts:integer;\r
+ property enabled:boolean read fenabled write setenabled;\r
constructor create(aowner:tcomponent);override;\r
destructor destroy;override;\r
end;\r
\r
{------------------------------------------------------------------------------}\r
\r
+procedure tltimer.setenabled(newvalue : boolean);\r
+begin\r
+ fenabled := newvalue;\r
+ nextts := 0;\r
+ initialdone := false;\r
+end;\r
+\r
constructor tltimer.create;\r
begin\r
inherited create(AOwner);\r
-Copyright (c) 2005 Bas Steendijk and Peter Green
-
-This software is provided 'as-is', without any express or implied warranty.
-In no event will the authors be held liable for any damages arising from the
-use of this software.
-
-Permission is granted to anyone to use this software for any purpose, including
-commercial applications, and to alter it and redistribute it freely, subject to
-the following restrictions:
-
- 1. The origin of this software must not be misrepresented; you must not
- claim that you wrote the original software. If you use this software in a
- product, an acknowledgment in the product documentation would be
- appreciated but is not required.
-
- 2. Altered source versions must be plainly marked as such, and must not be
- misrepresented as being the original software.
-
- 3. This notice may not be removed or altered from any source distribution.
+Copyright (c) 2005 Bas Steendijk and Peter Green\r
+\r
+This software is provided 'as-is', without any express or implied warranty.\r
+In no event will the authors be held liable for any damages arising from the\r
+use of this software.\r
+\r
+Permission is granted to anyone to use this software for any purpose, including\r
+commercial applications, and to alter it and redistribute it freely, subject to\r
+the following restrictions:\r
+\r
+ 1. The origin of this software must not be misrepresented; you must not\r
+ claim that you wrote the original software. If you use this software in a\r
+ product, an acknowledgment in the product documentation would be\r
+ appreciated but is not required.\r
+\r
+ 2. Altered source versions must be plainly marked as such, and must not be\r
+ misrepresented as being the original software.\r
+\r
+ 3. This notice may not be removed or altered from any source distribution.\r