bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Issue with wbkgrnd when upgrading from 6.1 to 6.2


From: Anton Vidovic
Subject: Issue with wbkgrnd when upgrading from 6.1 to 6.2
Date: Sat, 4 Apr 2020 20:54:36 +0200

Hello Thomas,

I am maintaining a ncurses binding in Common Lisp [1].

The ncurses functions are called by a Lisp foreign function interface.

Since ncurses 6.2 the routine wbkgrnd stopped working.

This would be a minimal example in Lisp that works as expected with 6.1
but does nothing on 6.2:

--

(initscr)

(cffi:with-foreign-objects ((ptr '(:struct cchar_t))
                            (wch 'wchar_t 5))

  ;; zero the wchar array
  (dotimes (i 5)
    (setf (cffi:mem-aref wch 'wchar_t i) 0))

  ;; set the first character to a unicode board character.
  (setf (cffi:mem-aref wch 'wchar_t 0) #x2592)

  ;; make the cchar_t
  (setcchar ptr wch 0 0 (cffi:null-pointer))

  ;; call the function
  (bkgrnd ptr)

  (refresh)
  (getch)
  (endwin))

--

This minimal example works with all ncurses releases from 5.9 to
6.1. It also works when the wbkgrnd function is naively copied
from the 6.1 sources over to 6.2 and rebuilt.

Do you have an idea of what might have changed in the new 6.2
function definition that affects how the functions works when
called through a FFI?

Thanks,
Anton

[1] https://github.com/McParen/croatoan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]