rename files to match upstream's preferences
authorSean Middleditch <sean@middleditch.us>
Sun, 17 Jan 2010 04:27:13 +0000 (20:27 -0800)
committerSean Middleditch <sean@middleditch.us>
Sun, 17 Jan 2010 04:27:13 +0000 (20:27 -0800)
Makefile
jansson-impl.hpp [moved from janssonxx.tcc with 97% similarity]
jansson.hpp [moved from janssonxx.h with 98% similarity]
test.cpp [moved from test.cc with 99% similarity]

index 9352227..7eb4984 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,7 @@ JANSSON_LIBS := $(shell pkg-config --libs jansson)
 
 all: test
 
-test-bin: test.cc janssonxx.h janssonxx.tcc Makefile
+test-bin: test.cpp jansson.hpp jansson-impl.hpp Makefile
        $(CXX) -o $@ -g -O0 -Wall $(JANSSON_CFLAGS) $< $(JANSSON_LIBS)
 
 test: test-bin
similarity index 97%
rename from janssonxx.tcc
rename to jansson-impl.hpp
index 74e4be5..b275eb1 100644 (file)
@@ -1,3 +1,14 @@
+// janssonxx - C++ wrapper for jansson, implementation file
+//
+// author: Sean Middleditch <sean@middleditch.us>
+//
+// janssonxx is free software; you can redistribute it and/or modify
+// it under the terms of the MIT license. See LICENSE for details.
+
+#if !defined(IN_JANSSON_HPP)
+#      error "jansson-impl.hpp may only by included from jansson.hpp"
+#endif
+
 namespace jansson {
        namespace _private {
                // assignment operator
similarity index 98%
rename from janssonxx.h
rename to jansson.hpp
index 260450f..40fb19b 100644 (file)
@@ -5,9 +5,8 @@
 // janssonxx is free software; you can redistribute it and/or modify
 // it under the terms of the MIT license. See LICENSE for details.
 
-
-#if !defined(JANSSONXX_H)
-#define JANSSONXX_H 1
+#if !defined(JANSSON_HPP)
+#define JANSSON_HPP 1
 
 #include <string>
 #include <ostream>
@@ -300,6 +299,8 @@ inline std::ostream& operator<<(std::ostream& os, const jansson::Value& value);
 inline std::istream& operator>>(std::istream& is, jansson::Value& value);
 
 // include implementation code
-#include "janssonxx.tcc"
+#define IN_JANSSON_HPP 1
+#include "jansson-impl.hpp"
+#undef IN_JANSSON_HPP
 
-#endif // defined(JANSSONXX_H)
+#endif // defined(JANSSON_HPP)
similarity index 99%
rename from test.cc
rename to test.cpp
index 092679d..40a6a07 100644 (file)
--- a/test.cc
+++ b/test.cpp
@@ -2,7 +2,7 @@
 #include <iomanip>
 #include <malloc.h>
 
-#include "janssonxx.h"
+#include "jansson.hpp"
 
 using namespace std;