mirror of
git://git.savannah.nongnu.org/eliot.git
synced 2025-01-29 20:34:56 +01:00
Cosmetics
This commit is contained in:
parent
d6fbd6bef1
commit
3d48facb55
6 changed files with 4 additions and 17 deletions
|
@ -21,6 +21,7 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#include <boost/format.hpp>
|
||||
#include <getopt.h>
|
||||
#include <string>
|
||||
#include <fstream>
|
||||
|
@ -153,9 +154,7 @@ Game *GameFactory::createFromCmdLine(int argc, char **argv)
|
|||
wstring name;
|
||||
if (optarg == NULL)
|
||||
{
|
||||
// TODO: use Boost.Format
|
||||
char s[200];
|
||||
snprintf(s, 200, _("Player %u"), m_players.size() + 1);
|
||||
string s = str(boost::format(_("Player %1%")) % (m_players.size() + 1));
|
||||
name = wfl(s);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -199,6 +199,7 @@ void XmlWriter::write(const Game &iGame, const string &iFileName)
|
|||
}
|
||||
else
|
||||
{
|
||||
LOG_ERROR("Unsupported command: " << lfw(cmd->toString()));
|
||||
// XXX
|
||||
//throw SaveGameException("Unsupported command: " + lfw(cmd->toString()));
|
||||
}
|
||||
|
|
|
@ -105,10 +105,6 @@ load_game 0
|
|||
load_saved_game 0 # randseed unused
|
||||
# save and load a game combining 2 variants
|
||||
load_combi_variants 21
|
||||
# load a training game with advanced format (test.elt)
|
||||
# load_test_adv 0 # We need to specify a much more complete file format
|
||||
# before we can handle load/save on duplicate and
|
||||
# freegame games
|
||||
|
||||
#####################
|
||||
# Regular Expression
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
c test.elt
|
||||
a p
|
||||
a g
|
||||
a l
|
||||
q
|
||||
q
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
[?] pour l'aide
|
||||
commande> c test.elt
|
|
@ -179,7 +179,7 @@ wstring checkFileNameToken(const vector<wstring> &tokens, uint8_t index)
|
|||
const wstring &wstr = tokens[index];
|
||||
BOOST_FOREACH(wchar_t wch, wstr)
|
||||
{
|
||||
if (!iswalpha(wch) && wch != L'.' && wch != L'_')
|
||||
if (!iswalnum(wch) && wch != L'.' && wch != L'_')
|
||||
return L"";
|
||||
}
|
||||
return wstr;
|
||||
|
|
Loading…
Add table
Reference in a new issue