xboard-devel
[Top][All Lists]
Advanced

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

Re: [XBoard-devel] file associations / positional arguments


From: h.g. muller
Subject: Re: [XBoard-devel] file associations / positional arguments
Date: Wed, 19 Sep 2012 09:51:34 +0200

I had to make one backward-compatibility breaking change to make this work satisfactorily. Problem is that Windows filenames often do contain spaces, and that the OS, when you use the "Open with..." menu item on a document, is not so friendly as to quote this filename.
So WinBoard will be confronted with command lines like

  winboard.exe Candidate Matches.pgn
  winboard.exe KingCheck ICS.xsf

The existing code would then complain that Matches.pgn was an invalid option (as only a single positional argument would be accepted), and even if it survived that, its attempts to open the
file Candidate would likely come to nothing.

So I now made it such that when reading the value of a positional argument, spaces are not considered a termination character, but are considered part of the arg value. This, however,
would break a usage like

  winboard.exe games.pgn -ncp

which in the old system would be parsed like

  winboard.exe -lgf games.pgn -ncp

but now would be interpreted as

  winboard.exe -lgf "games.pgn -ncp"

Is there any legitimate of such a mixture of position arguments and regular command-line options?
And even if there is, should we continue to support it?




reply via email to

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