summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2009-12-13 10:32:44 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2009-12-13 10:32:44 +0200
commit47a0fa12397770ea49ea80f164dba8e0f82e97d1 (patch)
tree588f490b282c79df2396432bfe0e8ede7509c4b1
parent9284f891fd2b15c25d7107d77c9bce100054fe3d (diff)
Mark 'stdout' as a reserved name
On some platforms (e.g., Windows/VC++ 8.0) stdout is a macro.
-rw-r--r--cli/generator.cxx10
-rw-r--r--cli/makefile3
-rw-r--r--cli/options.cxx12
-rw-r--r--cli/options.hxx4
-rw-r--r--cli/options.ixx4
5 files changed, 17 insertions, 16 deletions
diff --git a/cli/generator.cxx b/cli/generator.cxx
index 7531ffe..3d7fa52 100644
--- a/cli/generator.cxx
+++ b/cli/generator.cxx
@@ -111,7 +111,7 @@ generate (options const& ops, semantics::cli_unit& unit, path const& p)
if (!gen_cxx && !gen_man && !gen_html)
gen_cxx = true;
- if (ops.stdout ())
+ if (ops.stdout_ ())
{
if (gen_cxx)
{
@@ -306,7 +306,7 @@ generate (options const& ops, semantics::cli_unit& unit, path const& p)
ofstream man;
- if (!ops.stdout ())
+ if (!ops.stdout_ ())
{
path man_path (base + ops.man_suffix ());
@@ -325,7 +325,7 @@ generate (options const& ops, semantics::cli_unit& unit, path const& p)
auto_rm.add (man_path);
}
- ostream& os (ops.stdout () ? cout : man);
+ ostream& os (ops.stdout_ () ? cout : man);
if (prologue.is_open ())
os << prologue.rdbuf ();
@@ -362,7 +362,7 @@ generate (options const& ops, semantics::cli_unit& unit, path const& p)
ofstream html;
- if (!ops.stdout ())
+ if (!ops.stdout_ ())
{
path html_path (base + ops.html_suffix ());
@@ -381,7 +381,7 @@ generate (options const& ops, semantics::cli_unit& unit, path const& p)
auto_rm.add (html_path);
}
- ostream& os (ops.stdout () ? cout : html);
+ ostream& os (ops.stdout_ () ? cout : html);
if (prologue.is_open ())
os << prologue.rdbuf ();
diff --git a/cli/makefile b/cli/makefile
index 7320630..db4281a 100644
--- a/cli/makefile
+++ b/cli/makefile
@@ -64,7 +64,8 @@ genf := $(cli_tun:.cli=.hxx) $(cli_tun:.cli=.ixx) $(cli_tun:.cli=.cxx)
gen := $(addprefix $(out_base)/,$(genf))
$(gen): cli := $(out_root)/cli/cli
-$(gen): cli_options := --generate-file-scanner --guard-prefix CLI
+$(gen): cli_options := --generate-file-scanner --guard-prefix CLI \
+--reserved-name stdout
$(call include-dep,$(cxx_od),$(cxx_obj),$(gen))
diff --git a/cli/options.cxx b/cli/options.cxx
index 4e8b67d..5acc325 100644
--- a/cli/options.cxx
+++ b/cli/options.cxx
@@ -505,7 +505,7 @@ options (int& argc,
html_prologue_ (),
html_epilogue_ (),
class__ (),
- stdout_ (),
+ stdout__ (),
hxx_suffix_ (".hxx"),
ixx_suffix_ (".ixx"),
cxx_suffix_ (".cxx"),
@@ -547,7 +547,7 @@ options (int start,
html_prologue_ (),
html_epilogue_ (),
class__ (),
- stdout_ (),
+ stdout__ (),
hxx_suffix_ (".hxx"),
ixx_suffix_ (".ixx"),
cxx_suffix_ (".cxx"),
@@ -589,7 +589,7 @@ options (int& argc,
html_prologue_ (),
html_epilogue_ (),
class__ (),
- stdout_ (),
+ stdout__ (),
hxx_suffix_ (".hxx"),
ixx_suffix_ (".ixx"),
cxx_suffix_ (".cxx"),
@@ -633,7 +633,7 @@ options (int start,
html_prologue_ (),
html_epilogue_ (),
class__ (),
- stdout_ (),
+ stdout__ (),
hxx_suffix_ (".hxx"),
ixx_suffix_ (".ixx"),
cxx_suffix_ (".cxx"),
@@ -673,7 +673,7 @@ options (::cli::scanner& s,
html_prologue_ (),
html_epilogue_ (),
class__ (),
- stdout_ (),
+ stdout__ (),
hxx_suffix_ (".hxx"),
ixx_suffix_ (".ixx"),
cxx_suffix_ (".cxx"),
@@ -824,7 +824,7 @@ struct _cli_options_map_init
_cli_options_map_["--class"] =
&::cli::thunk< options, std::string, &options::class__ >;
_cli_options_map_["--stdout"] =
- &::cli::thunk< options, bool, &options::stdout_ >;
+ &::cli::thunk< options, bool, &options::stdout__ >;
_cli_options_map_["--hxx-suffix"] =
&::cli::thunk< options, std::string, &options::hxx_suffix_ >;
_cli_options_map_["--ixx-suffix"] =
diff --git a/cli/options.hxx b/cli/options.hxx
index 1c7456c..24af0f2 100644
--- a/cli/options.hxx
+++ b/cli/options.hxx
@@ -351,7 +351,7 @@ class options
class_ () const;
const bool&
- stdout () const;
+ stdout_ () const;
const std::string&
hxx_suffix () const;
@@ -418,7 +418,7 @@ class options
std::string html_prologue_;
std::string html_epilogue_;
std::string class__;
- bool stdout_;
+ bool stdout__;
std::string hxx_suffix_;
std::string ixx_suffix_;
std::string cxx_suffix_;
diff --git a/cli/options.ixx b/cli/options.ixx
index cfaf2ac..b814835 100644
--- a/cli/options.ixx
+++ b/cli/options.ixx
@@ -250,9 +250,9 @@ class_ () const
}
inline const bool& options::
-stdout () const
+stdout_ () const
{
- return this->stdout_;
+ return this->stdout__;
}
inline const std::string& options::