Complete.Org: Mailing Lists: Archives: freeciv-dev: June 1999:
Re: [Freeciv-Dev] Running with Xaw (PR#20)
Home

Re: [Freeciv-Dev] Running with Xaw (PR#20)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: brunel@xxxxxxxxxxxxxxxxxxxx
Cc: schaefer@xxxxxx, freeciv-dev@xxxxxxxxxxx
Subject: Re: [Freeciv-Dev] Running with Xaw (PR#20)
From: David Pfitzner <dwp@xxxxxxxxxxxxxx>
Date: Tue, 15 Jun 1999 11:29:22 +1000

Nicolas Brunel wrote:

> > Probably some kind of return value might be checked 
> > and an error msg printed.
> > 
> >   XtGetApplicationResources(toplevel, &appResources, resources,
> >                             XtNumber(resources), NULL, 0);
> > 
> >   loglevel = log_parse_level_str(appResources.loglevel_str);
> >   if (loglevel==-1) {
> >     exit(1);
> 
>    To be perfect, you can put a freelog(LOG_FATAL,"The ressource file
> isn't the expected one.\nPlease rebuild Freeciv with an uptodate ressource
> file.\n");
> 
>    I assume loglevel==-1 if and only if the ressource file is incorrect.
> If I'm wrong, the message in freelog has to be changed.

I'm not sure about the resources file problem, but just a note:
the reason there is an exit(1) there with no message is that
if log_parse_level_str() returned -1 its supposed to have already
printed a message to stderr describing the problem.  (We can't really 
use freelog(), since this is when we're trying to setup for logging!)

But I suspect this isn't really the problem.  The reason
log_parse_level_str() comes after XtGetApplicationResources()
is just because the log level could come either from the resources
file, or from the command line.

-- David

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