[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
- Re: lynx-dev lynx2.8.2dev.19 patch #6 (em dash = --), (continued)
- Re: lynx-dev lynx2.8.2dev.19 patch #6 (em dash = --), Leonid Pauzner, 1999/03/15
- Re: lynx-dev lynx2.8.2dev.19 patch #8 (minore chrtrans undo), Leonid Pauzner, 1999/03/15
- Re: lynx-dev lynx2.8.2dev.19 patch #7 (Options menu!), Leonid Pauzner, 1999/03/15
- Re: lynx-dev lynx2.8.2dev.19 patch #9 (more comments), Leonid Pauzner, 1999/03/16
- Re: lynx-dev lynx2.8.2dev.19 patch #7 (Options menu!), Leonid Pauzner, 1999/03/16
- lynx-dev lynx2.8.2dev.19 patch #2 (DJGPP build), Leonid Pauzner, 1999/03/04
- lynx-dev lynx2.8.2dev.19 patch #3 (non UNIX build), Leonid Pauzner, 1999/03/05
- Re: lynx-dev lynx2.8.2dev.18, brian j pardy, 1999/03/04
- Re: lynx-dev lynx2.8.2dev.18, Kim DeVaughn, 1999/03/04
- Re: lynx-dev lynx2.8.2dev.18, pg, 1999/03/04
- Re: lynx-dev lynx2.8.2dev.18, Greg Marr, 1999/03/04
- Re: lynx-dev lynx2.8.2dev.18, Klaus Weide, 1999/03/04
- Re: lynx-dev lynx2.8.2dev.18, pg, 1999/03/04
- Re: lynx-dev lynx2.8.2dev.18, Kim DeVaughn, 1999/03/05
Re: lynx-dev lynx2.8.2dev.18, pg, 1999/03/04