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

Re: Problem with mutt sources - unknown C syntax?



On Sun, Jan 09, 2000 at 07:53:28PM +0000, Paul J. Keenan wrote:
> On Sat, Jan 08, 2000 at 02:50:14PM +0000, Paul J. Keenan wrote:
> > On Sat, Jan 08, 2000 at 12:24:26PM +0100, Wojciech Zabolotny wrote:
> > > Hi All, 
> > > 
> > > The problem is that I don't know what does mean the underscore preceeding
> > > the paranthesis around the string definition?
> > > Is it a GCC extension?
> > > -- 
> > > 			Wojciech Zabolotny
> > > 			http://www.ise.pw.edu.pl/~wzab
> > 
> > I don't have the mutt sources, but I just did a test, and underscore
> > is a perfectly valid (if somewhat terse!) function name.  Look for a
> > function definition returning a char * called _ in the source - it
> > is probably used for preprocessing the string before printing it,
> > perhaps to add "mutt[PID]: " to the beginning or something.
> 
> Now I do have the sources for mutt to do something unrelated, so looked at 
> this again.  I tracked the definition to mutt.h :
> 
> #ifdef ENABLE_NLS
> # include <libintl.h>
> # define _(a) (gettext (a))
> 
> So it's a macro which defines _ as an alias to calling gettext, presumably
> to keep the code less busy.  The gettext function returns the translation
> of the text in the target language if you are using internationalisation.
> 

Thank's a lot to all who responded. Anyway I don't know why mutt 1.0.1
works perfectly on one slink system (in my office) and segfaults on the
other (at home).
The libraries versions (displayed by ldd) are the same.
Maybe the i18n settings are different?
Probably I have to wait for potato...
-- 
			Wojciech Zabolotny
			http://www.ise.pw.edu.pl/~wzab

http://www.debian.org  Use Linux - an OS without "trojan horses" inside


Reply to: