summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/freetype/src/lzw
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2019-08-14 11:13:36 +0200
committerLiang Qi <liang.qi@qt.io>2019-10-30 08:48:18 +0100
commit58f56950848bae9c90da3873090c7698e0128b12 (patch)
tree0b3127cd313aaf34d59355deed2e2acc5341eff3 /src/3rdparty/freetype/src/lzw
parentc51ca1d1b232ce1d6eaa9c6dd85de127e825d3af (diff)
Update bundled Freetype to 2.10.1
[ChangeLog][Freetype] Upgraded bundled Freetype version to 2.10.1. Fixes: QTBUG-77466 Change-Id: I1de8b8b03e0ffd0b17eeafff1017df7c638c9279 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Diffstat (limited to 'src/3rdparty/freetype/src/lzw')
-rw-r--r--src/3rdparty/freetype/src/lzw/Jamfile2
-rw-r--r--src/3rdparty/freetype/src/lzw/ftlzw.c56
-rw-r--r--src/3rdparty/freetype/src/lzw/ftzopen.c48
-rw-r--r--src/3rdparty/freetype/src/lzw/ftzopen.h116
-rw-r--r--src/3rdparty/freetype/src/lzw/rules.mk2
5 files changed, 110 insertions, 114 deletions
diff --git a/src/3rdparty/freetype/src/lzw/Jamfile b/src/3rdparty/freetype/src/lzw/Jamfile
index cb83aa4a56..ba2d6ebb45 100644
--- a/src/3rdparty/freetype/src/lzw/Jamfile
+++ b/src/3rdparty/freetype/src/lzw/Jamfile
@@ -1,6 +1,6 @@
# FreeType 2 src/lzw Jamfile
#
-# Copyright 2004-2018 by
+# Copyright (C) 2004-2019 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/src/3rdparty/freetype/src/lzw/ftlzw.c b/src/3rdparty/freetype/src/lzw/ftlzw.c
index cb46f93c68..9805a1e3bd 100644
--- a/src/3rdparty/freetype/src/lzw/ftlzw.c
+++ b/src/3rdparty/freetype/src/lzw/ftlzw.c
@@ -1,25 +1,25 @@
-/***************************************************************************/
-/* */
-/* ftlzw.c */
-/* */
-/* FreeType support for .Z compressed files. */
-/* */
-/* This optional component relies on NetBSD's zopen(). It should mainly */
-/* be used to parse compressed PCF fonts, as found with many X11 server */
-/* distributions. */
-/* */
-/* Copyright 2004-2018 by */
-/* Albert Chin-A-Young. */
-/* */
-/* based on code in `src/gzip/ftgzip.c' */
-/* */
-/* This file is part of the FreeType project, and may only be used, */
-/* modified, and distributed under the terms of the FreeType project */
-/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
-/* this file you indicate that you have read the license and */
-/* understand and accept it fully. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * ftlzw.c
+ *
+ * FreeType support for .Z compressed files.
+ *
+ * This optional component relies on NetBSD's zopen(). It should mainly
+ * be used to parse compressed PCF fonts, as found with many X11 server
+ * distributions.
+ *
+ * Copyright (C) 2004-2019 by
+ * Albert Chin-A-Young.
+ *
+ * based on code in `src/gzip/ftgzip.c'
+ *
+ * This file is part of the FreeType project, and may only be used,
+ * modified, and distributed under the terms of the FreeType project
+ * license, LICENSE.TXT. By continuing to use, modify, or distribute
+ * this file you indicate that you have read the license and
+ * understand and accept it fully.
+ *
+ */
#include <ft2build.h>
#include FT_INTERNAL_MEMORY_H
@@ -42,10 +42,6 @@
#ifdef FT_CONFIG_OPTION_USE_LZW
-#ifdef FT_CONFIG_OPTION_PIC
-#error "lzw code does not support PIC yet"
-#endif
-
#include "ftzopen.h"
@@ -361,11 +357,11 @@
memory = source->memory;
/*
- * Check the header right now; this prevents allocation of a huge
- * LZWFile object (400 KByte of heap memory) if not necessary.
+ * Check the header right now; this prevents allocation of a huge
+ * LZWFile object (400 KByte of heap memory) if not necessary.
*
- * Did I mention that you should never use .Z compressed font
- * files?
+ * Did I mention that you should never use .Z compressed font
+ * files?
*/
error = ft_lzw_check_header( source );
if ( error )
diff --git a/src/3rdparty/freetype/src/lzw/ftzopen.c b/src/3rdparty/freetype/src/lzw/ftzopen.c
index 2b868ba9f2..67e6760f95 100644
--- a/src/3rdparty/freetype/src/lzw/ftzopen.c
+++ b/src/3rdparty/freetype/src/lzw/ftzopen.c
@@ -1,23 +1,23 @@
-/***************************************************************************/
-/* */
-/* ftzopen.c */
-/* */
-/* FreeType support for .Z compressed files. */
-/* */
-/* This optional component relies on NetBSD's zopen(). It should mainly */
-/* be used to parse compressed PCF fonts, as found with many X11 server */
-/* distributions. */
-/* */
-/* Copyright 2005-2018 by */
-/* David Turner. */
-/* */
-/* This file is part of the FreeType project, and may only be used, */
-/* modified, and distributed under the terms of the FreeType project */
-/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
-/* this file you indicate that you have read the license and */
-/* understand and accept it fully. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * ftzopen.c
+ *
+ * FreeType support for .Z compressed files.
+ *
+ * This optional component relies on NetBSD's zopen(). It should mainly
+ * be used to parse compressed PCF fonts, as found with many X11 server
+ * distributions.
+ *
+ * Copyright (C) 2005-2019 by
+ * David Turner.
+ *
+ * This file is part of the FreeType project, and may only be used,
+ * modified, and distributed under the terms of the FreeType project
+ * license, LICENSE.TXT. By continuing to use, modify, or distribute
+ * this file you indicate that you have read the license and
+ * understand and accept it fully.
+ *
+ */
#include "ftzopen.h"
#include FT_INTERNAL_MEMORY_H
@@ -167,11 +167,11 @@
new_size += new_size >> 2; /* don't grow too fast */
/*
- * Note that the `suffix' array is located in the same memory block
- * pointed to by `prefix'.
+ * Note that the `suffix' array is located in the same memory block
+ * pointed to by `prefix'.
*
- * I know that sizeof(FT_Byte) == 1 by definition, but it is clearer
- * to write it literally.
+ * I know that sizeof(FT_Byte) == 1 by definition, but it is clearer
+ * to write it literally.
*
*/
if ( FT_REALLOC_MULT( state->prefix, old_size, new_size,
diff --git a/src/3rdparty/freetype/src/lzw/ftzopen.h b/src/3rdparty/freetype/src/lzw/ftzopen.h
index 4fd267eb90..44fe36d6c5 100644
--- a/src/3rdparty/freetype/src/lzw/ftzopen.h
+++ b/src/3rdparty/freetype/src/lzw/ftzopen.h
@@ -1,23 +1,23 @@
-/***************************************************************************/
-/* */
-/* ftzopen.h */
-/* */
-/* FreeType support for .Z compressed files. */
-/* */
-/* This optional component relies on NetBSD's zopen(). It should mainly */
-/* be used to parse compressed PCF fonts, as found with many X11 server */
-/* distributions. */
-/* */
-/* Copyright 2005-2018 by */
-/* David Turner. */
-/* */
-/* This file is part of the FreeType project, and may only be used, */
-/* modified, and distributed under the terms of the FreeType project */
-/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
-/* this file you indicate that you have read the license and */
-/* understand and accept it fully. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * ftzopen.h
+ *
+ * FreeType support for .Z compressed files.
+ *
+ * This optional component relies on NetBSD's zopen(). It should mainly
+ * be used to parse compressed PCF fonts, as found with many X11 server
+ * distributions.
+ *
+ * Copyright (C) 2005-2019 by
+ * David Turner.
+ *
+ * This file is part of the FreeType project, and may only be used,
+ * modified, and distributed under the terms of the FreeType project
+ * license, LICENSE.TXT. By continuing to use, modify, or distribute
+ * this file you indicate that you have read the license and
+ * understand and accept it fully.
+ *
+ */
#ifndef FTZOPEN_H_
#define FTZOPEN_H_
@@ -27,9 +27,9 @@
/*
- * This is a complete re-implementation of the LZW file reader,
- * since the old one was incredibly badly written, using
- * 400 KByte of heap memory before decompressing anything.
+ * This is a complete re-implementation of the LZW file reader,
+ * since the old one was incredibly badly written, using
+ * 400 KByte of heap memory before decompressing anything.
*
*/
@@ -58,56 +58,56 @@
/*
- * state of LZW decompressor
+ * state of LZW decompressor
*
- * small technical note
- * --------------------
+ * small technical note
+ * --------------------
*
- * We use a few tricks in this implementation that are explained here to
- * ease debugging and maintenance.
+ * We use a few tricks in this implementation that are explained here to
+ * ease debugging and maintenance.
*
- * - First of all, the `prefix' and `suffix' arrays contain the suffix
- * and prefix for codes over 256; this means that
+ * - First of all, the `prefix' and `suffix' arrays contain the suffix
+ * and prefix for codes over 256; this means that
*
- * prefix_of(code) == state->prefix[code-256]
- * suffix_of(code) == state->suffix[code-256]
+ * prefix_of(code) == state->prefix[code-256]
+ * suffix_of(code) == state->suffix[code-256]
*
- * Each prefix is a 16-bit code, and each suffix an 8-bit byte.
+ * Each prefix is a 16-bit code, and each suffix an 8-bit byte.
*
- * Both arrays are stored in a single memory block, pointed to by
- * `state->prefix'. This means that the following equality is always
- * true:
+ * Both arrays are stored in a single memory block, pointed to by
+ * `state->prefix'. This means that the following equality is always
+ * true:
*
- * state->suffix == (FT_Byte*)(state->prefix + state->prefix_size)
+ * state->suffix == (FT_Byte*)(state->prefix + state->prefix_size)
*
- * Of course, state->prefix_size is the number of prefix/suffix slots
- * in the arrays, corresponding to codes 256..255+prefix_size.
+ * Of course, state->prefix_size is the number of prefix/suffix slots
+ * in the arrays, corresponding to codes 256..255+prefix_size.
*
- * - `free_ent' is the index of the next free entry in the `prefix'
- * and `suffix' arrays. This means that the corresponding `next free
- * code' is really `256+free_ent'.
+ * - `free_ent' is the index of the next free entry in the `prefix'
+ * and `suffix' arrays. This means that the corresponding `next free
+ * code' is really `256+free_ent'.
*
- * Moreover, `max_free' is the maximum value that `free_ent' can reach.
+ * Moreover, `max_free' is the maximum value that `free_ent' can reach.
*
- * `max_free' corresponds to `(1 << max_bits) - 256'. Note that this
- * value is always <= 0xFF00, which means that both `free_ent' and
- * `max_free' can be stored in an FT_UInt variable, even on 16-bit
- * machines.
+ * `max_free' corresponds to `(1 << max_bits) - 256'. Note that this
+ * value is always <= 0xFF00, which means that both `free_ent' and
+ * `max_free' can be stored in an FT_UInt variable, even on 16-bit
+ * machines.
*
- * If `free_ent == max_free', you cannot add new codes to the
- * prefix/suffix table.
+ * If `free_ent == max_free', you cannot add new codes to the
+ * prefix/suffix table.
*
- * - `num_bits' is the current number of code bits, starting at 9 and
- * growing each time `free_ent' reaches the value of `free_bits'. The
- * latter is computed as follows
+ * - `num_bits' is the current number of code bits, starting at 9 and
+ * growing each time `free_ent' reaches the value of `free_bits'. The
+ * latter is computed as follows
*
- * if num_bits < max_bits:
- * free_bits = (1 << num_bits)-256
- * else:
- * free_bits = max_free + 1
+ * if num_bits < max_bits:
+ * free_bits = (1 << num_bits)-256
+ * else:
+ * free_bits = max_free + 1
*
- * Since the value of `max_free + 1' can never be reached by
- * `free_ent', `num_bits' cannot grow larger than `max_bits'.
+ * Since the value of `max_free + 1' can never be reached by
+ * `free_ent', `num_bits' cannot grow larger than `max_bits'.
*/
typedef struct FT_LzwStateRec_
diff --git a/src/3rdparty/freetype/src/lzw/rules.mk b/src/3rdparty/freetype/src/lzw/rules.mk
index 18933c41c2..930b32e6b1 100644
--- a/src/3rdparty/freetype/src/lzw/rules.mk
+++ b/src/3rdparty/freetype/src/lzw/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright 2004-2018 by
+# Copyright (C) 2004-2019 by
# Albert Chin-A-Young.
#
# based on `src/lzw/rules.mk'