summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-07-20 08:53:16 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-07-20 08:53:16 +0200
commitd8c1605ced6e9445b8ef6fdf7ab5dde4021d454a (patch)
tree3f1609858cb9e509bdfb0829936b0d8d67423bfb
parent084904e718eeaefc22f094bd6b5ddf497b852128 (diff)
Make slightly more interesting
-rw-r--r--libprint/libprint/buildfile2
-rw-r--r--libprint/libprint/print.cxx9
-rw-r--r--libprint/libprint/print.hxx7
-rw-r--r--libprint/tests/test/driver.cxx2
4 files changed, 13 insertions, 7 deletions
diff --git a/libprint/libprint/buildfile b/libprint/libprint/buildfile
index f7d8a74..5cc7fed 100644
--- a/libprint/libprint/buildfile
+++ b/libprint/libprint/buildfile
@@ -18,4 +18,4 @@ libs{print}: cxx.export.poptions += -DLIBPRINT_SHARED
# Install into the libprint/ subdirectory of, say, /usr/include/.
#
-install.include = $install.include/libprint/
+install.include = $install.include/$project/
diff --git a/libprint/libprint/print.cxx b/libprint/libprint/print.cxx
index 32c827d..7ca5b04 100644
--- a/libprint/libprint/print.cxx
+++ b/libprint/libprint/print.cxx
@@ -6,8 +6,11 @@
using namespace std;
-void
-print (const string& h)
+namespace print
{
- cout << h << endl;
+ void
+ to_stdout (const string& s)
+ {
+ cout << s << endl;
+ }
}
diff --git a/libprint/libprint/print.hxx b/libprint/libprint/print.hxx
index 63cb541..7788faa 100644
--- a/libprint/libprint/print.hxx
+++ b/libprint/libprint/print.hxx
@@ -6,5 +6,8 @@
#include <libprint/export.hxx>
-LIBPRINT_EXPORT void
-print (const std::string& hello);
+namespace print
+{
+ LIBPRINT_EXPORT void
+ to_stdout (const std::string&);
+}
diff --git a/libprint/tests/test/driver.cxx b/libprint/tests/test/driver.cxx
index 27f491d..9b69a90 100644
--- a/libprint/tests/test/driver.cxx
+++ b/libprint/tests/test/driver.cxx
@@ -5,5 +5,5 @@
int
main ()
{
- print ("Hello, World!");
+ print::to_stdout ("Hello, World!");
}