From 8dd1c8b8d6797d899d0f5b0a8015886bf6520ca2 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 23 Jan 2008 05:00:30 -0500 Subject: [PATCH] Clean up file names, add namespace --- src/harfbuzz-common.h | 14 -------------- src/harfbuzz-gdef.h | 11 ----------- src/hb-common.h | 14 ++++++++++++++ ...harfbuzz-gdef-private.h => hb-ot-layout-gdef-private.h} | 8 ++++---- ...harfbuzz-open-private.h => hb-ot-layout-open-private.h} | 10 +++++----- src/{harfbuzz-open.h => hb-ot-layout.h} | 12 ++++++------ src/{harfbuzz-private.h => hb-private.h} | 6 +++--- src/main.cc | 4 ++-- 8 files changed, 34 insertions(+), 45 deletions(-) delete mode 100644 src/harfbuzz-common.h delete mode 100644 src/harfbuzz-gdef.h create mode 100644 src/hb-common.h rename src/{harfbuzz-gdef-private.h => hb-ot-layout-gdef-private.h} (97%) rename src/{harfbuzz-open-private.h => hb-ot-layout-open-private.h} (99%) rename src/{harfbuzz-open.h => hb-ot-layout.h} (64%) rename src/{harfbuzz-private.h => hb-private.h} (79%) diff --git a/src/harfbuzz-common.h b/src/harfbuzz-common.h deleted file mode 100644 index b11539f..0000000 --- a/src/harfbuzz-common.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef HARFBUZZ_COMMON_H -#define HARFBUZZ_COMMON_H - -#include - -# ifdef __cplusplus -# define HARFBUZZ_BEGIN_DECLS() extern "C" { extern int harfbuzz_dummy_prototype (int) -# define HARFBUZZ_END_DECLS() } extern "C" int harfbuzz_dummy_prototype (int) -# else /* !__cplusplus */ -# define HARFBUZZ_BEGIN_DECLS() extern int harfbuzz_dummy_prototype (int) -# define HARFBUZZ_END_DECLS() extern int harfbuzz_dummy_prototype (int) -# endif /* !__cplusplus */ - -#endif /* HARFBUZZ_COMMON_H */ diff --git a/src/harfbuzz-gdef.h b/src/harfbuzz-gdef.h deleted file mode 100644 index 35647df..0000000 --- a/src/harfbuzz-gdef.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef HARFBUZZ_GDEF_H -#define HARFBUZZ_GDEF_H - -#include "harfbuzz-common.h" - -HARFBUZZ_BEGIN_DECLS(); - - -HARFBUZZ_END_DECLS(); - -#endif /* HARFBUZZ_GDEF_H */ diff --git a/src/hb-common.h b/src/hb-common.h new file mode 100644 index 0000000..4ad3bd1 --- /dev/null +++ b/src/hb-common.h @@ -0,0 +1,14 @@ +#ifndef HB_COMMON_H +#define HB_COMMON_H + +#include + +# ifdef __cplusplus +# define HB_BEGIN_DECLS() extern "C" { extern int hb_dummy_prototype (int) +# define HB_END_DECLS() } extern "C" int hb_dummy_prototype (int) +# else /* !__cplusplus */ +# define HB_BEGIN_DECLS() extern int hb_dummy_prototype (int) +# define HB_END_DECLS() extern int hb_dummy_prototype (int) +# endif /* !__cplusplus */ + +#endif /* HB_COMMON_H */ diff --git a/src/harfbuzz-gdef-private.h b/src/hb-ot-layout-gdef-private.h similarity index 97% rename from src/harfbuzz-gdef-private.h rename to src/hb-ot-layout-gdef-private.h index 6e0f4e3..779b2b4 100644 --- a/src/harfbuzz-gdef-private.h +++ b/src/hb-ot-layout-gdef-private.h @@ -1,7 +1,7 @@ -#ifndef HARFBUZZ_GDEF_PRIVATE_H -#define HARFBUZZ_GDEF_PRIVATE_H +#ifndef HB_OT_LAYOUT_GDEF_PRIVATE_H +#define HB_OT_LAYOUT_GDEF_PRIVATE_H -#include "harfbuzz-open-private.h" +#include "hb-ot-layout-open-private.h" struct GlyphClassDef : ClassDef { static const uint16_t BaseGlyph = 0x0001u; @@ -210,4 +210,4 @@ struct GDEFHeader { }; DEFINE_NULL_ASSERT_SIZE (GDEFHeader, 12); -#endif /* HARFBUZZ_GDEF_PRIVATE_H */ +#endif /* HB_OT_LAYOUT_GDEF_PRIVATE_H */ diff --git a/src/harfbuzz-open-private.h b/src/hb-ot-layout-open-private.h similarity index 99% rename from src/harfbuzz-open-private.h rename to src/hb-ot-layout-open-private.h index 9db3044..6ee3b94 100644 --- a/src/harfbuzz-open-private.h +++ b/src/hb-ot-layout-open-private.h @@ -1,8 +1,8 @@ -#ifndef HARFBUZZ_OPEN_PRIVATE_H -#define HARFBUZZ_OPEN_PRIVATE_H +#ifndef HB_OT_LAYOUT_OPEN_PRIVATE_H +#define HB_OT_LAYOUT_OPEN_PRIVATE_H -#include "harfbuzz-private.h" -#include "harfbuzz-open.h" +#include "hb-private.h" +#include "hb-ot-layout.h" #include @@ -801,4 +801,4 @@ DEFINE_NULL_ASSERT_SIZE (GSUBGPOSHeader, 10); DEFINE_NULL_ALIAS (GSUBHeader, GSUBGPOSHeader); DEFINE_NULL_ALIAS (GPOSHeader, GSUBGPOSHeader); -#endif /* HARFBUZZ_OPEN_PRIVATE_H */ +#endif /* HB_OT_LAYOUT_OPEN_PRIVATE_H */ diff --git a/src/harfbuzz-open.h b/src/hb-ot-layout.h similarity index 64% rename from src/harfbuzz-open.h rename to src/hb-ot-layout.h index 370bbdf..fb3da3d 100644 --- a/src/harfbuzz-open.h +++ b/src/hb-ot-layout.h @@ -1,9 +1,9 @@ -#ifndef HARFBUZZ_OPEN_H -#define HARFBUZZ_OPEN_H +#ifndef HB_OT_LAYOUT_OPEN_H +#define HB_OT_LAYOUT_OPEN_H -#include "harfbuzz-common.h" +#include "hb-common.h" -HARFBUZZ_BEGIN_DECLS(); +HB_BEGIN_DECLS(); typedef uint32_t hb_tag_t; #define HB_TAG(a,b,c,d) ((hb_tag_t)(((uint8_t)a<<24)|((uint8_t)b<<16)|((uint8_t)c<<8)|(uint8_t)d)) @@ -12,6 +12,6 @@ typedef uint32_t hb_tag_t; ((const char *) s)[2], \ ((const char *) s)[3])) -HARFBUZZ_END_DECLS(); +HB_END_DECLS(); -#endif /* HARFBUZZ_OPEN_H */ +#endif /* HB_OT_LAYOUT_OPEN_H */ diff --git a/src/harfbuzz-private.h b/src/hb-private.h similarity index 79% rename from src/harfbuzz-private.h rename to src/hb-private.h index 05b7ccc..ab9a7c8 100644 --- a/src/harfbuzz-private.h +++ b/src/hb-private.h @@ -1,5 +1,5 @@ -#ifndef HARFBUZZ_PRIVATE_H -#define HARFBUZZ_PRIVATE_H +#ifndef HB_PRIVATE_H +#define HB_PRIVATE_H #include @@ -9,4 +9,4 @@ #define ASSERT_SIZE(_type, _size) ASSERT_STATIC (sizeof (_type) == (_size)) -#endif /* HARFBUZZ_PRIVATE_H */ +#endif /* HB_PRIVATE_H */ diff --git a/src/main.cc b/src/main.cc index 3654e5e..4e6f9ad 100644 --- a/src/main.cc +++ b/src/main.cc @@ -1,5 +1,5 @@ -#include "harfbuzz-open-private.h" -#include "harfbuzz-gdef-private.h" +#include "hb-ot-layout-open-private.h" +#include "hb-ot-layout-gdef-private.h" #include #include -- 2.7.4