ekmett / wl-pprint-terminfo

A color pretty printer with terminfo support
http://hackage.haskell.org/package/wl-pprint-terminfo
Other
9 stars 6 forks source link

COLS does not exist in ncurses libraries built for multi-threading #9

Open peti opened 8 years ago

peti commented 8 years ago

The code

foreign import ccall "cursed.h &COLS" colsPtr :: Ptr CInt
foreign import ccall unsafe "cursed.h endwin" endWin :: IO CInt

fails to link wl-pprint-terminfo versions of nurses that have been compiled with thread-safety enabled, like we do in the SUSE Linux distribution. @judah recommended in https://github.com/judah/terminfo/issues/16#issuecomment-232410179 that would probably be easiest to use ioctl() to get the terminal size, like haskeline does it.

We came across this issue first in https://github.com/opensuse-haskell/configuration/issues/7.

peti commented 8 years ago

Ping?

ekmett commented 8 years ago

I'd happily take a patch that fixes the issue, but I don't have a SUSE box to test it on.