Subject: ncurses and b17.1 on NT4.0 needs O_BINARY
From: [email-masked] (Ernie Rael)

6 Jan 1997 10:22:00 -0800
Sender: [email-masked]
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
Original-To: [email-masked]
X-Mailer: Forte Agent .99g/32.339
Original-Sender: [email-masked]

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
"[email-masked]" with one line of text: "help".