Subject: Re: Question about WINDOW structure in curses.h
To: Stephen J. Roznowski <sjr@zombie.ncsc.mil>
From: Chris G Demetriou <Chris_G_Demetriou@LAGAVULIN.PDL.CS.CMU.EDU>
List: current-users
Date: 12/27/1994 18:08:12
> I've noticed that NetBSD defines the internal members of the __window
> (WINDOW) structure to be minus a leading underscore (like, at least,
> Sun does).  Was this intentional?

Yes.  It was done so that people wouldn't use the internals...

> If so, what it the workaround for
> those programs that access the internals of this structure?

Find the authors of the programs, and kick them in the head?  8-)

Seriously, there's a reason that things are 'internals'.  Unless i'm
mistaken, some of the fields behave slightly differently than they
traditionally did, and so using them is dangerous.


Another great example of this is the MH m_getfld routine...  It uses
stdio internals.  (It turns out that for that one case, three
strategic #defines will fix the problem... but _only_ if the variables
are being used in exactly the way that MH is using them...)

In general, the 'right' solution to this is to #ifdef out the
internals-using code (or make them special case, for OS's that _can_
use them), and write it the right way...  In some cases, this is
difficult, but...


chris