[Top][All Lists]

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

Re: lynx-dev DOS patch for lynx2.8.5dev.5

From: Doug Kaufman
Subject: Re: lynx-dev DOS patch for lynx2.8.5dev.5
Date: Wed, 26 Dec 2001 18:17:40 -0800 (PST)

On Wed, 26 Dec 2001, Thomas Dickey wrote:

> I follow most of the patch, but am puzzled by this chunk:
> > --- lynx2.8.5dev.5/lynx2-8-5/src/LYCurses.c.ori     Sun Nov 18 17:37:14 2001
> > +++ lynx2.8.5dev.5/lynx2-8-5/src/LYCurses.c Mon Dec 24 21:01:52 2001
> > @@ -2,6 +2,10 @@
> >  #include <HTAlert.h>
> >  #ifdef __DJGPP__
> >  #include <conio.h>
> > +#ifndef HAVE_GETTEXT
> > +#undef gettext
> > +#define gettext(s) s
> > +#endif /* HAVE_GETTEXT */
> >  #endif /* __DJGPP__ */
> >  #include <LYCurses.h>
> >  #include <LYStyle.h>
> Why are you doing that?

We have gettext defined as above in www_tcp.h if HAVE_GETTEXT
is not defined. Unfortunately there are two different gettext
functions for DJGPP, the one for internationalization and another
one defined in conio.h for retrieving screen characters into a
buffer. The DOS port of the libintl code does some magic where
if the internationalization code is included, the screen buffer
gettext is redefined to _conio_gettext. If you are not including the
internationalizatiion code, then it is assumed that you wanted the
_conio_gettext function, and gettext is defined as such. This is done
in the revised conio.h distributed with the GNU gettext package.
Thus, if you are compiling lynx with internationalization, there is
no problem. If you compile without internationalization, but have the
revised conio.h, gettext is redefined to _conio_gettext. Since we
needed conio.h for something in LYCurses.c (I forgot which function)
this restores the define from www_tcp.h. If you have the stock conio.h
from the DJGPP distribution and never installed the gettext package,
this section of the patch isn't needed. I think this is going to be
fixed in the next release of DJGPP. In the meantime, there are two
incompatible functions with the same name. We just have to be careful
to use the right one.
Doug Kaufman
Internet: address@hidden

; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to address@hidden

reply via email to

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