0

I'm working with the crt.cr Crystal shard, which binds ncurses. It's lacking some things I want, like mvhline(). So I'm adding the things I want.

One thing I want is is ncurses alternative character sheet, so I can make nice boxes.

As far as I can tell, this is pretty dang hard (but I'm not an expert in either Crystal or C). From what I can tell, the alternative character sheet characters are all unsigned chars, defined by the preprocessor.

Can someone explain how I can get access to the alternative character sheet characters?

Paulo Mattos
  • 18,845
  • 10
  • 77
  • 85
Jones
  • 1,154
  • 1
  • 10
  • 35

1 Answers1

4

You cannot access things that are only in C header files (and things that are done through the preprocessor) in a shared library file, because they simply aren't put there.

Since Crystal only binds to a shared library file, there is no option other than manually (sometimes automatically) duplicating these as constants in Crystal code.

Oleh Prypin
  • 33,184
  • 10
  • 89
  • 99