From dd36e4e838b6d7eb9c0951f92d81118289a0a0db Mon Sep 17 00:00:00 2001 From: Sean Middleditch Date: Sat, 16 Jan 2010 20:27:13 -0800 Subject: [PATCH] rename files to match upstream's preferences --- Makefile | 2 +- janssonxx.tcc => jansson-impl.hpp | 11 +++++++++++ janssonxx.h => jansson.hpp | 11 ++++++----- test.cc => test.cpp | 2 +- 4 files changed, 19 insertions(+), 7 deletions(-) rename janssonxx.tcc => jansson-impl.hpp (97%) rename janssonxx.h => jansson.hpp (98%) rename test.cc => test.cpp (99%) diff --git a/Makefile b/Makefile index 9352227..7eb4984 100644 --- 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 diff --git a/janssonxx.tcc b/jansson-impl.hpp similarity index 97% rename from janssonxx.tcc rename to jansson-impl.hpp index 74e4be5..b275eb1 100644 --- a/janssonxx.tcc +++ b/jansson-impl.hpp @@ -1,3 +1,14 @@ +// janssonxx - C++ wrapper for jansson, implementation file +// +// author: Sean Middleditch +// +// 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 diff --git a/janssonxx.h b/jansson.hpp similarity index 98% rename from janssonxx.h rename to jansson.hpp index 260450f..40fb19b 100644 --- a/janssonxx.h +++ b/jansson.hpp @@ -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 #include @@ -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) diff --git a/test.cc b/test.cpp similarity index 99% rename from test.cc rename to test.cpp index 092679d..40a6a07 100644 --- a/test.cc +++ b/test.cpp @@ -2,7 +2,7 @@ #include #include -#include "janssonxx.h" +#include "jansson.hpp" using namespace std;