* Fix demos so they work on 64-bit as well (there is no libc unit for 64 bit)

git-svn-id: trunk@30288 -
This commit is contained in:
michael 2015-03-23 14:49:37 +00:00
parent 85cb180d80
commit 6d989c57e2
6 changed files with 38 additions and 9 deletions

View File

@ -76,8 +76,8 @@ begin
wins[i] := newwin(NLINES, NCOLS, y, x);
FmtStr(lab, 'Window Number %d', [i + 1]);
win_show(wins[i], lab, i + 1);
y += 3;
x += 7;
Inc(y,3);
Inc(x,7);
end
end;

View File

@ -3,18 +3,26 @@ program form_test_2;
{$MODE OBJFPC}
uses
ncurses, form, libc;
ncurses, form;
{$linklib c}
procedure setlocale(cat : integer; p : pchar); cdecl; external 'c';
const
LC_ALL = 6;
var
my_bg: Smallint = COLOR_BLACK;
field: array[0..5] of PFIELD;
my_form: PFORM;
i, ch: Longint;
begin
try
try
setlocale(LC_ALL, ''); { Tested with Russian UTF-8 locale }
(* Initialize curses *)

View File

@ -20,7 +20,7 @@ var
begin
FmtStr(tstr, fmt, args);
getmaxyx(win, my, mx);
mx -= startx;
dec(mx,startx);
if (width > length(tstr)) OR (width < 2) then
width := length(tstr);

View File

@ -6,8 +6,14 @@ program form_test_3;
{$MODE OBJFPC}
uses
ncurses, form, libc;
ncurses, form;
{$linklib c}
procedure setlocale(cat : integer; p : pchar); cdecl; external 'c';
const
LC_ALL = 6;
function st_middle(scrlen, itemlen: Smallint): Smallint; inline;

View File

@ -2,7 +2,14 @@ program tclock;
{$MODE OBJFPC}
uses
libc, ncurses, sysutils;
ncurses, sysutils;
{$linklib c}
procedure setlocale(cat : integer; p : pchar); cdecl; external 'c';
const
LC_ALL = 6;
const
ASPECT = 2.2;

View File

@ -8,7 +8,15 @@ program nlshello;
{$mode objfpc}
uses
gettext, libc, ncurses;
gettext, ncurses;
{$linklib c}
procedure setlocale(cat : integer; p : pchar); cdecl; external 'c';
const
LC_ALL = 6;
resourcestring
hello_world = 'Hello world!';