----------------------------------------------------------------------------- }\r
unit binipstuff;\r
\r
+{$ifdef fpc}\r
+{$mode delphi}\r
+{$endif}\r
+\r
interface\r
\r
{$include lcoreconfig.inc}\r
\r
-{$ifndef win32}\r
-uses sockets;\r
+uses\r
+{$ifndef mswindows}\r
+ sockets,\r
{$endif}\r
+ pgtypes;\r
\r
-{$ifdef fpc}\r
- {$mode delphi}\r
-{$endif}\r
-{$ifdef cpu386}{$define i386}{$endif}\r
-{$ifdef i386}{$define ENDIAN_LITTLE}{$endif}\r
+\r
+{$include pgtypes.inc}\r
\r
{$include uint32.inc}\r
\r
const\r
hexchars:array[0..15] of ansichar='0123456789abcdef';\r
- {$ifdef win32}\r
+ {$ifdef mswindows}\r
AF_INET=2;\r
AF_INET6=23;\r
{$else}\r
type\r
{$ifdef ipv6}\r
\r
- {$ifdef win32}\r
+ {$ifdef mswindows}\r
{$define want_Tin6_addr}\r
{$endif}\r
{$ifdef ver1_0}\r
{$endif}\r
end;\r
\r
- {$ifdef win32}\r
+ {$ifdef mswindows}\r
TInetSockAddr = packed Record\r
family:Word;\r
port :Word;\r
end;\r
end;\r
end;\r
+\r
+ {run length atleast 2 0 words}\r
+ if (runlength = 1) then begin\r
+ runlength := 0;\r
+ runbegin := 0;\r
+ end;\r
+\r
result := '';\r
for a := 0 to runbegin-1 do begin\r
if (a <> 0) then result := result + ':';\r