* few 64 Bit related fixes, the type change of chtype resolves #27024

git-svn-id: trunk@30280 -
This commit is contained in:
florian 2015-03-22 20:15:59 +00:00
parent 076e43f799
commit 2fdc4f06de

View File

@ -35,6 +35,9 @@
unit ncurses;
interface
uses
unixtype;
{$PACKRECORDS C}
{$LINKLIB ncursesw}
{$LINKLIB c} // should be uses initc ?
@ -52,10 +55,6 @@ type
Bool = Byte;
{$ENDIF USE_FPC_BYTEBOOL}
type
wchar_t = Widechar;
pwchar_t = ^wchar_t;
const
{$IFDEF USE_FPC_BYTEBOOL}
NC_FPC_TRUE = true;
@ -74,18 +73,18 @@ const
type
pchtype = ^chtype;
chtype = Longint; {longword}
chtype = culong;
pmmask_t = ^mmask_t;
mmask_t = Longint; {longword}
mmask_t = culong;
{ colors }
var
{$IFNDEF darwin}
COLORS : Longint cvar; external;
COLOR_PAIRS : Longint cvar; external;
COLORS : cint cvar; external;
COLOR_PAIRS : cint cvar; external;
{$ELSE darwin}
COLORS : Longint external libncurses name 'COLORS';
COLOR_PAIRS : Longint external libncurses name 'COLOR_PAIRS';
COLORS : cint external libncurses name 'COLORS';
COLOR_PAIRS : cint external libncurses name 'COLOR_PAIRS';
{$ENDIF darwin}
const
@ -205,7 +204,7 @@ type
attr : attr_t;
chars : array[0..CCHARW_MAX - 1] of wchar_t;
{$IFDEF NCURSES_EXT_COLORS}
ext_color : Longint; { color pair, must be more than 16-bits }
ext_color : cint; { color pair, must be more than 16-bits }
{$ENDIF NCURSES_EXT_COLORS}
end;
@ -237,14 +236,14 @@ type
_immed : Bool; { window in immed mode? (not yet used) }
_sync : Bool; { window in sync mode? }
_use_keypad : Bool; { process function keys into KEY_ symbols? }
_delay : Longint; { 0 = nodelay, <0 = blocking, >0 = delay }
_delay : cint; { 0 = nodelay, <0 = blocking, >0 = delay }
_line : ^ldat; { the actual line data }
{ global screen state }
_regtop : Smallint; { top line of scrolling region }
_regbottom : Smallint; { bottom line of scrolling region }
{ these are used only if this is a sub-window }
_parx : Longint; { x coordinate of this window in parent }
_pary : Longint; { y coordinate of this window in parent }
_parx : cint; { x coordinate of this window in parent }
_pary : cint; { y coordinate of this window in parent }
_parent : PWINDOW; { pointer to parent if a sub-window }
{ these are used only if this is a pad }
_pad : record
@ -258,7 +257,7 @@ type
_yoffset : Smallint; { real begy is _begy + _yoffset }
_bkgrnd : cchar_t; { current background char/attribute pair }
{$IFDEF NCURSES_EXT_COLORS}
_color : Longint; { current color-pair for non-space character }
_color : cint; { current color-pair for non-space character }
{$ENDIF NCURSES_EXT_COLORS}
end;
@ -558,7 +557,7 @@ const
WA_TOP = A_TOP;
WA_VERTICAL = A_VERTICAL;
function COLOR_PAIR(n: longint): longint; inline;
function COLOR_PAIR(n: cint): cint; inline;
function PAIR_NUMBER(attr: attr_t): longint; inline;
function color_set(color_pair_number: Smallint; opts: Pointer): longint; inline;