Commit Graph

77 Commits

Author SHA1 Message Date
Werner Lemberg 24d72a1b0b Don't use stdlib.h and friends directly.
Reported by Mickey Gabel <mickey@monfort.co.il>.

* src/base/ftdbgmem.c: s/<stdlib.h>/FT_CONFIG_STANDARD_LIBRARY_H/.

* src/gzip/ftgzip.c, src/lzw/ftlzw.c, src/raster/ftmisc.h:
s/<string.h>/FT_CONFIG_STANDARD_LIBRARY_H/.

* src/autofit/aftypes.h, src/autofit/afhints.c,
src/pshinter/pshalgo.c: s/<stdio.h>/FT_CONFIG_STANDARD_LIBRARY_H/

* src/lzw/ftlzw.c, src/base/ftdbgmem.c: Don't include stdio.h.
2009-01-13 17:34:48 +00:00
Werner Lemberg 2b0b4221ab Cosmetic code changes. 2008-05-28 22:17:28 +00:00
Werner Lemberg 1c8980ef4a * docs/CHANGES: Updated.
Formatting.
2007-05-25 07:11:12 +00:00
David Turner 3e2f953a10 real fix for bug #19910. the .Z format is really badly designed :-( 2007-05-22 13:10:59 +00:00
David Turner 0d0365ec59 avoid heap explosion in the case of malformed .Z font files
related to bug #19910, but not a bugfix yet
2007-05-22 09:53:44 +00:00
Werner Lemberg 4f3b5bbd95 * src/lzw/ftlzw2.c: Renamed to...
* src/lzw/ftlzw.c: This.

* src/lzw/Jamfile, src/lzw/rules.mk: Updated.

* builds/mac/FreeType.m68k_cfm.make.txt,
builds/mac/FreeType.m68k_far.make.txt,
builds/mac/FreeType.ppc_carbon.make.txt,
builds/mac/FreeType.ppc_classic.make.txt: Updated.
2006-05-04 07:13:05 +00:00
Werner Lemberg c6afa1221a * include/freetype/internal/ftmemory.h: s/new/newsz/ (for C++).
(FT_ALLOC): Remove redundant redefinition.

* builds/compiler/gcc-dev.mk (CFLAGS) [g++]: Don't use
`-Wstrict-prototypes'.

* src/base/ftstream.c (FT_Stream_EnterFrame): Add cast.

Formatting, copyright years.
2006-05-02 22:22:16 +00:00
David Turner 9ca782569c * include/freetype/internal/ftmemory.h, src/base/ftbitmap.c,
src/base/ftmac.c, src/base/ftrfork.c, src/lzw/ftzopen.c,
    src/raster/ftrend1.c, src/sfnt/ttpost.c, src/truetype/ttgxvar.c,
    src/type42/t42parse.c, src/winfonts/winfnt.c: hardening the code
    against out-of-bounds conditions when allocating arrays. This is
    for the cases where FT_NEW_ARRAY and FT_RENEW_ARRAY are not used
    already. Introducing the new FT_ALLOC_MULT and FT_REALLOC_MULT
    macros.
2006-05-02 09:00:29 +00:00
Werner Lemberg 50ef72b6e3 * src/lzw/ftlzw.c, src/lzw/zopen.c, src/lzw/zopen.h: Removed,
obsolete.
2006-04-29 07:02:36 +00:00
Werner Lemberg af16820a12 Normalize quotation to `...'. 2006-03-24 12:46:49 +00:00
Werner Lemberg 7f049f4221 Formatting, copyright years. 2006-02-25 16:52:16 +00:00
David Turner de271ab8f0 * builds/unix/ftsystem.c, include/freetype/config/ftheader.h,
include/freetype/internal/services/svotval.h,
    include/freetype/internal/services/svpfr.h,
    src/base/ftsystem.c, src/bdf/bdfdrivr.c, src/cache/ftcbasic.c,
    src/cff/cffcmap.c, src/gzip/ftgzip.c, src/lzw/ftlzw.c,
    src/lzw/ftlzw2.c, src/psaux/t1cmap.c, src/sfnt/ttbdf.c,
    src/smooth/ftgrays.c:

       solved -Wmissing-prototypes warnings with GCC
2006-02-25 14:53:02 +00:00
Werner Lemberg 84cacd2391 formatting, comment clean-up 2005-10-23 19:25:41 +00:00
David Turner 398d64c0cc * src/base/ftdbgmem.c: another realloc memory counting bug fix
* src/tools/Jamfile: adding missing file

  * src/lzw/Jamfile: fixing incorrect source file reference
2005-10-21 10:01:25 +00:00
Werner Lemberg 560d5fed38 Minor cleanups.
Copyright issues.
2005-10-21 09:08:28 +00:00
David Turner c1b6d08291 * src/base/ftdbgmem.c: fixes to better account for memory reallocations
* src/lzw/ftlzw2.c, src/lzw/ftzopen.h, src/lzw/ftzopen.c, src/lzw/rules.mk:
    first version of LZW loader re-implementation. Apparently, saves about
    260 KB of heap memory when loading tir24.pcf.Z
2005-10-20 15:33:34 +00:00
Werner Lemberg 60a04df7b0 Add license. 2005-06-04 23:04:30 +00:00
Werner Lemberg 22ad9ef024 Handle unsorted SFNT type 4 cmaps correctly (reported by Dirck
Blaskey).

* src/sfnt/ttcmap.h (TT_CMap): Add member `unsorted'.
* src/sfnt/ttcmac.c: Use SFNT_Err_Ok where appropriate.

(tt_cmap0_validate, tt_cmap2_validate, tt_cmap6_validate,
tt_cmap8_validate, tt_cmap10_validate, tt_cmap12_validate): Use
`FT_Error' as return type.
(tt_cmap4_validate): Use `FT_Error' as return type.
Return error code for unsorted cmap.
(tt_cmap4_char_index, tt_cmap4_char_next): Use old code for unsorted
cmaps.
(tt_face_build_cmaps): Set `unsorted' variable in cmap.


Minor formatting.
2005-05-09 22:11:36 +00:00
David Turner 750fa961c6 * Jamfile: removing otvalid from the list of compiled modules
* include/freetype/internal/ftserv.h: added compiler pragmas to get rid
    of annoying warnings with Visual C++ compiler in maximum warning mode

  * src/autofit/afhints.c, src/autofit/aflatin.c, src/base/ftstroke.c,
    src/bdf/bdfdrivr.c, src/cache/ftcbasic.c, src/cache/ftccmap.c,
    src/cache/ftcmanag.c, src/cff/cffload.c, src/cid/cidload.c,
    src/lzw/zopen.c, src/otvalid/otvgdef.c, src/pcf/pcfread.c,
    src/sfnt/sfobjs.c, src/truetype/ttgxvar.c: removing compiler warnings
2005-05-01 10:11:32 +00:00
Werner Lemberg ebf5585dd0 Formatting. 2005-03-16 01:49:54 +00:00
David Turner 68df4f732d * src/bdf/bdflib.c: various improvements to the bdf loader, mainly
used to reduce the amount of heap size required to only test wether
    we're dealing with a BDF font (the old code allocated 64 Kb right
    before any test).

    * src/lzw/ftlzw.c (FT_Stream_OpenLZW): modified the function to check
    the LZW header before doing anything else. This helps avoid un-necessary
    heap allocations (400 Kb of heap memory for the LZW decoder ! Oh my !)

    * src/gzip/ftgzip.c (FT_Stream_OpenGZip): ditto for the .gz decoder,
    though the code savings is smaller.
2005-03-15 18:18:57 +00:00
Werner Lemberg f9b44e30b5 * src/lzw/zopen.c: Comment out inclusion of `signal.h' and `unistd.h'. 2004-06-15 13:57:00 +00:00
David Turner 10bf05a31d * src/cff/cffobjs.c (cff_face_init): fixed a small memory leak
* src/autofit/afloader.c, src/autofit/afmodule.c, src/base/ftdebug.c:
        removed compiler warnings

        * src/autofit/aftypes.h, src/lzw/zopen.c, src/pcf/pcfdrivr.c,
        src/pcf/pcfread.c, src/psaux/psobjs.c, src/type42/t42drivr.c:
        changed data arrays to "const" to avoid populating the ".data"
        segment
2004-04-21 14:30:37 +00:00
Antoine Leca 497cc7c4bf Jamfile to bring in the new lzw module.
My first try at this exercise, please report problems, I lack experience!  Antoine
2004-04-12 18:09:00 +00:00
Werner Lemberg 161438c5b6 * src/lzw/zopen.c: Don't include sys/param.h and sys/stat.h. 2004-04-12 15:31:30 +00:00
Werner Lemberg 391de1a63e * src/lzw/ftlzw.c: Include zopen.h dependent on
FT_CONFIG_OPTION_USE_LZW.

* src/base/ftdebug.c: s/index/idx/ to avoid compiler warnings.
2004-04-11 16:44:54 +00:00
Werner Lemberg 6ea2054fd2 Initial revision 2004-03-05 10:07:37 +00:00