[Coco] curses update

Willard Goosey goosey at virgo.sdc.org
Sun Nov 15 05:43:03 EST 2009


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
-- 
Willard Goosey  goosey at sdc.org
Socorro, New Mexico, USA
I search my heart and find Cimmeria, land of Darkness and the Night.
  -- R.E. Howard



More information about the Coco mailing list