Complete.Org: Mailing Lists: Archives: freeciv-dev: September 1999:
Re: [Freeciv-Dev] Nations ruleset - the latest.
Home

Re: [Freeciv-Dev] Nations ruleset - the latest.

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: qpkjeek@xxxxxxxxxxxxxxx
Cc: freeciv-dev@xxxxxxxxxxx
Subject: Re: [Freeciv-Dev] Nations ruleset - the latest.
From: David Pfitzner <dwp@xxxxxxxxxxxxxx>
Date: Thu, 2 Sep 1999 13:23:34 +1000 (EST)

Jerzy Klek <qpkjeek@xxxxxxxxxxxxxxx> wrote:

> P.S. 
> Q:When I try to have a whole line comment in a vector in ruleset
> file e.g.:
> 
> vector = "a",
>          "b",
> ;comment
>          "c",
>          "d"
> 
> the secfile_lookup_str_vec() can't read it. A bug?

I guess so.  The problem is that newlines are sometimes treated
as whitespace, but other times are significant for registry syntax.

(They used to be always significant, since it was a line-based 
format;  I made changes to allow optional newlines in some cases, 
to avoid the necessity of sometimes very long lines, but I guess 
currently you are only allowed _one_ such optional newline at a 
time :-}  (The above effectively has two newlinse after the 
'"b",', within the data for the vector.)

I'll look at fixing this; should be straightforward.

(Ok, in section_file_load() in registry.c, change cases of:
  inf_token(inf, INF_TOK_EOL);    /* allow a newline */
to:
  while(inf_token(inf, INF_TOK_EOL)) ;    /* allow newlines */
or I guess preferably a descriptive function to do this.
(Completely untested idea.))

-- David

[Prev in Thread] Current Thread [Next in Thread]
  • Re: [Freeciv-Dev] Nations ruleset - the latest., David Pfitzner <=