lynx-dev
[Top][All Lists]
Advanced

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

Re: lynx-dev patch


From: Vlad Harchev
Subject: Re: lynx-dev patch
Date: Tue, 13 Jul 1999 00:50:50 +0500 (SAMST)

On Mon, 12 Jul 1999, T.E.Dickey wrote:

> > > > 7) All functionality can be turned off at compile time - by defining  
> > > >    NO_JUSTIFY, NO_DUMP_WITH_BACKSPACES, NO_EMPTY_HREFLESS_A,   
> > > >    OPTNAME_ALLOW_DASHES=0, but Tom, don't make corresponding 
> > > > configure's  
> > > >    settings from them (I don't want them to be experimental :)  
> > >  
> > > Maybe - but it would be nice to have a naming convention (and keep names 
> > > shorter than 32 characters).  The OPTNAME_ALLOW_DASHES doesn't fit. 
> >  
> >  All those macro names are shorter than 32 chars. Do you mean that instead 
> > of  
> > OPTNAME_ALLOW_DASHES should be something like NO_DASHES_IN_OPTNAMES? 
> 
> It would make it simpler to grep & find similar names.  That's why I use
> OPT_ and EXP_ for most of these (the HAVE_ names are generated by autoconf).
> The NO_ names were Fote's (but negative logic is harder to read, which is
> also why I don't much use #ifndef).

 IMO NO_FOO defines are easier (during implementation of the FOO). If
functionality implementation is spread among several modules and the 
programmer thinks that this functionality is worth compiliing in by default,
then 
* to enable feature user have nothing to define
* to disable feature (much more rare case) user has to define NO_FOO in some
  file that is included by all files in which implementation of the feature
  is done. Seems that 'userdefs.h' is one of such file. But touching this file 
  (and making) will require recompilation of almost entire lynx.

 Example: when preparing the patch, I added 4 NO_FOO defines. I implemented
corresponding functionality in sequence. If I used the EXP_FOO or OPT_FOO
approach, I had to define these macros (in order to test functionality) in
userdefs.h (that would involved 4 almost full recompilation of lynx). With
NO_FOO approach, I had to recompile only changed files.

 But we can easily migrate from one style of conditional to other: eg
#ifndef OPT_FOO
# define NO_FOO
#endif

Can you tell what is the difference between OPT_FOO and EXP_FOO?

 Best regards,
  -Vlad


reply via email to

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