delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/07/18/12:07:07

Message-Id: <200007181601.TAA29439@mailgw1.netvision.net.il>
Date: Tue, 18 Jul 2000 19:01:39 +0200
To: ST001906 AT hrz1 DOT hrz DOT tu-darmstadt DOT de
X-Mailer: Emacs 20.6 (via feedmail 8.2.emacs20_6 I) and Blat ver 1.8.5b
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
CC: djgpp AT delorie DOT com, zastai AT hotmail DOT com
In-reply-to: <9CE31E42431@HRZ1.hrz.tu-darmstadt.de>
(ST001906 AT hrz1 DOT hrz DOT tu-darmstadt DOT de)
Subject: Re: ANNOUNCE: DJGPP port of GNU gettext-0.10.35
References: <9CE31E42431 AT HRZ1 DOT hrz DOT tu-darmstadt DOT de>
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> From: "Juan Manuel Guerrero" <ST001906 AT hrz1 DOT hrz DOT tu-darmstadt DOT de>
> Date: Tue, 18 Jul 2000 08:12:30 +0200
> 
> 1) The user wants to use both gettext functions in the same file.
>    In this case an "alias" must be used for the GNU gettext function.
>    In this case the code should look like:
> 
>      #include <libintl.h>
>      #undef gettext
>      #define _ gettext__     // this is for NLS support.
>      #define gettext gettext // this is for gettext from conio.h.
>      #include <conio.h>

I understand that the intent is that the users should do this in their
programs, yes?  If so, perhaps it would be a better idea to modify
libintl.h supplied with the DJGPP port of gettext so that the entire
snippet above (sans the first line, of course) is inside libintl.h?
Then the users won't need to remember this.

> 2) The user wants to use the GNU gettext function and needs to include
>    the conio.h header but without using the gettext function.
>    In this case the code should look like:
> 
>      #include <conio.h>
>      #undef gettext
>      #include <libintl.h>

For this case, you could test in libintl.h if __dj_include_conio_h_ is
defined, and if so, take appropriate action.

It is also possible to add some magic to conio.h to make this easier.
You could try to distribute such a modified conio.h with the ported
gettext, and see how well does that work.  Later, we could incorporate
these change in a future release of DJGPP.

> 1) Do we want to get NLS support out-of-the-box for every existing and future
>    DJGPP port ?

My reply to this would be an unqualified YES.

> 2) Do we want to maintain compatibility with an old BORLAND compiler that is
>    no longer produced nor maintained by BORLAND/IMPRISE ? 

This is IMHO less important, but still desirable.  In particular,
several ports of GNU packages use gettext from conio.

I think that a combination of #ifdef's along the lines I suggested
above could be a resonable solution to these problems, without
breaking back-compatibility.  A similar solution is used to solve the
problem with two different versions of kbhit: one in conio.h, the
other in pc.h.  So I think a solution is possible that doesn't break
anything.

One other possibility that you didn't analyze is that a user doesn't
include *any* headers.  What would happen then, and is that a
reasonable thing to expect?

> If the first is wanted then conio.h has to be changed, IMHO.

If you have suggestions for changes in conio.h, please post them.
Since anonymous access to the DJGPP devlopment sources is available,
users who need this urgently can easily get an updated version.

Last, but not least: thanks for working on this!

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019