[Coco] curses! Sucess!

Aaron Wolfe aawolfe at gmail.com
Sat Aug 15 19:58:34 EDT 2009


On Sat, Aug 15, 2009 at 7:23 PM, Willard Goosey<goosey at virgo.sdc.org> wrote:
> OK, last year we had a big thing over the source for a Curses library
> that was on RTSI.
>
> Turns out it was OSK source, rather than OS-9/6X09.
>
> So, last night I finally sat down and hacked at it some, replacing the
> OSK SCF status scructs with the OS-9 versions, and actually got it to
> compile!
>
> (OSK's SCF status tables seem to be VERY deeply nested.  Ouch!)
>
> There were also a couple of macro calls that c_prep19 didn't like.  I
> split them off into seperate lines, which made both the compiler and
> my aesthetic sense happier.
>
> The only other change I had to make was that the the compiler didn't
> like comparing the return value of tgetent() to a (char *)1  so, after
> reading some about termcap, changed it to check for > 0
>
> You gotta love K&R C -- tgetent() returns -1 on file error, 0 for
> "can't find entry", and, to quote the man page, "some other value" on
> sucess. ;-)
>
> And of course, getting the code to compile doesn't actually mean it'll
> work.  I'll have to hack up some test code.
>
> Of course, it requires the Kreider Clib (for the OSK-style _ss_* and
> _gs_* functions), termcap (the LII termcap library does work, doesn't
> it?  I've never really tested it), and cgfx7 (for getenv).
>
> But we might actually have a working curses library!
>

That sounds great.  From programming in the unix world, I know curses
can save you a massive amount of time.
this probably also makes porting things to os9 a bit easier.


> 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
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco
>



More information about the Coco mailing list