lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lynx-dev lynx2.8.2dev.18


From: dickey
Subject: Re: lynx-dev lynx2.8.2dev.18
Date: Thu, 4 Mar 1999 14:48:29 -0500 (EST)

> 
> In a recent note, Kim DeVaughn said: 
>  
> > Date: Thu, 4 Mar 1999 09:11:50 -0800 
> >  
> > On Thu, Mar 04, 1999, address@hidden (address@hidden) said: 
> > | * change the LYK_xxx keymap definitions to an enum, to simplify ifdef's - 
> > TD 
> >  
> > THANK YOU, Tom !!! 
> >  
> Just curious, as a novice C programmer: In what way does an enum simplify 
> ifdef's?  I presume this is enum a/a several #define's.  Can't you just 
> pick one of the defined macro names and use it in any necessary ifdef? 

not exactly - the values are counting in sequence from 1 because they
line up with a table in LYKeymap.c -- we've had that knot in LYKeymap.h
for some time; each time we add an entry we have to modify several lines.
  
> Are there any portability concerns with enums?  Harbison and Steele 
> says, "not all compilers implement enumerations, and those that do 
> are not consistent in their implementations." 

those would (have to) be pre-ANSI.  The ones that I know of (SunOS and HPUX)
implement workable enum's.
  
> I haven't compiled dev.18 on OS/390 yet.  I know that on OS/390, 
> enums are a serious portability obstacle: while OS/390 is perfectly 
> ANSI compliant as I read the standard, it defies general expectations 
> regarding the representation of enums in storage.  If a procedure 
> has a formal parameter of type (enum *), you may not be able to pass 
> it an (int *), for example. 

I was more concerned about making an array initialized with enums (but we've
been doing that under WWW).  Expect some minor compiler problems (i.e., fixes
that will be a few lines of code).
  
> -- gil 


-- 
Thomas E. Dickey
address@hidden
http://www.clark.net/pub/dickey

reply via email to

[Prev in Thread] Current Thread [Next in Thread]