mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 09:19:23 +02:00
--- Merging r31009 into '.':
U packages/rtl-extra/src/aros/sockets.pp --- Recording mergeinfo for merge of r31009 into '.': U . --- Merging r31011 into '.': U packages/morphunits/src/mui.pas --- Recording mergeinfo for merge of r31011 into '.': G . --- Merging r31012 into '.': U packages/amunits/src/otherlibs/mui.pas G packages/morphunits/src/mui.pas U packages/arosunits/src/mui.pas --- Recording mergeinfo for merge of r31012 into '.': G . --- Merging r31014 into '.': U packages/amunits/examples/bezier.pas U packages/amunits/examples/bezier2.pas --- Recording mergeinfo for merge of r31014 into '.': G . # revisions: 31009,31011,31012,31014 git-svn-id: branches/fixes_3_0@31100 -
This commit is contained in:
parent
9b35c793aa
commit
aa99dd7192
@ -35,7 +35,7 @@ Program Bezier;
|
|||||||
nils.sjoholm@mailbox.swipnet.se
|
nils.sjoholm@mailbox.swipnet.se
|
||||||
}
|
}
|
||||||
|
|
||||||
uses exec, intuition, agraphics, utility,pastoc, systemvartags;
|
uses exec, intuition, agraphics, utility, systemvartags;
|
||||||
|
|
||||||
type
|
type
|
||||||
PointRec = packed Record
|
PointRec = packed Record
|
||||||
@ -249,9 +249,9 @@ begin
|
|||||||
|
|
||||||
rp := w^.RPort;
|
rp := w^.RPort;
|
||||||
GfxMove(rp, 252, 30);
|
GfxMove(rp, 252, 30);
|
||||||
GfxText(rp, pas2c('Enter points by pressing the left mouse button'), 46);
|
GfxText(rp, 'Enter points by pressing the left mouse button', 46);
|
||||||
GfxMove(rp, 252, 40);
|
GfxMove(rp, 252, 40);
|
||||||
GfxText(rp, pas2c('Double click on the last point to begin drawing'), 47);
|
GfxText(rp, 'Double click on the last point to begin drawing', 47);
|
||||||
repeat
|
repeat
|
||||||
GetPoints; { Both these routines will quit if }
|
GetPoints; { Both these routines will quit if }
|
||||||
DrawBezier; { the window is closed. }
|
DrawBezier; { the window is closed. }
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
Program Bezier;
|
Program Bezier2;
|
||||||
|
|
||||||
|
|
||||||
{ This program draws Bezier curves in the slow, simple, recursive
|
{ This program draws Bezier curves in the slow, simple, recursive
|
||||||
@ -26,7 +26,7 @@ Program Bezier;
|
|||||||
nils.sjoholm@mailbox.swipnet.se
|
nils.sjoholm@mailbox.swipnet.se
|
||||||
}
|
}
|
||||||
|
|
||||||
uses exec, intuition, agraphics, utility, pastoc, systemvartags;
|
uses exec, intuition, agraphics, utility, systemvartags;
|
||||||
|
|
||||||
type
|
type
|
||||||
PointRec = Record
|
PointRec = Record
|
||||||
|
@ -1520,12 +1520,12 @@ uses exec, intuition,utility,agraphics,iffparse;
|
|||||||
{ MUI_MinMax structure holds information about minimum, maximum
|
{ MUI_MinMax structure holds information about minimum, maximum
|
||||||
and default dimensions of an object. }
|
and default dimensions of an object. }
|
||||||
tMUI_MinMax = record
|
tMUI_MinMax = record
|
||||||
MinWidth : WORD;
|
MinWidth : SmallInt;
|
||||||
MinHeight : WORD;
|
MinHeight : SmallInt;
|
||||||
MaxWidth : WORD;
|
MaxWidth : SmallInt;
|
||||||
MaxHeight : WORD;
|
MaxHeight : SmallInt;
|
||||||
DefWidth : WORD;
|
DefWidth : SmallInt;
|
||||||
DefHeight : WORD;
|
DefHeight : SmallInt;
|
||||||
end;
|
end;
|
||||||
pMUI_MinMax = ^tMUI_MinMax;
|
pMUI_MinMax = ^tMUI_MinMax;
|
||||||
|
|
||||||
|
@ -1508,12 +1508,12 @@ uses
|
|||||||
{ MUI_MinMax structure holds information about minimum, maximum
|
{ MUI_MinMax structure holds information about minimum, maximum
|
||||||
and default dimensions of an object. }
|
and default dimensions of an object. }
|
||||||
tMUI_MinMax = record
|
tMUI_MinMax = record
|
||||||
MinWidth : WORD;
|
MinWidth : SmallInt;
|
||||||
MinHeight : WORD;
|
MinHeight : SmallInt;
|
||||||
MaxWidth : WORD;
|
MaxWidth : SmallInt;
|
||||||
MaxHeight : WORD;
|
MaxHeight : SmallInt;
|
||||||
DefWidth : WORD;
|
DefWidth : SmallInt;
|
||||||
DefHeight : WORD;
|
DefHeight : SmallInt;
|
||||||
end;
|
end;
|
||||||
pMUI_MinMax = ^tMUI_MinMax;
|
pMUI_MinMax = ^tMUI_MinMax;
|
||||||
|
|
||||||
|
@ -1398,12 +1398,12 @@ type
|
|||||||
{ MUI_MinMax structure holds information about minimum, maximum
|
{ MUI_MinMax structure holds information about minimum, maximum
|
||||||
and default dimensions of an object. }
|
and default dimensions of an object. }
|
||||||
tMUI_MinMax = record
|
tMUI_MinMax = record
|
||||||
MinWidth : shortint;
|
MinWidth : SmallInt;
|
||||||
MinHeight : shortint;
|
MinHeight : SmallInt;
|
||||||
MaxWidth : shortint;
|
MaxWidth : SmallInt;
|
||||||
MaxHeight : shortint;
|
MaxHeight : SmallInt;
|
||||||
DefWidth : shortint;
|
DefWidth : SmallInt;
|
||||||
DefHeight : shortint;
|
DefHeight : SmallInt;
|
||||||
end;
|
end;
|
||||||
pMUI_MinMax = ^tMUI_MinMax;
|
pMUI_MinMax = ^tMUI_MinMax;
|
||||||
|
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
**********************************************************************}
|
**********************************************************************}
|
||||||
{$PACKRECORDS 2}
|
{$PACKRECORDS 2}
|
||||||
|
{.$DEFINE SOCKETS_DEBUG}
|
||||||
unit Sockets;
|
unit Sockets;
|
||||||
Interface
|
Interface
|
||||||
|
|
||||||
@ -258,14 +259,37 @@ end;
|
|||||||
{$i sockovl.inc}
|
{$i sockovl.inc}
|
||||||
{$i sockets.inc}
|
{$i sockets.inc}
|
||||||
|
|
||||||
// FIXME: this doesn't make any sense here, because SocketBase should be task-specific
|
const
|
||||||
// but FPC doesn't support that yet (TODO)
|
BSDSOCKET_LIBRARY_VER = 4;
|
||||||
{$WARNING FIX ME, TODO}
|
|
||||||
|
|
||||||
|
procedure BSDSocketOpen;
|
||||||
|
begin
|
||||||
|
{$IFDEF SOCKETS_DEBUG}
|
||||||
|
SysDebugLn('FPC Sockets: Opening bsdsocket.library...');
|
||||||
|
{$ENDIF}
|
||||||
|
SocketBase:=OpenLibrary('bsdsocket.library', BSDSOCKET_LIBRARY_VER);
|
||||||
|
{$IFDEF SOCKETS_DEBUG}
|
||||||
|
if SocketBase = nil then
|
||||||
|
SysDebugLn('FPC Sockets: FAILED to open bsdsocket.library.')
|
||||||
|
else
|
||||||
|
SysDebugLn('FPC Sockets: bsdsocket.library opened successfully.');
|
||||||
|
{$ENDIF}
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure BSDSocketClose;
|
||||||
|
begin
|
||||||
|
if (SocketBase<>NIL) then CloseLibrary(SocketBase);
|
||||||
|
SocketBase:=NIL;
|
||||||
|
{$IFDEF SOCKETS_DEBUG}
|
||||||
|
SysDebugLn('FPC Sockets: bsdsocket.library closed.');
|
||||||
|
{$ENDIF}
|
||||||
|
end;
|
||||||
|
|
||||||
initialization
|
initialization
|
||||||
SocketBase := OpenLibrary('bsdsocket.library',0);
|
AddThreadInitProc(@BSDSocketOpen);
|
||||||
|
AddThreadExitProc(@BSDSocketClose);
|
||||||
|
BSDSocketOpen;
|
||||||
|
|
||||||
finalization
|
finalization
|
||||||
if SocketBase <> nil then
|
BSDSocketClose;
|
||||||
CloseLibrary(SocketBase);
|
|
||||||
end.
|
end.
|
||||||
|
Loading…
Reference in New Issue
Block a user