git-svn-id: trunk@30288 -
@@ -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;
@@ -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 *)
@@ -20,7 +20,7 @@ var
FmtStr(tstr, fmt, args);
getmaxyx(win, my, mx);
- mx -= startx;
+ dec(mx,startx);
if (width > length(tstr)) OR (width < 2) then
width := length(tstr);
@@ -6,8 +6,14 @@ program form_test_3;
function st_middle(scrlen, itemlen: Smallint): Smallint; inline;
@@ -2,7 +2,14 @@ program tclock;
- libc, ncurses, sysutils;
+ ncurses, sysutils;
const
ASPECT = 2.2;
@@ -8,7 +8,15 @@ program nlshello;
{$mode objfpc}
- gettext, libc, ncurses;
+ gettext, ncurses;
resourcestring
hello_world = 'Hello world!';