[Coco] curses update

John Donaldson johnadonaldson at sbcglobal.net
Sun Nov 15 11:20:50 EST 2009


Willard,
    The link doesn't work.

John Donaldson


Willard Goosey wrote:
> New release of curses.l
>
> http://www.sdc.org/~goosey/os9/curses04.lzh
>
> In this release, all the functions that take a WINDOW * arguement
> check to make sure that it's non-null.
>
> The original MS-DOS code used NULL to mean stdscr!  Some of the
> functions checked for this case... but some didn't.  (And DDJ actually
> published this code?  Scary.)
>
> Anyway, I've hacked at it, and now that stdscr is a proper WINDOW *,
> there is no excuse to pass a NULL pointer as the window pointer.  
>
> Since some of the functions treat NULL as stdscr, I followed this
> convention.  Any function that takes a WINDOW * argument will silently
> use stdscr if passed NULL.  
>
> This behavior is non-standard, but I think it's far more likely that
> code will be ported to this particular curses, rather than from this
> curses to another.
>
> Other major issues with this code:  printw() is still broken.
> wprintw() works though.
>
> Willard
>   


-- 



More information about the Coco mailing list