Commit Graph

72 Commits

Author SHA1 Message Date
Behdad Esfahbod bea34c7cbb Further cleanup of DEFINE_SIZE 2010-05-10 17:28:16 -04:00
Behdad Esfahbod b3651231bf Remove ASSERT_SIZE in favor of the safer DEFINE_SIZE_STATIC 2010-05-10 16:59:57 -04:00
Behdad Esfahbod 569da92bc6 Cleanup ASSERT_SIZE_VAR 2010-05-10 16:46:36 -04:00
Behdad Esfahbod e45d3f86f9 Start cleaning up get_size()
So we know when the size is static and when dynamic.
2010-05-06 19:33:31 -04:00
Behdad Esfahbod b157617644 Remove the last of SANITIZE macros: SANITIZE_SELF 2010-05-06 14:48:27 -04:00
Behdad Esfahbod 4f252fedc7 Remove SANITIZE macro 2010-05-06 13:30:23 -04:00
Behdad Esfahbod 41a93d2c1f Remove SANITIZE_WITH_BASE 2010-05-06 12:55:14 -04:00
Behdad Esfahbod f5fab0c718 Remove SANITIZE_MEM 2010-05-06 10:26:52 -04:00
Behdad Esfahbod 1cd1e117d0 Remove SANITIZE_ARRAY 2010-05-05 20:15:14 -04:00
Behdad Esfahbod 583d7f9586 Cosmetic 2010-05-05 01:49:22 -04:00
Behdad Esfahbod 705e215268 Minor 2010-05-05 01:40:25 -04:00
Behdad Esfahbod 4169710911 Simplify chaining 2010-05-05 01:37:58 -04:00
Behdad Esfahbod 1911b9d21b Remove APPLY_ARG_DEF and APPLY_ARG 2010-05-05 01:32:04 -04:00
Behdad Esfahbod 6c42cddfe5 Port apply to use hb_trace_t 2010-05-05 01:30:48 -04:00
Behdad Esfahbod 969c9705ae Move context_length into apply_context 2010-05-05 01:23:44 -04:00
Behdad Esfahbod 94a23aaeca Move buffer into apply_context 2010-05-05 01:13:09 -04:00
Behdad Esfahbod 63493f956d Move layout_context into apply_context 2010-05-05 01:01:05 -04:00
Behdad Esfahbod fff9aa263d Minor 2010-05-05 00:32:21 -04:00
Behdad Esfahbod 39840474af Remove SANITIZE_ARG_DEF and SANITIZE_ARG 2010-05-05 00:23:19 -04:00
Behdad Esfahbod bb029af943 Remove SANITIZE_THIS 2010-05-04 15:28:52 -04:00
Behdad Esfahbod 4d4cce9626 Remove SANITIZE_THIS2 2010-05-04 14:57:55 -04:00
Behdad Esfahbod 26bfcb64e4 Cosmetic 2010-05-04 14:49:45 -04:00
Behdad Esfahbod be74284673 Remove SANITIZE_THIS3 2010-05-04 14:47:05 -04:00
Behdad Esfahbod 64d3fc8d0d Cosmetic: Rename HB_LIKELY/HB_UNLIKELY to likely/unlikely 2010-05-03 22:51:19 -04:00
Behdad Esfahbod 33d13fdda9 Rename HB_GNUC_UNUSED -> HB_UNUSED 2010-04-29 13:56:44 -04:00
Behdad Esfahbod 7d3a126334 Define HB_FUNC for portability to non-gcc 2010-04-29 13:54:01 -04:00
Behdad Esfahbod 6617eada95 Rename apply_context -> context 2010-04-29 02:25:30 -04:00
Behdad Esfahbod b4c7fab762 Rename 2010-04-29 02:24:25 -04:00
Behdad Esfahbod 1376fb7bf9 [apply] Use a context object to reduce number of parameters passed around 2010-04-29 02:19:21 -04:00
Behdad Esfahbod 173fde7087 Further simplify tracing 2010-04-29 01:47:30 -04:00
Behdad Esfahbod bc20045743 Simplify trace code 2010-04-29 01:40:26 -04:00
Behdad Esfahbod 807c5b03a2 [sanitize] Make debug code always available to the compiler
Such that we don't break debug build all the time.
2010-04-28 23:28:07 -04:00
Behdad Esfahbod 74e313c016 [gsubgpos] Make debug code always available to the compiler
Such that we don't break debug build all the time.
2010-04-28 15:15:09 -04:00
Behdad Esfahbod a92f0fda7f Fix debug build 2010-04-28 13:09:40 -04:00
Behdad Esfahbod efb324a46f Remove GET_FOR_DATA macros
The major-version check is now handled by sanitize.  If major
doesn't match, we reject and fall back to the Null object.
2010-04-23 16:28:27 -04:00
Behdad Esfahbod d632ec4000 Cosmetic 2010-04-22 18:42:05 -04:00
Behdad Esfahbod a3263aa773 Convert the last set of cast macros to templates 2010-04-22 18:42:01 -04:00
Behdad Esfahbod 3b2c2df41b Cleanup Extension sanitize() 2010-04-22 16:51:42 -04:00
Behdad Esfahbod 1856184b93 Fail sanitize on major version mismatch
We handle major-version differences via get_for_data(), so sanitize
should never see a major version mismatch.
2010-04-22 14:21:17 -04:00
Behdad Esfahbod 9fc8684fd8 Cleanup ContextFormat3 sanitize 2010-04-22 13:37:58 -04:00
Behdad Esfahbod 81f2af40f9 Simplify Extension offset now that our int types have no alignment 2010-04-22 00:58:49 -04:00
Behdad Esfahbod c755cb3e3a Change header comment 2010-04-22 00:11:43 -04:00
Behdad Esfahbod 0dfcc13a46 Rename ConstCharP to CharP (overloaded now) 2010-04-21 23:41:26 -04:00
Behdad Esfahbod 2cb08458f6 Rename const_array() to array() (overloaded) 2010-04-21 22:37:31 -04:00
Behdad Esfahbod e961c86c57 Convert NEXT() and ARRAY_AFTER() macros to templates 2010-04-21 15:56:11 -04:00
Behdad Esfahbod 198facdc55 Use templates for const char * casts 2010-04-21 13:35:36 -04:00
Behdad Esfahbod 1922ffe701 Const correctness 2010-04-21 04:52:11 -04:00
Behdad Esfahbod 0e206de986 Fix warnings 2010-04-21 01:48:41 -04:00
Behdad Esfahbod d5943407a4 Fix debug build 2010-04-21 01:42:11 -04:00
Behdad Esfahbod 4b8487d83e Fix the mystery bug!
A couple bugs joined forces to exhibit the mystery behavior of
crashes / infinite loops on OS X / wrong kerning / invalid memory
access.  Pooh!

The bugs were involved:

  - Wrong pointer math with ValueRecord in PairPosFormat1

  - Fallout from avoiding flex arrays, code not correctly updated
    to remove sizeof() usage.

We strictly never use sizeof() directly now.  And the PairPos code
is cleaned up.  Should fix them all.  Bugs are:

  Bug 605655 - Pango 1.26.2 introduces kerning bug
  Bug 611229 - Pango reads from uninitialized memory
  Bug 593240 - (pangoosx) Crash / infinite loop with Mac OS X

We were also doing wrong math converting Device adjustments to
hb_position_t.  Fallout from FreeType days.  Should shift 16, not
6.  Fixed that too.

There's still another bug: we don't sanitize Device records
referenced from value records.  Fixing that also.
2010-04-21 01:41:29 -04:00