* [gentoo-commits] proj/libbash:master commit in: src/core/, utils/, src/builtins/
@ 2011-06-03 14:42 Petteri Räty
0 siblings, 0 replies; only message in thread
From: Petteri Räty @ 2011-06-03 14:42 UTC (permalink / raw
To: gentoo-commits
commit: b8a211d6d1a383114a2aa275bf682c32d1f723a3
Author: Mu Qiao <qiaomuf <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 2 11:49:35 2011 +0000
Commit: Petteri Räty <betelgeuse <AT> gentoo <DOT> org>
CommitDate: Fri Jun 3 13:19:13 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/libbash.git;a=commit;h=b8a211d6
Core: fix header ordering
We want every header file to be compilable on its own. The easiest way
to achieve this is to make sure that every one of them is the first .h
file #included in some .cpp.
---
src/builtins/continue_builtin.cpp | 4 ++--
src/builtins/declare_builtin.cpp | 4 ++--
src/builtins/let_builtin.cpp | 3 ++-
src/builtins/shopt_builtin.cpp | 4 ++--
src/builtins/unset_builtin.cpp | 4 ++--
src/core/bash_ast.cpp | 4 ++--
src/core/bash_condition.cpp | 4 ++--
src/core/interpreter.cpp | 3 +--
utils/metadata.cpp | 4 ++--
9 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/src/builtins/continue_builtin.cpp b/src/builtins/continue_builtin.cpp
index 07c269a..03d79a2 100644
--- a/src/builtins/continue_builtin.cpp
+++ b/src/builtins/continue_builtin.cpp
@@ -20,13 +20,13 @@
/// \file continue_builtin.h
/// \brief implementation for the continue builtin
///
+#include "builtins/continue_builtin.h"
+
#include <boost/lexical_cast.hpp>
#include "builtins/builtin_exceptions.h"
#include "core/interpreter_exception.h"
-#include "builtins/continue_builtin.h"
-
int continue_builtin::exec(const std::vector<std::string>& bash_args)
{
int nth = 1;
diff --git a/src/builtins/declare_builtin.cpp b/src/builtins/declare_builtin.cpp
index 2a1d300..3ee9def 100644
--- a/src/builtins/declare_builtin.cpp
+++ b/src/builtins/declare_builtin.cpp
@@ -20,13 +20,13 @@
/// \file declare_builtin.cpp
/// \brief class that implements the declare builtin
///
+#include "builtins/declare_builtin.h"
+
#include <algorithm>
#include <iostream>
#include "core/interpreter.h"
-#include "builtins/declare_builtin.h"
-
int declare_builtin::exec(const std::vector<std::string>& bash_args)
{
if(bash_args.empty())
diff --git a/src/builtins/let_builtin.cpp b/src/builtins/let_builtin.cpp
index 5f1f9e5..2e731fe 100644
--- a/src/builtins/let_builtin.cpp
+++ b/src/builtins/let_builtin.cpp
@@ -20,12 +20,13 @@
/// \file let_builtin.h
/// \brief implementation for the let builtin
///
+#include "builtins/let_builtin.h"
+
#include <sstream>
#include <boost/algorithm/string/join.hpp>
#include "core/interpreter.h"
-#include "builtins/let_builtin.h"
int let_builtin::exec(const std::vector<std::string>& bash_args)
{
diff --git a/src/builtins/shopt_builtin.cpp b/src/builtins/shopt_builtin.cpp
index b3b8aac..e9e239a 100644
--- a/src/builtins/shopt_builtin.cpp
+++ b/src/builtins/shopt_builtin.cpp
@@ -21,12 +21,12 @@
/// \brief implementation for the shopt builtin
///
+#include "builtins/shopt_builtin.h"
+
#include "core/interpreter.h"
#include "core/interpreter_exception.h"
#include "cppbash_builtin.h"
-#include "builtins/shopt_builtin.h"
-
int shopt_builtin::set_opt(const std::vector<std::string>& bash_args, bool value)
{
int result = 0;
diff --git a/src/builtins/unset_builtin.cpp b/src/builtins/unset_builtin.cpp
index 8266e9e..078ee46 100644
--- a/src/builtins/unset_builtin.cpp
+++ b/src/builtins/unset_builtin.cpp
@@ -20,13 +20,13 @@
/// \file unset_builtin.h
/// \brief implementation for the unset builtin
///
+#include "builtins/unset_builtin.h"
+
#include <functional>
#include "core/interpreter.h"
#include "core/unset_exception.h"
-#include "builtins/unset_builtin.h"
-
int unset_builtin::exec(const std::vector<std::string>& bash_args)
{
if(bash_args.empty())
diff --git a/src/core/bash_ast.cpp b/src/core/bash_ast.cpp
index 003da12..8eafb3e 100644
--- a/src/core/bash_ast.cpp
+++ b/src/core/bash_ast.cpp
@@ -20,6 +20,8 @@
/// \file bash_ast.cpp
/// \brief a wrapper class that helps interpret from istream and string
///
+#include "core/bash_ast.h"
+
#include <fstream>
#include <boost/numeric/conversion/cast.hpp>
@@ -28,8 +30,6 @@
#include "libbashLexer.h"
#include "libbashParser.h"
-#include "core/bash_ast.h"
-
bash_ast::bash_ast(const std::istream& source,
std::function<pANTLR3_BASE_TREE(plibbashParser)> p): parse(p)
{
diff --git a/src/core/bash_condition.cpp b/src/core/bash_condition.cpp
index f941d43..a677961 100644
--- a/src/core/bash_condition.cpp
+++ b/src/core/bash_condition.cpp
@@ -20,6 +20,8 @@
/// \file bash_condition.cpp
/// \brief implementation for Bash Conditional Expressions
///
+#include "core/bash_condition.h"
+
#include <ctime>
#include <boost/lexical_cast.hpp>
@@ -30,8 +32,6 @@
#include "core/interpreter.h"
#include "core/interpreter_exception.h"
-#include "core/bash_condition.h"
-
namespace
{
bool test_file_stat(char op, const std::string& path)
diff --git a/src/core/interpreter.cpp b/src/core/interpreter.cpp
index ce1d2d8..378c3d2 100644
--- a/src/core/interpreter.cpp
+++ b/src/core/interpreter.cpp
@@ -20,6 +20,7 @@
/// \file interpreter.cpp
/// \brief implementations for bash interpreter (visitor pattern).
///
+#include "core/interpreter.h"
#include <cctype>
@@ -39,8 +40,6 @@
#include "core/unset_exception.h"
#include "libbashWalker.h"
-#include "core/interpreter.h"
-
interpreter::interpreter(): out(&std::cout), err(&std::cerr), in(&std::cin), bash_options(
{
{"autocd", false},
diff --git a/utils/metadata.cpp b/utils/metadata.cpp
index e200ab3..ed07092 100644
--- a/utils/metadata.cpp
+++ b/utils/metadata.cpp
@@ -20,6 +20,8 @@
/// \file metadata.cpp
/// \brief a helper for printing metadata content
///
+#include "utils/metadata.h"
+
#include <set>
#include <boost/spirit/include/karma.hpp>
@@ -27,8 +29,6 @@
#include <boost/algorithm/string/split.hpp>
#include <boost/algorithm/string/trim.hpp>
-#include "utils/metadata.h"
-
static const std::vector<std::string> metadata_names = {"DEPEND", "RDEPEND", "SLOT", "SRC_URI",
"RESTRICT", "HOMEPAGE", "LICENSE", "DESCRIPTION",
"KEYWORDS", "INHERITED", "IUSE", "REQUIRED_USE",
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2011-06-03 14:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-03 14:42 [gentoo-commits] proj/libbash:master commit in: src/core/, utils/, src/builtins/ Petteri Räty
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox