diff --git a/src/Makefile.am b/src/Makefile.am index 845c24acd15061fa6dd97bc8826815579fcc940a..1069307b219da164614d6e3e51c0ea9dc88ec0a2 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -12,17 +12,17 @@ HBCFLAGS = HBLIBS = HBSOURCES = \ hb-blob.cc \ - hb-blob-private.h \ + hb-blob-private.hh \ hb-buffer.cc \ hb-buffer-private.hh \ - hb-common.c \ + hb-common.cc \ hb-font.cc \ - hb-font-private.h \ - hb-object-private.h \ + hb-font-private.hh \ + hb-object-private.hh \ hb-open-file-private.hh \ hb-open-type-private.hh \ hb-ot-head-private.hh \ - hb-private.h \ + hb-private.hh \ hb-shape.cc \ hb-unicode.cc \ hb-unicode-private.hh \ @@ -49,10 +49,10 @@ HBSOURCES += \ hb-ot-map-private.hh \ hb-ot-shape.cc \ hb-ot-shape-complex-arabic.cc \ - hb-ot-shape-complex-arabic-table.h \ + hb-ot-shape-complex-arabic-table.hh \ hb-ot-shape-complex-private.hh \ hb-ot-shape-private.hh \ - hb-ot-tag.c \ + hb-ot-tag.cc \ $(NULL) HBHEADERS += \ hb-ot.h \ @@ -87,7 +87,7 @@ if HAVE_FREETYPE HBCFLAGS += $(FREETYPE_CFLAGS) HBLIBS += $(FREETYPE_LIBS) HBSOURCES += \ - hb-ft.c \ + hb-ft.cc \ $(NULL) HBHEADERS += \ hb-ft.h \ @@ -142,5 +142,6 @@ else dist_check_SCRIPTS += check-libstdc++.sh endif +TESTS = $(dist_check_SCRIPTS) -include $(top_srcdir)/git.mk diff --git a/src/hb-blob-private.h b/src/hb-blob-private.hh similarity index 93% rename from src/hb-blob-private.h rename to src/hb-blob-private.hh index cdc9b2fd3ad2051e81c7e92f2ad5685a5e207dc7..4b421da0c023b784ced96e9327dc53c327da5d0d 100644 --- a/src/hb-blob-private.h +++ b/src/hb-blob-private.hh @@ -24,10 +24,10 @@ * Red Hat Author(s): Behdad Esfahbod */ -#ifndef HB_BLOB_PRIVATE_H -#define HB_BLOB_PRIVATE_H +#ifndef HB_BLOB_PRIVATE_HH +#define HB_BLOB_PRIVATE_HH -#include "hb-private.h" +#include "hb-private.hh" #include "hb-blob.h" @@ -56,4 +56,4 @@ extern HB_INTERNAL hb_blob_t _hb_blob_nil; HB_END_DECLS -#endif /* HB_BLOB_PRIVATE_H */ +#endif /* HB_BLOB_PRIVATE_HH */ diff --git a/src/hb-blob.cc b/src/hb-blob.cc index 511455b793cd7268841a9757581c0a81535f7432..e2af8b7c2766d59ff0cc6155fbd3dd05bd8ad1fb 100644 --- a/src/hb-blob.cc +++ b/src/hb-blob.cc @@ -24,9 +24,9 @@ * Red Hat Author(s): Behdad Esfahbod */ -#include "hb-private.h" +#include "hb-private.hh" -#include "hb-blob-private.h" +#include "hb-blob-private.hh" #ifdef HAVE_SYS_MMAN_H #ifdef HAVE_UNISTD_H diff --git a/src/hb-buffer-private.hh b/src/hb-buffer-private.hh index dfcc45d6143b6d08825535b7860cf64fb7b44de1..4c2a3e69c366d7715abe608a489196154e3b4ba0 100644 --- a/src/hb-buffer-private.hh +++ b/src/hb-buffer-private.hh @@ -28,7 +28,7 @@ #ifndef HB_BUFFER_PRIVATE_HH #define HB_BUFFER_PRIVATE_HH -#include "hb-private.h" +#include "hb-private.hh" #include "hb-buffer.h" #include "hb-unicode-private.hh" diff --git a/src/hb-common.c b/src/hb-common.cc similarity index 95% rename from src/hb-common.c rename to src/hb-common.cc index c1c4c548ae82f41ec0404a989c18b542b699e762..ece09808d3570773f9a08f00d17166b5e66894f7 100644 --- a/src/hb-common.c +++ b/src/hb-common.cc @@ -24,7 +24,7 @@ * Red Hat Author(s): Behdad Esfahbod */ -#include "hb-private.h" +#include "hb-private.hh" HB_BEGIN_DECLS @@ -70,8 +70,8 @@ static hb_bool_t lang_equal (const void *v1, const void *v2) { - const unsigned char *p1 = v1; - const unsigned char *p2 = v2; + const unsigned char *p1 = (const unsigned char *) v1; + const unsigned char *p2 = (const unsigned char *) v2; while (canon_map[*p1] && canon_map[*p1] == canon_map[*p2]) { @@ -118,7 +118,7 @@ hb_language_from_string (const char *str) if (unlikely (num_langs == num_alloced)) { unsigned int new_alloced = 2 * (8 + num_alloced); - hb_language_t *new_langs = realloc (langs, new_alloced * sizeof (langs[0])); + hb_language_t *new_langs = (hb_language_t *) realloc (langs, new_alloced * sizeof (langs[0])); if (!new_langs) return NULL; num_alloced = new_alloced; diff --git a/src/hb-font-private.h b/src/hb-font-private.hh similarity index 95% rename from src/hb-font-private.h rename to src/hb-font-private.hh index 46686b7715533c14f52910d420a682a0cffcf8f4..da7255a1b0ff3c94f0beefc937b0271c16d7ccad 100644 --- a/src/hb-font-private.h +++ b/src/hb-font-private.hh @@ -24,10 +24,10 @@ * Red Hat Author(s): Behdad Esfahbod */ -#ifndef HB_FONT_PRIVATE_H -#define HB_FONT_PRIVATE_H +#ifndef HB_FONT_PRIVATE_HH +#define HB_FONT_PRIVATE_HH -#include "hb-private.h" +#include "hb-private.hh" #include "hb-font.h" @@ -94,4 +94,4 @@ struct _hb_font_t { HB_END_DECLS -#endif /* HB_FONT_PRIVATE_H */ +#endif /* HB_FONT_PRIVATE_HH */ diff --git a/src/hb-font.cc b/src/hb-font.cc index 96ff4f598bb4a7b3f38302d84235dd9ed647411a..a84dde416d9f6d261d5666952fb1a74233c49445 100644 --- a/src/hb-font.cc +++ b/src/hb-font.cc @@ -24,10 +24,10 @@ * Red Hat Author(s): Behdad Esfahbod */ -#include "hb-private.h" +#include "hb-private.hh" -#include "hb-font-private.h" -#include "hb-blob-private.h" +#include "hb-font-private.hh" +#include "hb-blob-private.hh" #include "hb-open-file-private.hh" #include "hb-ot-layout-private.hh" diff --git a/src/hb-ft.c b/src/hb-ft.cc similarity index 99% rename from src/hb-ft.c rename to src/hb-ft.cc index 96c035abc510331af3ae4d5d9981df1a6e5601fa..f583ce52808ad7a37126f06bc213500f043eefe1 100644 --- a/src/hb-ft.c +++ b/src/hb-ft.cc @@ -25,11 +25,11 @@ * Red Hat Author(s): Behdad Esfahbod */ -#include "hb-private.h" +#include "hb-private.hh" #include "hb-ft.h" -#include "hb-font-private.h" +#include "hb-font-private.hh" #include FT_TRUETYPE_TABLES_H diff --git a/src/hb-glib.cc b/src/hb-glib.cc index 158a21048e8dbee86f8b75c4b4297ea753bf9fd3..0f94f52ae264f04289c7232a2a3e1cfb6b4ba05a 100644 --- a/src/hb-glib.cc +++ b/src/hb-glib.cc @@ -24,7 +24,7 @@ * Red Hat Author(s): Behdad Esfahbod */ -#include "hb-private.h" +#include "hb-private.hh" #include "hb-glib.h" diff --git a/src/hb-icu.cc b/src/hb-icu.cc index 8fc8c81acf1753a066b943e25976095406464930..2f31a070a96e1e91377a3eaf32c0c7122b3488b9 100644 --- a/src/hb-icu.cc +++ b/src/hb-icu.cc @@ -25,7 +25,7 @@ * Red Hat Author(s): Behdad Esfahbod */ -#include "hb-private.h" +#include "hb-private.hh" #include "hb-icu.h" diff --git a/src/hb-object-private.h b/src/hb-object-private.hh similarity index 94% rename from src/hb-object-private.h rename to src/hb-object-private.hh index c1787c53766600c846f9ccd974e09ccfded7e3d7..8f0d5ae5f5b7c8339e7345c82096ba4bf8e4d462 100644 --- a/src/hb-object-private.h +++ b/src/hb-object-private.hh @@ -27,10 +27,10 @@ * Red Hat Author(s): Behdad Esfahbod */ -#ifndef HB_OBJECT_PRIVATE_H -#define HB_OBJECT_PRIVATE_H +#ifndef HB_OBJECT_PRIVATE_HH +#define HB_OBJECT_PRIVATE_HH -#include "hb-private.h" +#include "hb-private.hh" HB_BEGIN_DECLS @@ -53,8 +53,6 @@ typedef struct { #define HB_REFERENCE_COUNT_IS_INVALID(RC) (HB_REFERENCE_COUNT_GET_VALUE (RC) == HB_REFERENCE_COUNT_INVALID_VALUE) -#define HB_REFERENCE_COUNT_HAS_REFERENCE(RC) (HB_REFERENCE_COUNT_GET_VALUE (RC) > 0) - /* Debug */ @@ -131,4 +129,4 @@ _hb_trace_object (const void *obj, HB_END_DECLS -#endif /* HB_OBJECT_PRIVATE_H */ +#endif /* HB_OBJECT_PRIVATE_HH */ diff --git a/src/hb-open-type-private.hh b/src/hb-open-type-private.hh index 241c5a06ea7dd71a2a81987d6b52cc09b68e56f4..490ea3a748e5dbecd852b51f2a2f37b843c5fcbd 100644 --- a/src/hb-open-type-private.hh +++ b/src/hb-open-type-private.hh @@ -27,7 +27,7 @@ #ifndef HB_OPEN_TYPE_PRIVATE_HH #define HB_OPEN_TYPE_PRIVATE_HH -#include "hb-private.h" +#include "hb-private.hh" #include "hb-blob.h" diff --git a/src/hb-ot-layout-gdef-private.hh b/src/hb-ot-layout-gdef-private.hh index 4172a7cb1f000d6a5bfc5ca2dd461c4f0c7729d5..242b33a0d237f65ba743c07602808add102423f7 100644 --- a/src/hb-ot-layout-gdef-private.hh +++ b/src/hb-ot-layout-gdef-private.hh @@ -31,7 +31,7 @@ #include "hb-ot-layout-common-private.hh" -#include "hb-font-private.h" +#include "hb-font-private.hh" HB_BEGIN_DECLS diff --git a/src/hb-ot-layout-private.hh b/src/hb-ot-layout-private.hh index b0088fbd7d0e1c484c6119e6e54ee90b2be07f64..a802c63e65ca9a80f449db40097865a8d7d5da74 100644 --- a/src/hb-ot-layout-private.hh +++ b/src/hb-ot-layout-private.hh @@ -27,12 +27,12 @@ #ifndef HB_OT_LAYOUT_PRIVATE_HH #define HB_OT_LAYOUT_PRIVATE_HH -#include "hb-private.h" +#include "hb-private.hh" #include "hb-ot-layout.h" #include "hb-ot-head-private.hh" -#include "hb-font-private.h" +#include "hb-font-private.hh" #include "hb-buffer-private.hh" HB_BEGIN_DECLS diff --git a/src/hb-ot-shape-complex-arabic-table.h b/src/hb-ot-shape-complex-arabic-table.hh similarity index 99% rename from src/hb-ot-shape-complex-arabic-table.h rename to src/hb-ot-shape-complex-arabic-table.hh index 523fc84a393c1d3265ae3966b92ba6b7caae4a46..27c669688ce27ce40156fb6a530fb513696c0488 100644 --- a/src/hb-ot-shape-complex-arabic-table.h +++ b/src/hb-ot-shape-complex-arabic-table.hh @@ -24,10 +24,10 @@ * Google Author(s): Behdad Esfahbod */ -#ifndef HB_OT_SHAPE_COMPLEX_ARABIC_TABLE_H -#define HB_OT_SHAPE_COMPLEX_ARABIC_TABLE_H +#ifndef HB_OT_SHAPE_COMPLEX_ARABIC_TABLE_HH +#define HB_OT_SHAPE_COMPLEX_ARABIC_TABLE_HH -#include "hb-private.h" +#include "hb-private.hh" HB_BEGIN_DECLS @@ -671,4 +671,4 @@ static const uint8_t joining_table[] = HB_END_DECLS -#endif /* HB_OT_SHAPE_COMPLEX_ARABIC_TABLE_H */ +#endif /* HB_OT_SHAPE_COMPLEX_ARABIC_TABLE_HH */ diff --git a/src/hb-ot-shape-complex-arabic.cc b/src/hb-ot-shape-complex-arabic.cc index cc08fbb96686198e4bc1934bb1e772197715b92d..3e265683a79e0923bfd25bfd7750fde3406d15f4 100644 --- a/src/hb-ot-shape-complex-arabic.cc +++ b/src/hb-ot-shape-complex-arabic.cc @@ -55,7 +55,7 @@ enum { * Joining types: */ -#include "hb-ot-shape-complex-arabic-table.h" +#include "hb-ot-shape-complex-arabic-table.hh" static unsigned int get_joining_type (hb_codepoint_t u, hb_unicode_general_category_t gen_cat) { diff --git a/src/hb-ot-shape-complex-private.hh b/src/hb-ot-shape-complex-private.hh index 814794527507c6c9b5642ac93c2a0e4c35d74f08..8225b46657880a396c53408cbe6b52bc99cd9e84 100644 --- a/src/hb-ot-shape-complex-private.hh +++ b/src/hb-ot-shape-complex-private.hh @@ -27,7 +27,7 @@ #ifndef HB_OT_SHAPE_COMPLEX_PRIVATE_HH #define HB_OT_SHAPE_COMPLEX_PRIVATE_HH -#include "hb-private.h" +#include "hb-private.hh" #include "hb-ot-shape-private.hh" diff --git a/src/hb-ot-shape-private.hh b/src/hb-ot-shape-private.hh index 1a5c6701d3898935fbd96519bbc689db9145787d..f334cda8055131b5df1dc423bbf2ecc229f1293a 100644 --- a/src/hb-ot-shape-private.hh +++ b/src/hb-ot-shape-private.hh @@ -27,7 +27,7 @@ #ifndef HB_OT_SHAPE_PRIVATE_HH #define HB_OT_SHAPE_PRIVATE_HH -#include "hb-private.h" +#include "hb-private.hh" #include "hb-ot-shape.h" diff --git a/src/hb-ot-tag.c b/src/hb-ot-tag.cc similarity index 99% rename from src/hb-ot-tag.c rename to src/hb-ot-tag.cc index f7e8c958980f91e5bd84ccfd3e289382b18e7fc4..7db1885e4b6a5052436142d03c5de584e9ae13e8 100644 --- a/src/hb-ot-tag.c +++ b/src/hb-ot-tag.cc @@ -24,7 +24,7 @@ * Red Hat Author(s): Behdad Esfahbod */ -#include "hb-private.h" +#include "hb-private.hh" #include "hb-ot.h" #include @@ -619,9 +619,9 @@ hb_ot_tag_from_language (hb_language_t language) } /* find a language matching in the first component */ - lang_tag = bsearch (lang_str, ot_languages, - ARRAY_LENGTH (ot_languages), sizeof (LangTag), - (hb_compare_func_t) lang_compare_first_component); + lang_tag = (LangTag *) bsearch (lang_str, ot_languages, + ARRAY_LENGTH (ot_languages), sizeof (LangTag), + (hb_compare_func_t) lang_compare_first_component); /* we now need to find the best language matching */ if (lang_tag) diff --git a/src/hb-private.h b/src/hb-private.hh similarity index 98% rename from src/hb-private.h rename to src/hb-private.hh index ae10b5d2c8c0124a40dc50bf41eb7aeb89d124c3..d08a4d07321d91ca679388e33cd5e018b4258d6e 100644 --- a/src/hb-private.h +++ b/src/hb-private.hh @@ -24,8 +24,8 @@ * Red Hat Author(s): Behdad Esfahbod */ -#ifndef HB_PRIVATE_H -#define HB_PRIVATE_H +#ifndef HB_PRIVATE_HH +#define HB_PRIVATE_HH #if HAVE_CONFIG_H #include "config.h" @@ -293,9 +293,9 @@ _hb_trace (const char *what, } -#include "hb-object-private.h" +#include "hb-object-private.hh" HB_END_DECLS -#endif /* HB_PRIVATE_H */ +#endif /* HB_PRIVATE_HH */ diff --git a/src/hb-shape.cc b/src/hb-shape.cc index 9d5d4181731ac9984f9b980ec1f5d4242be82542..66d951b6e508998fe509a7f14ec0af95606897c2 100644 --- a/src/hb-shape.cc +++ b/src/hb-shape.cc @@ -24,7 +24,7 @@ * Red Hat Author(s): Behdad Esfahbod */ -#include "hb-private.h" +#include "hb-private.hh" #include "hb-shape.h" diff --git a/src/hb-unicode-private.hh b/src/hb-unicode-private.hh index 67a60f5d114773c4f818a05e46055c0d07b35011..af15c041eecc95ab71fd36726303714c913dcbaa 100644 --- a/src/hb-unicode-private.hh +++ b/src/hb-unicode-private.hh @@ -31,7 +31,7 @@ #ifndef HB_UNICODE_PRIVATE_HH #define HB_UNICODE_PRIVATE_HH -#include "hb-private.h" +#include "hb-private.hh" #include "hb-unicode.h" diff --git a/src/hb-unicode.cc b/src/hb-unicode.cc index 9295be7e4e015a0fac9a7dfd4206905e1e198ba9..282a9b6c635091f8b4894f3f5dbaa5f619b7f541 100644 --- a/src/hb-unicode.cc +++ b/src/hb-unicode.cc @@ -28,7 +28,7 @@ * Google Author(s): Behdad Esfahbod */ -#include "hb-private.h" +#include "hb-private.hh" #include "hb-unicode-private.hh" diff --git a/src/hb-view.c b/src/hb-view.c index 60097b99adac3af1c7c17af0e681e28169f55e47..ac55908e51fe7aabfbc8d6683d475a24360ff351 100644 --- a/src/hb-view.c +++ b/src/hb-view.c @@ -42,6 +42,9 @@ #include #include +HB_BEGIN_DECLS + + /* Controlled by cmd-line options */ static int margin_t = 10; static int margin_b = 10; @@ -533,3 +536,6 @@ main (int argc, char **argv) return 0; } + + +HB_END_DECLS