Thomas Dickey | 5 Feb 03:06
Picon

ncurses-5.9-20120204.patch.gz

 ncurses 5.9 - patch 20120204 - Thomas E. Dickey

 ------------------------------------------------------------------------------

 Ncurses 5.9 is at
 	ftp.gnu.org:/pub/gnu

 Patches for ncurses 5.9 are in the subdirectory
 	ftp://invisible-island.net/ncurses/5.9

 ------------------------------------------------------------------------------
 ftp://invisible-island.net/ncurses/5.9/ncurses-5.9-20120204.patch.gz
 patch by Thomas E. Dickey <dickey <at> invisible-island.net>
 created  Sun Feb  5 01:59:13 UTC 2012
 ------------------------------------------------------------------------------
 NEWS              |    8 ++-
 dist.mk           |    4 -
 man/tic.1m        |   38 ++++++++++------
 progs/tic.c       |  119 ++++++++++++++++++++++++++++++++++++++++++++--------
 test/movewindow.c |    5 --
 5 files changed, 136 insertions(+), 38 deletions(-)
 ------------------------------------------------------------------------------

20120204
	+ improved tic -D option, avoid making target directory and provide
	  better diagnostics.

--

-- 
Thomas E. Dickey <dickey <at> invisible-island.net>
http://invisible-island.net
(Continue reading)

Olivier TARTROU | 4 Feb 01:58
Picon
Gravatar

Runtime link problem

Hello

I'm new to ncurses. Read doc and FAQ but not found the solution to my problem.

I'm creating a .so library: ok.
Writing a test application that links to my library and calls its functions: ok.
But to perform deeper tests, in my case, a human interaction would be better (using serial port IO pins and minimal hw instrumentation).
So I found ncurses that would be great for user controlled tests, in a terminal window.

I learned about basic functions such as initscr(), keypad() and printw().

When I compile and run, it works fine for these functions.

But mycode crashes at run time when I call a function of my libray, without any warning/error at link time and I can't figure why.
My library is correctly (I think so) linked, but when behaviour changes when I link with ncurses.

Error message:
Command: ./shell: symbol lookup error: ./shell: undefined symbol: SERIAL_GetDtr

This function is in my lib, that I created and compiled. And it works successfully when not using ncurses.

Test program Makefile:
gcc -Wall xx1.o xx2.o -o shell -L../../module_src/src/ -l first_lib -l pthread -l ncurses

(this links with no warning, and runs if I remove -l ncurses and ncurses calls).

Compiled on Ubuntu 10.04 with 2.6.32-38-generic kernel (x86).

Function prototype:
bool SERIAL_GetDtr(int fd);
bool is typedef enum {false = FALSE, true = TRUE} bool;

I seems that there is a link problem, visible only at runtime, as soon as I link with ncursed. But can't figure why. Not absolutely sure it's ncurses related, but ncurses link triggers it.

Have any idea?

Thanks for you help!

Maya

_______________________________________________
Bug-ncurses mailing list
Bug-ncurses <at> gnu.org
https://lists.gnu.org/mailman/listinfo/bug-ncurses
Thomas Dickey | 29 Jan 03:11
Picon

ncurses-5.9-20120128.patch.gz

 ncurses 5.9 - patch 20120128 - Thomas E. Dickey

 ------------------------------------------------------------------------------

 Ncurses 5.9 is at
 	ftp.gnu.org:/pub/gnu

 Patches for ncurses 5.9 are in the subdirectory
 	ftp://invisible-island.net/ncurses/5.9

 ------------------------------------------------------------------------------
 ftp://invisible-island.net/ncurses/5.9/ncurses-5.9-20120128.patch.gz
 patch by Thomas E. Dickey <dickey <at> invisible-island.net>
 created  Sun Jan 29 02:06:41 UTC 2012
 ------------------------------------------------------------------------------
 NEWS                       |   18 ++++++++++-
 dist.mk                    |    4 +-
 misc/Makefile.in           |    6 +--
 misc/gen_edit.sh           |    8 ++--
 misc/terminfo.src          |   69 +++++++++++++++++++++++++++++++------------
 ncurses/tinfo/comp_parse.c |   14 ++++++--
 6 files changed, 87 insertions(+), 32 deletions(-)
 ------------------------------------------------------------------------------

20120128
	+ add mach-gnu (Debian #614316, patch by Samuel Thibault)
	+ add mach-gnu-color, tweaks to mach-gnu terminfo -TD
	+ make sgr for sun-color agree with smso -TD
	+ make sgr for prism9 agree with other caps -TD
	+ make sgr for icl6404 agree with other caps -TD
	+ make sgr for ofcons agree with other caps -TD
	+ make sgr for att5410v1, att4415, att620 agree with other caps -TD
	+ make sgr for aaa-unk, aaa-rv agree with other caps -TD
	+ make sgr for avt-ns agree with other caps -TD
	+ amend fix intended to separate fixups for acsc to allow "tic -cv" to
	  give verbose warnings (cf:  20110730). 
	+ modify misc/gen-edit.sh to make the location of the tabset directory
	  consistent with misc/Makefile.in, i.., using ${datadir}/tabset
	  (Debian #653435, patch by Sven Joachim).

--

-- 
Thomas E. Dickey <dickey <at> invisible-island.net>
http://invisible-island.net
ftp://invisible-island.net
_______________________________________________
Bug-ncurses mailing list
Bug-ncurses <at> gnu.org
https://lists.gnu.org/mailman/listinfo/bug-ncurses
Andrius Bentkus | 26 Jan 01:53
Picon
Gravatar

keypad functionality working?

Hello,

I'm trying to get the keypad function working, but I just simply fail to do so.
I have tried everything I can imagine to make it work.
What I basically want is to press alt and a key at once, make getch return exactly one integer and be able to determine what I just have pressed, because for now I'm getting to values back with getch which are not easy to parse.


This is what I have been trying to do.
I have spent 2 hours trying to do it what I think it should do so I am asking for help because I am obviously missing something.
Maybe some compilation flag?
Maybe urxvt does not support keypad?

I hope you can help me soon.
_______________________________________________
Bug-ncurses mailing list
Bug-ncurses <at> gnu.org
https://lists.gnu.org/mailman/listinfo/bug-ncurses
Picon
Gravatar

mouse wheel with NCURSES_MOUSE_VERSION=1

Hello!

I have noticed that mouse wheel-down event with old mouse version (1) is
reported as these masks:

   0200:	BUTTON2_PRESSED
   01000000000:	REPORT_MOUSE_POSITION

Besides, mouse wheel-up event is only reported as mask 02000000
(BUTTON4_PRESSED) just one time, even if I scroll the wheel continuously.

ncurses version from fedora15, ncurses-5.8-2.20110319.fc15.x86_64

Please fix it. Wheel-down events with NCURSES_MOUSE_VERSION=1 can be
reported as BUTTON4 with modifiers like BUTTON_SHIFT.

--

-- 
   Alexander.
Thomas Dickey | 22 Jan 02:59
Picon

ncurses-5.9-20120121.patch.gz

 ncurses 5.9 - patch 20120121 - Thomas E. Dickey

 ------------------------------------------------------------------------------

 Ncurses 5.9 is at
 	ftp.gnu.org:/pub/gnu

 Patches for ncurses 5.9 are in the subdirectory
 	ftp://invisible-island.net/ncurses/5.9

 ------------------------------------------------------------------------------
 ftp://invisible-island.net/ncurses/5.9/ncurses-5.9-20120121.patch.gz
 patch by Thomas E. Dickey <dickey <at> invisible-island.net>
 created  Sun Jan 22 01:23:31 UTC 2012
 ------------------------------------------------------------------------------
 Ada95/aclocal.m4             |   36 
 Ada95/configure              | 2041 +++++++++++-----------
 Ada95/configure.in           |   11 
 INSTALL                      |   16 
 Makefile.in                  |    4 
 NEWS                         |   14 
 README.MinGW                 |    4 
 aclocal.m4                   |   40 
 configure                    | 3678 ++++++++++++++++++++---------------------
 configure.in                 |   11 
 dist.mk                      |    6 
 ncurses/base/lib_getch.c     |   13 
 ncurses/base/lib_mouse.c     |   19 
 ncurses/base/lib_newterm.c   |    7 
 ncurses/curses.priv.h        |   17 
 ncurses/tinfo/db_iterator.c  |   16 
 ncurses/tinfo/lib_raw.c      |   31 
 ncurses/tinfo/lib_ttyflags.c |   10 
 ncurses/tty/lib_twait.c      |   43 
 progs/tset.c                 |    4 
 test/README                  |    4 
 test/configure.in            |    4 
 test/rain.c                  |    4 
 23 files changed, 3121 insertions(+), 2912 deletions(-)
 ------------------------------------------------------------------------------

20120121
	+ add --with-lib-prefix option to allow configuring for old/new flavors
	  of OS/2 EMX.
	+ modify check for gnat version to allow for year, as used in FreeBSD
	  port.
	+ modify check_existence() in db_iterator.c to simply check if the
	  path is a directory or file, according to the need.  Checking for
	  directory size also gives no usable result with OS/2 (cf: 20120107).
	+ support OS/2 kLIBC (patch by KO Myung-Han).

--

-- 
Thomas E. Dickey <dickey <at> invisible-island.net>
http://invisible-island.net
ftp://invisible-island.net
_______________________________________________
Bug-ncurses mailing list
Bug-ncurses <at> gnu.org
https://lists.gnu.org/mailman/listinfo/bug-ncurses
KO Myung-Hun | 18 Jan 15:45
Picon

[PATCH] OS/2 kLIBC supports for ncurses v5.9

Hi/2.

This is a patch to support OS/2 kLIBC for ncurses v5.9.

-- 
KO Myung-Hun

Using Mozilla SeaMonkey 2.0.14
Under OS/2 Warp 4 for Korean with FixPak #15
On Intel Core2Duo T5500 1.66GHz with 2GB RAM

Korean OS/2 User Community : http://www.ecomstation.co.kr

diff -uNr  ncurses/curses.priv.h.org ncurses/curses.priv.h
--- ncurses/curses.priv.h.org	2011-01-23 06:10:18.000000000 +0900
+++ ncurses/curses.priv.h	2012-01-08 16:10:32.000000000 +0900
@@ -135,6 +135,15 @@
 #define USE_EMX_MOUSE 0
 #endif
 
+/* kLIBC keyboard/mouse support */
+#if defined(__OS2__) && defined(__KLIBC__)
+#define USE_KLIBC_KBD   1
+#define USE_KLIBC_MOUSE 1
+#else
+#define USE_KLIBC_KBD   0
+#define USE_KLIBC_MOUSE 0
+#endif
+
 #define DEFAULT_MAXCLICK 166
 #define EV_MAX		8	/* size of mouse circular event queue */
 
@@ -1032,6 +1041,10 @@
 	bool		_use_rmso;	/* true if we may use 'rmso'	     */
 	bool		_use_rmul;	/* true if we may use 'rmul'	     */
 
+#if USE_KLIBC_KBD
+	bool		_extended_key;	/* true if an extended key	     */
+#endif
+
 	/*
 	 * These data correspond to the state of the idcok() and idlok()
 	 * functions.  A caveat is in order here:  the XSI and SVr4
diff -uNr  ncurses/base/lib_getch.c.org ncurses/base/lib_getch.c
--- ncurses/base/lib_getch.c.org	2010-12-26 08:24:04.000000000 +0900
+++ ncurses/base/lib_getch.c	2012-01-09 14:17:36.000000000 +0900
@@ -257,6 +257,13 @@
 	n = 1;
     } else
 #endif
+#if USE_KLIBC_KBD
+    if (isatty(sp->_ifd) && sp->_cbreak) {
+	ch = _read_kbd(0, 1, !sp->_raw);
+	n = (ch == -1) ? -1 : 1;
+	sp->_extended_key = ( ch == 0 );
+    } else
+#endif
     {				/* Can block... */
 #ifdef USE_TERM_DRIVER
 	int buf;
@@ -569,7 +576,7 @@
      *
      * If carriage return is defined as a function key in the
      * terminfo, e.g., kent, then Solaris may return either ^J (or ^M
-     * if nonl() is set) or KEY_ENTER depending on the echo() mode. 
+     * if nonl() is set) or KEY_ENTER depending on the echo() mode.
      * We echo before translating carriage return based on nonl(),
      * since the visual result simply moves the cursor to column 0.
      *
diff -uNr  ncurses/base/lib_mouse.c.org ncurses/base/lib_mouse.c
--- ncurses/base/lib_mouse.c.org	2011-01-23 04:47:46.000000000 +0900
+++ ncurses/base/lib_mouse.c	2012-01-08 16:15:50.000000000 +0900
@@ -120,6 +120,17 @@
 #endif
 #endif				/* use_SYSMOUSE */
 
+#if USE_KLIBC_MOUSE
+#include <sys/socket.h>
+#define pipe(handles) socketpair(AF_LOCAL, SOCK_STREAM, 0, handles)
+#define DosWrite(hfile, pbuffer, cbwrite, pcbactual) \
+		write(hfile, pbuffer, cbwrite)
+#define DosExit(action, result ) /* do nothing */
+#define DosCreateThread(ptid, pfn, param, flag, cbStack) \
+		(*(ptid) = _beginthread(pfn, NULL, cbStack, \
+					(void *)param), (*(ptid) == -1))
+#endif
+
 #define MY_TRACE TRACE_ICALLS|TRACE_IEVENT
 
 #define	MASK_RELEASE(x)		(mmask_t) NCURSES_MOUSE_MASK(x, 001)
@@ -219,7 +230,11 @@
 }
 
 static void
+#if USE_KLIBC_MOUSE
+mouse_server(void *param)
+#else
 mouse_server(unsigned long param)
+#endif
 {
     SCREEN *sp = (SCREEN *) param;
     unsigned short fWait = MOU_WAIT;
diff -uNr  ncurses/base/lib_newterm.c.org ncurses/base/lib_newterm.c
--- ncurses/base/lib_newterm.c.org	2010-05-21 08:25:18.000000000 +0900
+++ ncurses/base/lib_newterm.c	2012-01-08 16:16:44.000000000 +0900
@@ -283,7 +283,8 @@
 	    NCURSES_SP_NAME(typeahead) (NCURSES_SP_ARGx fileno(_ifp));
 #ifdef TERMIOS
 	    SP_PARM->_use_meta = ((new_term->Ottyb.c_cflag & CSIZE) == CS8 &&
-				  !(new_term->Ottyb.c_iflag & ISTRIP));
+				  !(new_term->Ottyb.c_iflag & ISTRIP)) ||
+				  USE_KLIBC_KBD;
 #else
 	    SP_PARM->_use_meta = FALSE;
 #endif
diff -uNr  ncurses/tinfo/lib_raw.c.org ncurses/tinfo/lib_raw.c
--- ncurses/tinfo/lib_raw.c.org	2010-04-25 08:49:12.000000000 +0900
+++ ncurses/tinfo/lib_raw.c	2012-01-08 17:23:14.000000000 +0900
@@ -66,6 +66,11 @@
 #define _nc_setmode(mode)	/* nothing */
 #endif
 
+#if USE_KLIBC_KBD
+#define INCL_KBD
+#include <os2.h>
+#endif
+
 #define COOKED_INPUT	(IXON|BRKINT|PARMRK)
 
 #ifdef TRACE
@@ -100,6 +105,17 @@
 #endif
 	result = NCURSES_SP_NAME(_nc_set_tty_mode) (NCURSES_SP_ARGx &buf);
 	if (result == OK) {
+#if USE_KLIBC_KBD
+	    KBDINFO kbdinfo;
+
+	    kbdinfo.cb = sizeof( kbdinfo );
+	    KbdGetStatus( &kbdinfo, 0 );
+
+	    kbdinfo.cb = sizeof( kbdinfo );
+	    kbdinfo.fsMask &= ~KEYBOARD_ASCII_MODE;
+	    kbdinfo.fsMask |= KEYBOARD_BINARY_MODE;
+	    KbdSetStatus( &kbdinfo, 0 );
+#endif
 	    SP_PARM->_raw = TRUE;
 	    SP_PARM->_cbreak = 1;
 	    termp->Nttyb = buf;
@@ -218,6 +234,17 @@
 #endif
 	result = NCURSES_SP_NAME(_nc_set_tty_mode) (NCURSES_SP_ARGx &buf);
 	if (result == OK) {
+#if USE_KLIBC_KBD
+	    KBDINFO kbdinfo;
+
+	    kbdinfo.cb = sizeof( kbdinfo );
+	    KbdGetStatus( &kbdinfo, 0 );
+
+	    kbdinfo.cb = sizeof( kbdinfo );
+	    kbdinfo.fsMask &= ~KEYBOARD_BINARY_MODE;
+	    kbdinfo.fsMask |= KEYBOARD_ASCII_MODE;
+	    KbdSetStatus( &kbdinfo, 0 );
+#endif
 	    SP_PARM->_raw = FALSE;
 	    SP_PARM->_cbreak = 0;
 	    termp->Nttyb = buf;
diff -uNr  ncurses/tinfo/lib_ttyflags.c.org ncurses/tinfo/lib_ttyflags.c
--- ncurses/tinfo/lib_ttyflags.c.org	2010-12-26 08:43:58.000000000 +0900
+++ ncurses/tinfo/lib_ttyflags.c	2012-01-18 23:39:30.000000000 +0900
@@ -105,7 +105,11 @@
 	    result = CallDriver_2(SP_PARM, sgmode, TRUE, buf);
 #else
 	    for (;;) {
-		if (SET_TTY(termp->Filedes, buf) != 0) {
+		if ((SET_TTY(termp->Filedes, buf) != 0)
+#if USE_KLIBC_KBD
+		    && !isatty(termp->Filedes)
+#endif
+		   ) {
 		    if (errno == EINTR)
 			continue;
 		    if ((errno == ENOTTY) && (SP_PARM != 0))
diff -uNr  ncurses/tty/lib_twait.c.org ncurses/tty/lib_twait.c
--- ncurses/tty/lib_twait.c.org	2010-12-26 08:43:58.000000000 +0900
+++ ncurses/tty/lib_twait.c	2012-01-09 14:14:18.000000000 +0900
@@ -53,6 +53,11 @@
 #include <OS.h>
 #endif
 
+#if USE_KLIBC_KBD
+#define INCL_KBD
+#include <os2.h>
+#endif
+
 #if USE_FUNC_POLL
 # if HAVE_SYS_TIME_H
 #  include <sys/time.h>
@@ -184,6 +189,12 @@
     fd_set set;
 #endif
 
+#if USE_KLIBC_KBD
+    fd_set saved_set;
+    KBDKEYINFO ki;
+    struct timeval tv;
+#endif
+
     long starttime, returntime;
 
     TR(TRACE_IEVENT, ("start twait: %d milliseconds, mode: %d",
@@ -329,10 +340,12 @@
      */
     FD_ZERO(&set);
 
+#if !USE_KLIBC_KBD
     if (mode & TW_INPUT) {
 	FD_SET(sp->_ifd, &set);
 	count = sp->_ifd + 1;
     }
+#endif
     if ((mode & TW_MOUSE)
 	&& (fd = sp->_mouse_fd) >= 0) {
 	FD_SET(fd, &set);
@@ -352,6 +365,31 @@
     }
 #endif
 
+#if USE_KLIBC_KBD
+    for(saved_set = set;; set = saved_set) {
+	if ((mode & TW_INPUT)
+	    && (sp->_extended_key
+		|| (KbdPeek(&ki, 0) == 0
+		    && (ki.fbStatus & KBDTRF_FINAL_CHAR_IN)))) {
+	    FD_ZERO(&set);
+	    FD_SET(sp->_ifd, &set);
+	    result = 1;
+	    break;
+	}
+
+	tv.tv_sec = 0;
+	tv.tv_usec = (milliseconds == 0) ? 0 : (10 * 1000);
+
+	if ((result = select(count, &set, NULL, NULL, &tv)) != 0 )
+	    break;
+
+	/* Time out ? */
+	if (milliseconds >= 0 && _nc_gettime(&t0, FALSE) >= milliseconds) {
+	    result = 0;
+	    break;
+	}
+    }
+#else
     if (milliseconds >= 0) {
 	struct timeval ntimeout;
 	ntimeout.tv_sec = milliseconds / 1000;
@@ -360,6 +398,7 @@
     } else {
 	result = select(count, &set, NULL, NULL, NULL);
     }
+#endif
 
 #ifdef NCURSES_WGETCH_EVENTS
     if ((mode & TW_EVENT) && evl) {
_______________________________________________
Bug-ncurses mailing list
Bug-ncurses <at> gnu.org
https://lists.gnu.org/mailman/listinfo/bug-ncurses
Thomas Dickey | 15 Jan 02:25
Picon

ncurses-5.9-20120114.patch.gz

 ncurses 5.9 - patch 20120114 - Thomas E. Dickey

 ------------------------------------------------------------------------------

 Ncurses 5.9 is at
 	ftp.gnu.org:/pub/gnu

 Patches for ncurses 5.9 are in the subdirectory
 	ftp://invisible-island.net/ncurses/5.9

 ------------------------------------------------------------------------------
 ftp://invisible-island.net/ncurses/5.9/ncurses-5.9-20120114.patch.gz
 patch by Thomas E. Dickey <dickey <at> invisible-island.net>
 created  Sun Jan 15 00:46:23 UTC 2012
 ------------------------------------------------------------------------------
 Ada95/aclocal.m4                     |    8 
 Ada95/configure                      |  758 ++++-----
 NEWS                                 |   15 
 aclocal.m4                           |   12 
 configure                            | 2462 +++++++++++++++---------------
 dist.mk                              |    4 
 doc/html/man/adacurses-config.1.html |    2 
 doc/html/man/captoinfo.1m.html       |    2 
 doc/html/man/clear.1.html            |    2 
 doc/html/man/curs_termcap.3x.html    |  102 -
 doc/html/man/curs_terminfo.3x.html   |   70 
 doc/html/man/curs_util.3x.html       |    4 
 doc/html/man/form.3x.html            |    2 
 doc/html/man/infocmp.1m.html         |   52 
 doc/html/man/infotocap.1m.html       |    2 
 doc/html/man/menu.3x.html            |    2 
 doc/html/man/ncurses.3x.html         |  386 ++--
 doc/html/man/ncurses5-config.1.html  |    5 
 doc/html/man/panel.3x.html           |    2 
 doc/html/man/tabs.1.html             |    6 
 doc/html/man/term.7.html             |    4 
 doc/html/man/term_variables.3x.html  |    4 
 doc/html/man/terminfo.5.html         |  733 ++++-----
 doc/html/man/tic.1m.html             |  287 ++-
 doc/html/man/toe.1m.html             |   16 
 doc/html/man/tput.1.html             |   26 
 doc/html/man/tset.1.html             |  151 -
 test/aclocal.m4                      |   62 
 test/configure                       | 2684 ++++++++++++++++-----------------
 test/configure.in                    |   37 
 test/demo_menus.c                    |    6 
 test/movewindow.c                    |  185 +-
 32 files changed, 4189 insertions(+), 3904 deletions(-)
 ------------------------------------------------------------------------------

20120114
	+ several improvements to test/movewindow.c (prompted by discussion on
	  Linux Mint forum):
	  + modify movement commands to make them continuous
	  + rewrote the test for mvderwin
	  + rewrote the test for recursive mvwin
	+ split-out reusable CF_WITH_NCURSES_ETC macro in test/configure.in
	+ updated configure macro CF_XOPEN_SOURCE, build-fixes for Mac OS X
	  and OpenBSD.
	+ regenerated html manpages.

--

-- 
Thomas E. Dickey <dickey <at> invisible-island.net>
http://invisible-island.net
ftp://invisible-island.net
_______________________________________________
Bug-ncurses mailing list
Bug-ncurses <at> gnu.org
https://lists.gnu.org/mailman/listinfo/bug-ncurses
Thomas Dickey | 13 Jan 14:57
Picon

Re: [Ncurses] Unicode characters in menu

On Fri, Jan 13, 2012 at 09:11:42AM +0200, Yuriy Dmitrishin wrote:
> Hello.
> 
> Is there any way to display unicode characters as menu elements with menu
> library? I've hardly read docs but still can't find solution.

The ncurses test-programs (ncurses and demo_menus) are supposed to do this.
I recall testing the functionality by modifying the menu data to use some
UTF-8 example.  You should be able to see this work by building demo_menus
(with ncursesw/menuw) and giving the name of your menu-file from the command-line,
e.g.,

	./demo_menus utf8menus.txt

makes each line in utf8menus.txt become an entry in the "Select" menu.

--

-- 
Thomas E. Dickey <dickey <at> invisible-island.net>
http://invisible-island.net
ftp://invisible-island.net
_______________________________________________
Bug-ncurses mailing list
Bug-ncurses <at> gnu.org
https://lists.gnu.org/mailman/listinfo/bug-ncurses
Picon

Wide characters and menu

Hello.
I have a database (PostgreSQL) with tables stored in Unicode (Cyrillic).
Seems my code doesn't work when I try to use output of the database query as menu items. Here's a code:

#include <ncursesw/panel.h>
#include <ncursesw/menu.h>
#include <wchar.h>
...
PGconn *connect;
connect = PQconnectdb(ConnectionString);
PGresult *OrderData;
OrderData = PQexec(connect, Query);
my_items = (ITEM **)calloc(PQntuples(OrderData)+1, sizeof(ITEM *));
for(i = 0; i < PQntuples(OrderData); ++i) {
  my_items[i] = new_item(PQgetvalue(OrderData, i, 1), "");
};
my_menu = new_menu((ITEM **)my_items);
...
Compile: gcc 1.c -lmenu -lncursesw -lpq
So, with parameter PQgetvalue(OrderData, i, 0) my function works fine because this column is 'id'. But result of PQgetvalue(OrderData, i, 1) contains cyrillic symbols and my code doesn't work.

Regards, Yuriy Dmitrishin.
_______________________________________________
Bug-ncurses mailing list
Bug-ncurses <at> gnu.org
https://lists.gnu.org/mailman/listinfo/bug-ncurses
Thomas Dickey | 8 Jan 03:30
Picon

ncurses-5.9-20120107.patch.gz

 ncurses 5.9 - patch 20120107 - Thomas E. Dickey

 ------------------------------------------------------------------------------

 Ncurses 5.9 is at
 	ftp.gnu.org:/pub/gnu

 Patches for ncurses 5.9 are in the subdirectory
 	ftp://invisible-island.net/ncurses/5.9

 ------------------------------------------------------------------------------
 ftp://invisible-island.net/ncurses/5.9/ncurses-5.9-20120107.patch.gz
 patch by Thomas E. Dickey <dickey <at> invisible-island.net>
 created  Sun Jan  8 02:27:57 UTC 2012
 ------------------------------------------------------------------------------
 MANIFEST                    |    1 
 Makefile.in                 |    9 +---
 NEWS                        |   10 ++++-
 README.MinGW                |   80 +++++++++++++++++-------------------------
 aclocal.m4                  |    4 +-
 configure                   |   31 ++++++----------
 configure.in                |    9 +---
 dist.mk                     |    4 +-
 ncurses/tinfo/db_iterator.c |   23 +++++++-----
 progs/tset.c                |   11 ++++-
 test/README                 |    6 +--
 test/rain.c                 |    8 ++--
 12 files changed, 95 insertions(+), 101 deletions(-)
 ------------------------------------------------------------------------------

20120107
	+ various improvments for MinGW (patch by Juergen Pfeifer):
	  + modify stat() calls to ignore the st_size member
	  + drop mk-dlls.sh script.
	  + change recommended regular expression library.
	  + modify rain.c to allow for threaded configuraton.
	  + modify tset.c to allow for case when size-change logic is not used. 

--

-- 
Thomas E. Dickey <dickey <at> invisible-island.net>
http://invisible-island.net
ftp://invisible-island.net
_______________________________________________
Bug-ncurses mailing list
Bug-ncurses <at> gnu.org
https://lists.gnu.org/mailman/listinfo/bug-ncurses

Gmane