Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2006:
[Freeciv-Dev] (PR#15828) inconsistent interpretation of quotes
Home

[Freeciv-Dev] (PR#15828) inconsistent interpretation of quotes

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#15828) inconsistent interpretation of quotes
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 9 Mar 2006 19:10:37 -0800
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=15828 >

It seems that for commands that take one parameter, quotes around that 
parameter never get interpreted.

 > create foo bar
 > create "foo bar"
 > list
List of players:
------------------------------------------------------------------------------
foo bar (user Unassigned, AI, difficulty level easy, team Team 1)
"foo bar" (user Unassigned, AI, difficulty level easy, team Team 2)
------------------------------------------------------------------------------
 > remove "foo bar"
2: Removing player "foo bar".
Removed player "foo bar" from the game.
 > remove "foo bar"
No player by the name of '"foo bar"'.
 > list
List of players:
------------------------------------------------------------------------------
foo bar (user Unassigned, AI, difficulty level easy, team Team 1)
------------------------------------------------------------------------------


By comparison, when more than one parameter is used, the quotes are 
interpreted as you'd expect.

 > list
List of players:
------------------------------------------------------------------------------
foo bar (user Unassigned, AI, difficulty level easy, team Team 1)
foo bar (user foo bar, Human, team Team 2, not ready) 1 connection:
   foo bar from localhost.localdomain (command access level hack), 
bufsize=44kb
------------------------------------------------------------------------------
 > cmdlevel ctrl foo bar
Command access level set to 'ctrl' for connection foo bar.
 > cmdlevel info "foo bar"
Command access level set to 'info' for connection foo bar.


And in certain cases the quotes are even *required*:

 > list
List of players:
------------------------------------------------------------------------------
foo bar (user Unassigned, AI, difficulty level easy, team Team 1)
foo bar (user foo bar, Human, team Team 2, not ready) 1 connection:
   foo bar from localhost.localdomain (command access level info), 
bufsize=44kb
baz grunt (user Unassigned, AI, difficulty level easy, team Team 3)
------------------------------------------------------------------------------
 > observe foo bar baz grunt
No player by the name of 'bar'.
 > observe "foo bar" baz grunt
foo bar detaching from foo bar


The end result is that sometimes quotations are not allowed and 
sometimes they are required.  This is, clearly, bad.  The fix is that 
they should always be allowed.  In the first case, 'create "foo bar"', 
the quotes should be interpreted and so the player 'foo bar' (not '"foo 
bar"') should be created.

-jason





[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#15828) inconsistent interpretation of quotes, Jason Short <=