提交 c605bbbb 编写于 作者: B Behdad Esfahbod

Remove C++ guards from source files

Where causing issues for people with MSVC.
上级 8336186a
......@@ -7,10 +7,9 @@ test -z "$srcdir" && srcdir=.
stat=0
test "x$HBHEADERS" = x && HBHEADERS=`find . -maxdepth 1 -name 'hb*.h'`
test "x$HBSOURCES" = x && HBSOURCES=`find . -maxdepth 1 -name 'hb-*.cc' -or -name 'hb-*.hh'`
for x in $HBHEADERS $HBSOURCES; do
for x in $HBHEADERS; do
test -f $srcdir/$x && x=$srcdir/$x
if ! grep -q HB_BEGIN_DECLS "$x" || ! grep -q HB_END_DECLS "$x"; then
echo "Ouch, file $x does not HB_BEGIN_DECLS / HB_END_DECLS"
......
......@@ -39,7 +39,6 @@
#include <stdio.h>
#include <errno.h>
HB_BEGIN_DECLS
#ifndef HB_DEBUG_BLOB
......@@ -322,4 +321,3 @@ _try_writable (hb_blob_t *blob)
}
HB_END_DECLS
......@@ -35,7 +35,6 @@
#include "hb-object-private.hh"
#include "hb-unicode-private.hh"
HB_BEGIN_DECLS
ASSERT_STATIC (sizeof (hb_glyph_info_t) == 20);
......@@ -149,6 +148,5 @@ struct _hb_buffer_t {
HB_BUFFER_XALLOCATE_VAR (b, deallocate_var, var (), #var)
HB_END_DECLS
#endif /* HB_BUFFER_PRIVATE_HH */
......@@ -31,7 +31,6 @@
#include <string.h>
HB_BEGIN_DECLS
#ifndef HB_DEBUG_BUFFER
......@@ -788,4 +787,3 @@ hb_buffer_add_utf32 (hb_buffer_t *buffer,
}
HB_END_DECLS
......@@ -35,7 +35,6 @@
#include <locale.h>
HB_BEGIN_DECLS
/* hb_tag_t */
......@@ -357,4 +356,3 @@ hb_version_check (unsigned int major,
}
HB_END_DECLS
......@@ -34,7 +34,6 @@
#include "hb-font.h"
#include "hb-object-private.hh"
HB_BEGIN_DECLS
/*
......@@ -159,6 +158,5 @@ struct _hb_font_t {
};
HB_END_DECLS
#endif /* HB_FONT_PRIVATE_HH */
......@@ -34,7 +34,6 @@
#include <string.h>
HB_BEGIN_DECLS
/*
......@@ -920,4 +919,3 @@ hb_font_get_ppem (hb_font_t *font,
}
HB_END_DECLS
......@@ -33,7 +33,6 @@
#include FT_TRUETYPE_TABLES_H
HB_BEGIN_DECLS
/* TODO:
......@@ -344,4 +343,3 @@ hb_ft_font_create (FT_Face ft_face,
}
HB_END_DECLS
......@@ -34,7 +34,6 @@
#include <glib.h>
HB_BEGIN_DECLS
#if !GLIB_CHECK_VERSION(2,29,14)
static const hb_script_t
......@@ -347,4 +346,3 @@ hb_glib_get_unicode_funcs (void)
}
HB_END_DECLS
......@@ -38,7 +38,6 @@
#include <unicode/unorm.h>
#include <unicode/unistr.h>
HB_BEGIN_DECLS
hb_script_t
......@@ -292,4 +291,3 @@ hb_icu_get_unicode_funcs (void)
}
HB_END_DECLS
......@@ -34,7 +34,6 @@
#include "hb-private.hh"
HB_BEGIN_DECLS
/* mutex */
......@@ -107,6 +106,5 @@ struct hb_static_mutex_t : hb_mutex_t
};
HB_END_DECLS
#endif /* HB_MUTEX_PRIVATE_HH */
......@@ -36,7 +36,6 @@
#include "hb-mutex-private.hh"
HB_BEGIN_DECLS
/* Debug */
......@@ -200,7 +199,6 @@ struct _hb_object_header_t {
};
HB_END_DECLS
/* object */
......@@ -252,9 +250,7 @@ static inline void *hb_object_get_user_data (Type *obj,
}
HB_BEGIN_DECLS
HB_END_DECLS
#endif /* HB_OBJECT_PRIVATE_HH */
......@@ -29,7 +29,6 @@
#include "hb-open-type-private.hh"
HB_BEGIN_DECLS
/*
......@@ -253,6 +252,5 @@ struct OpenTypeFontFile
};
HB_END_DECLS
#endif /* HB_OPEN_FILE_PRIVATE_HH */
......@@ -31,8 +31,6 @@
#include "hb-blob.h"
HB_BEGIN_DECLS
HB_END_DECLS
/*
......@@ -702,7 +700,5 @@ struct SortedArrayOf : ArrayOf<Type> {
};
HB_BEGIN_DECLS
HB_END_DECLS
#endif /* HB_OPEN_TYPE_PRIVATE_HH */
......@@ -29,7 +29,6 @@
#include "hb-open-type-private.hh"
HB_BEGIN_DECLS
/*
......@@ -140,6 +139,5 @@ struct head
};
HB_END_DECLS
#endif /* HB_OT_HEAD_PRIVATE_HH */
......@@ -38,8 +38,6 @@
#define NOT_COVERED ((unsigned int) 0x110000)
#define MAX_NESTING_LEVEL 8
HB_BEGIN_DECLS
HB_END_DECLS
/*
......@@ -594,7 +592,5 @@ struct Device
};
HB_BEGIN_DECLS
HB_END_DECLS
#endif /* HB_OT_LAYOUT_COMMON_PRIVATE_HH */
......@@ -33,7 +33,6 @@
#include "hb-font-private.hh"
HB_BEGIN_DECLS
/*
......@@ -424,6 +423,5 @@ struct GDEF
};
HB_END_DECLS
#endif /* HB_OT_LAYOUT_GDEF_PRIVATE_HH */
......@@ -31,7 +31,6 @@
#include "hb-ot-layout-gsubgpos-private.hh"
HB_BEGIN_DECLS
/* buffer **position** var allocations */
......@@ -1305,9 +1304,7 @@ struct MarkMarkPos
};
HB_BEGIN_DECLS
static inline bool position_lookup (hb_apply_context_t *c, unsigned int lookup_index);
HB_END_DECLS
struct ContextPos : Context
{
......@@ -1632,6 +1629,5 @@ static inline bool position_lookup (hb_apply_context_t *c, unsigned int lookup_i
#undef cursive_chain
HB_END_DECLS
#endif /* HB_OT_LAYOUT_GPOS_PRIVATE_HH */
......@@ -31,7 +31,6 @@
#include "hb-ot-layout-gsubgpos-private.hh"
HB_BEGIN_DECLS
struct SingleSubstFormat1
......@@ -524,9 +523,7 @@ struct LigatureSubst
};
HB_BEGIN_DECLS
static inline bool substitute_lookup (hb_apply_context_t *c, unsigned int lookup_index);
HB_END_DECLS
struct ContextSubst : Context
{
......@@ -942,6 +939,5 @@ static inline bool substitute_lookup (hb_apply_context_t *c, unsigned int lookup
}
HB_END_DECLS
#endif /* HB_OT_LAYOUT_GSUB_PRIVATE_HH */
......@@ -32,7 +32,6 @@
#include "hb-buffer-private.hh"
#include "hb-ot-layout-gdef-private.hh"
HB_BEGIN_DECLS
/* buffer var allocations */
#define lig_id() var2.u8[2] /* unique ligature id */
......@@ -54,7 +53,6 @@ static inline uint8_t allocate_lig_id (hb_buffer_t *buffer) {
hb_auto_trace_t<HB_DEBUG_APPLY> trace (&c->debug_depth, "APPLY", this, NULL, HB_FUNC);
HB_BEGIN_DECLS
struct hb_apply_context_t
{
......@@ -210,7 +208,6 @@ static inline bool match_lookahead (hb_apply_context_t *c,
return true;
}
HB_END_DECLS
struct LookupRecord
......@@ -229,7 +226,6 @@ struct LookupRecord
};
HB_BEGIN_DECLS
static inline bool apply_lookup (hb_apply_context_t *c,
unsigned int count, /* Including the first glyph */
......@@ -287,7 +283,6 @@ static inline bool apply_lookup (hb_apply_context_t *c,
return true;
}
HB_END_DECLS
/* Contextual lookups */
......@@ -984,6 +979,5 @@ struct GSUBGPOS
};
HB_END_DECLS
#endif /* HB_OT_LAYOUT_GSUBGPOS_PRIVATE_HH */
......@@ -34,7 +34,6 @@
#include "hb-font-private.hh"
#include "hb-buffer-private.hh"
HB_BEGIN_DECLS
/*
......@@ -104,6 +103,5 @@ HB_INTERNAL void
_hb_ot_layout_destroy (hb_ot_layout_t *layout);
HB_END_DECLS
#endif /* HB_OT_LAYOUT_PRIVATE_HH */
......@@ -40,7 +40,6 @@
#include <stdlib.h>
#include <string.h>
HB_BEGIN_DECLS
hb_ot_layout_t *
......@@ -517,4 +516,3 @@ _hb_ot_layout_get_upem (hb_face_t *face)
}
HB_END_DECLS
......@@ -33,7 +33,6 @@
#include "hb-ot-layout.h"
HB_BEGIN_DECLS
static const hb_tag_t table_tags[2] = {HB_OT_TAG_GSUB, HB_OT_TAG_GPOS};
......@@ -188,6 +187,5 @@ struct hb_ot_map_builder_t
};
HB_END_DECLS
#endif /* HB_OT_MAP_PRIVATE_HH */
......@@ -30,7 +30,6 @@
#include "hb-ot-shape-private.hh"
HB_BEGIN_DECLS
void
......@@ -273,4 +272,3 @@ hb_ot_map_builder_t::compile (hb_face_t *face,
}
HB_END_DECLS
......@@ -29,7 +29,6 @@
#include "hb-open-type-private.hh"
HB_BEGIN_DECLS
/*
......@@ -63,6 +62,5 @@ struct maxp
};
HB_END_DECLS
#endif /* HB_OT_MAXP_PRIVATE_HH */
......@@ -29,7 +29,6 @@
#include "hb-private.hh"
HB_BEGIN_DECLS
/* == Start of generated table == */
/*
......@@ -755,6 +754,5 @@ static const uint8_t joining_table[] =
/* == End of generated table == */
HB_END_DECLS
#endif /* HB_OT_SHAPE_COMPLEX_ARABIC_TABLE_HH */
......@@ -26,7 +26,6 @@
#include "hb-ot-shape-complex-private.hh"
HB_BEGIN_DECLS
/* buffer var allocations */
......@@ -229,4 +228,3 @@ _hb_ot_shape_complex_setup_masks_arabic (hb_ot_map_t *map, hb_buffer_t *buffer)
}
HB_END_DECLS
......@@ -29,7 +29,6 @@
#include "hb-private.hh"
HB_BEGIN_DECLS
/* == Start of generated table == */
/*
......@@ -827,6 +826,5 @@ get_indic_categories (hb_codepoint_t u)
/* == End of generated table == */
HB_END_DECLS
#endif /* HB_OT_SHAPE_COMPLEX_INDIC_TABLE_HH */
......@@ -26,7 +26,6 @@
#include "hb-ot-shape-complex-private.hh"
HB_BEGIN_DECLS
/* buffer var allocations */
......@@ -760,4 +759,3 @@ final_reordering (const hb_ot_map_t *map,
HB_END_DECLS
......@@ -26,7 +26,6 @@
#include "hb-ot-shape-complex-private.hh"
HB_BEGIN_DECLS
/* TODO Add kana, hangul, and other small sahpers here */
......@@ -54,4 +53,3 @@ _hb_ot_shape_complex_setup_masks_default (hb_ot_map_t *map, hb_buffer_t *buffer)
}
HB_END_DECLS
......@@ -31,7 +31,6 @@
#include "hb-ot-map-private.hh"
HB_BEGIN_DECLS
/* buffer var allocations, used during the entire shaping process */
......@@ -210,6 +209,5 @@ hb_ot_shape_complex_setup_masks (hb_ot_complex_shaper_t shaper,
}
HB_END_DECLS
#endif /* HB_OT_SHAPE_COMPLEX_PRIVATE_HH */
......@@ -27,7 +27,6 @@
#include "hb-ot-shape-private.hh"
#include "hb-ot-shape-complex-private.hh"
HB_BEGIN_DECLS
/*
* HIGHLEVEL DESIGN:
......@@ -275,4 +274,3 @@ _hb_ot_shape_normalize (hb_ot_shape_context_t *c)
}
HB_END_DECLS
......@@ -34,7 +34,6 @@
#include "hb-ot-map-private.hh"
#include "hb-ot-shape-complex-private.hh"
HB_BEGIN_DECLS
enum hb_ot_complex_shaper_t;
......@@ -110,6 +109,5 @@ HB_INTERNAL void _hb_set_unicode_props (hb_buffer_t *buffer);
HB_INTERNAL void _hb_ot_shape_normalize (hb_ot_shape_context_t *c);
HB_END_DECLS
#endif /* HB_OT_SHAPE_PRIVATE_HH */
......@@ -31,7 +31,6 @@
#include "hb-font-private.hh"
HB_BEGIN_DECLS
hb_tag_t common_features[] = {
......@@ -442,4 +441,3 @@ hb_ot_shape (hb_font_t *font,
}
HB_END_DECLS
......@@ -31,7 +31,6 @@
#include <string.h>
HB_BEGIN_DECLS
/* hb_script_t */
......@@ -701,4 +700,3 @@ hb_ot_tag_to_language (hb_tag_t tag)
}
HB_END_DECLS
......@@ -48,7 +48,6 @@
#include <errno.h>
#include <stdarg.h>
HB_BEGIN_DECLS
/* Essentials */
......@@ -66,7 +65,6 @@ HB_BEGIN_DECLS
/* Basics */
HB_END_DECLS
#undef MIN
template <typename Type> static inline Type MIN (const Type &a, const Type &b) { return a < b ? a : b; }
......@@ -74,7 +72,6 @@ template <typename Type> static inline Type MIN (const Type &a, const Type &b) {
#undef MAX
template <typename Type> static inline Type MAX (const Type &a, const Type &b) { return a > b ? a : b; }
HB_BEGIN_DECLS
#undef ARRAY_LENGTH
#define ARRAY_LENGTH(__array) ((signed int) (sizeof (__array) / sizeof (__array[0])))
......@@ -230,7 +227,6 @@ _hb_unsigned_int_mul_overflows (unsigned int count, unsigned int size)
typedef int (*hb_compare_func_t) (const void *, const void *);
HB_END_DECLS
/* arrays and maps */
......@@ -423,7 +419,6 @@ struct hb_lockable_set_t
};
HB_BEGIN_DECLS
/* Big-endian handling */
......@@ -470,7 +465,6 @@ static inline unsigned char TOLOWER (unsigned char c)
/* Debug */
HB_END_DECLS
#ifndef HB_DEBUG
#define HB_DEBUG 0
......@@ -625,8 +619,6 @@ hb_bubble_sort (T *array, unsigned int len, int(*compar)(const T *, const T *))
}
HB_BEGIN_DECLS
HB_END_DECLS
#endif /* HB_PRIVATE_HH */
......@@ -36,7 +36,6 @@
#include "hb-graphite.h"
#endif
HB_BEGIN_DECLS
static void
......@@ -90,4 +89,3 @@ hb_shape (hb_font_t *font,
}
HB_END_DECLS
......@@ -36,7 +36,6 @@
#include "hb-unicode.h"
#include "hb-object-private.hh"
HB_BEGIN_DECLS
/*
......@@ -104,6 +103,5 @@ extern HB_INTERNAL hb_unicode_funcs_t _hb_unicode_funcs_nil;
HB_END_DECLS
#endif /* HB_UNICODE_PRIVATE_HH */
......@@ -32,7 +32,6 @@
#include "hb-unicode-private.hh"
HB_BEGIN_DECLS
/*
......@@ -271,4 +270,3 @@ hb_unicode_decompose (hb_unicode_funcs_t *ufuncs,
return ufuncs->func.decompose (ufuncs, ab, a, b, ufuncs->user_data.decompose);
}
HB_END_DECLS
......@@ -39,7 +39,6 @@
#include <windows.h>
#include <usp10.h>
HB_BEGIN_DECLS
#ifndef HB_DEBUG_UNISCRIBE
......@@ -322,4 +321,3 @@ retry:
}
HB_END_DECLS
......@@ -42,7 +42,6 @@
#include <cairo-ft.h>
#include <hb-ft.h>
HB_BEGIN_DECLS
/* Controlled by cmd-line options */
......@@ -567,4 +566,3 @@ main (int argc, char **argv)
}
HB_END_DECLS
......@@ -36,7 +36,6 @@
#include <stdlib.h>
#include <stdio.h>
HB_BEGIN_DECLS
int
......@@ -194,4 +193,3 @@ main (int argc, char **argv)
}
HB_END_DECLS
......@@ -37,7 +37,6 @@
#include <stdlib.h>
#include <stdio.h>
HB_BEGIN_DECLS
int
......@@ -97,4 +96,3 @@ main (int argc, char **argv)
}
HB_END_DECLS
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册