[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
wget_wch problem
From: |
Saravanan Bellan |
Subject: |
wget_wch problem |
Date: |
Wed, 14 Jan 2004 01:08:24 -0800 |
When running the following program on Solaris 8 with
ncurses(ncurses-5.3-20031004-patch) and zh_CN.GB18030 I get a seg fault at
wget_wch (stack trace below)
It works fine for any other locale.
Any ideas.
#include <signal.h>
#include <locale.h>
#include <curses.h>
#include <errno.h>
#include <stddef.h>
main(int argc, char ** argv) {
WINDOW *win;
wint_t in_wc;
int ret_c;
initscr(); nonl(); noecho(); raw(); erase(); refresh();
setlocale(LC_ALL, "");
win = newwin(20, 60, 0, 0);
clearok(win, 1); touchwin(win); wrefresh(win);
do {
errno = 0;
ret_c = wget_wch(win, &in_wc);
} while ((ret_c == ERR) && (errno == EINTR));
noraw();
endwin();
}
The back trace from gdb,
Program terminated with signal 11, Segmentation Fault.
Loaded symbols for /usr/lib/locale/zh_CN.GB18030/methods_zh_CN.GB18030.so.2
(gdb) bt
#0 0xff3516e4 in __mbrtowc_dense_gb18030 ()
from /usr/lib/locale/zh_CN.GB18030/methods_zh_CN.GB18030.so.2
#1 0x1d718 in wget_wch ()
#2 0x12e58 in main (argc=1, argv=0xffbef62c) at wget.c:21
Thanks,
-Sarva
- wget_wch problem,
Saravanan Bellan <=