A little Problem translating a header file.

Dejan Lekic dejan.lekic at gmail.com
Tue Nov 15 06:37:37 PST 2011


Jude Young wrote:

> On Tue 15 Nov 2011 04:27:57 AM CST, Dejan Lekic wrote:
>>
>> There are two bindings to NCurses already. My one, dcurses, and another
>> one, ycurses. I populate acs in a module constructor. Maybe not the best
>> idea, but works.
>>
> 
> I'm one of the maintainers of ycurses.
> If you check curses.d in Deimos, you'll find your name in a comment. =)
> Your idea for the CTFE of NCURSES_BITS really helped me out!
> 
> I should probably add your name to the AUTHORS file... damnit, knew
> there was something that I was forgetting.
> The binding that is in Deimos is the result of me tearing apart both of
> the bindings and merging the best parts together.
> 
> And then rearranging the result to closer resemble the header file to
> facilitate easier review later.
> And filling in the minor things that both projects overlooked.
> And fixing my own bugs. ><
> 
> I need to take a closer look at your module constructor...

It is not a big deal, can be done any time. What is more important to us 
(people who still believe in the console) is to have mature NCurses binding, 
hopefuly with support PDCurses as well (so our curses module can work on 
Windows too, inside the CMD shell.

Speaking about PDCurses, that is why i recently renamed my "curses" package 
into "tui", and inside that package i have ncurses and pdcurses (binding) 
modules.

So, my recommended structure would be:

--tui
  |-- curses.d
  |-- panel.d
  |-- ncurses
  |    |- curses.d
  |    |- panel.d
  |-- pdcurses
  |    |- curses.d
  |    |- panel.d

so, tui.curses is a module which uses different curses depending on the 
version. version(posix) will trigger the usage of ncurses.curses, while 
version(Windows) will trigger the usage of the pdcurses.curses.

I must admit I did not think too much. If I did, I would probably make 
Curses and Panel into interfaces, and write some adaptors...

No matter what, your module is still very much usable. Good work!



More information about the Digitalmars-d mailing list