From: err AT raelity DOT com (Ernie Rael) Subject: ncurses and b17.1 on NT4.0 needs O_BINARY 6 Jan 1997 10:22:00 -0800 Sender: daemon AT cygnus DOT com Approved: cygnus DOT gnu-win32 AT cygnus DOT com Distribution: cygnus Message-ID: <32d12740.26693750.cygnus.gnu-win32@mail.scruznet.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Original-To: gnu-win32 AT cygnus DOT com X-Mailer: Forte Agent .99g/32.339 Original-Sender: owner-gnu-win32 AT cygnus DOT com Was having problem: the tic command failed when reading the terminfo database to resolve any "use=3Dother_term". The fix is to change read_entry.c to open terminfo files in binary mode. I didn't ifdef anything, i assume that in a real release O_BINARY would be defined to zero on systems that didn't need it (configure magic). The tests limp along but cursor movement is flaky, i set term to ansi. I think (hope) the problem is getting a good entry, how about win32? If any w95 experts have some thoughts..., i was thinking of looking at vim to get a start. Note: O_BINARY may be needed when the database is created. Some other commands that could not read the files: od, cat binary_file, cat < binary_file dd < binary_file but dd if=3Dbinary_file works, so does cp. This is ncurses-1.9.9e *** read_entry.c 1997/01/06 06:13:13 1.1 --- read_entry.c 1997/01/06 06:13:39 *************** *** 69,75 **** int i, fd, numread; char buf[MAX_ENTRY_SIZE]; ! if ((fd =3D open(filename, 0)) < 0) { if (errno =3D=3D ENOENT) { --- 69,75 ---- int i, fd, numread; char buf[MAX_ENTRY_SIZE]; ! if ((fd =3D open(filename, O_RDONLY|O_BINARY)) < 0) { if (errno =3D=3D ENOENT) { - For help on using this list, send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".