summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2000-06-29 22:14:53 +0000
committerOwen Taylor <otaylor@src.gnome.org>2000-06-29 22:14:53 +0000
commit05d75f6af2c01efff9af74f4c2151352e91c0f99 (patch)
treeec8f00bf1ffa4a1ccd436093e4f2caba71fa1fd1
parent4e005cf17476ee08c73e7a1a2fb1133d9008be15 (diff)
downloadpango-05d75f6af2c01efff9af74f4c2151352e91c0f99.tar.gz
Fix various aspects of expanding coverage tables beyond the first 256
Thu Jun 29 18:13:47 2000 Owen Taylor <otaylor@redhat.com> * pango/pango-coverage.c: Fix various aspects of expanding coverage tables beyond the first 256 blocks. (Based on patch from ChiDeok Hwang.)
-rw-r--r--ChangeLog6
-rw-r--r--ChangeLog.pre-1-06
-rw-r--r--ChangeLog.pre-1-106
-rw-r--r--ChangeLog.pre-1-26
-rw-r--r--ChangeLog.pre-1-46
-rw-r--r--ChangeLog.pre-1-66
-rw-r--r--ChangeLog.pre-1-86
-rw-r--r--pango/pango-coverage.c25
8 files changed, 55 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index 7176ff87..dc99f44c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Thu Jun 29 18:13:47 2000 Owen Taylor <otaylor@redhat.com>
+
+ * pango/pango-coverage.c: Fix various aspects of expanding
+ coverage tables beyond the first 256 blocks. (Based on
+ patch from ChiDeok Hwang.)
+
Thu Jun 29 16:35:41 2000 Owen Taylor <otaylor@redhat.com>
* modules/arabic/{*.c,Makefile.am}: New version from Karl
diff --git a/ChangeLog.pre-1-0 b/ChangeLog.pre-1-0
index 7176ff87..dc99f44c 100644
--- a/ChangeLog.pre-1-0
+++ b/ChangeLog.pre-1-0
@@ -1,3 +1,9 @@
+Thu Jun 29 18:13:47 2000 Owen Taylor <otaylor@redhat.com>
+
+ * pango/pango-coverage.c: Fix various aspects of expanding
+ coverage tables beyond the first 256 blocks. (Based on
+ patch from ChiDeok Hwang.)
+
Thu Jun 29 16:35:41 2000 Owen Taylor <otaylor@redhat.com>
* modules/arabic/{*.c,Makefile.am}: New version from Karl
diff --git a/ChangeLog.pre-1-10 b/ChangeLog.pre-1-10
index 7176ff87..dc99f44c 100644
--- a/ChangeLog.pre-1-10
+++ b/ChangeLog.pre-1-10
@@ -1,3 +1,9 @@
+Thu Jun 29 18:13:47 2000 Owen Taylor <otaylor@redhat.com>
+
+ * pango/pango-coverage.c: Fix various aspects of expanding
+ coverage tables beyond the first 256 blocks. (Based on
+ patch from ChiDeok Hwang.)
+
Thu Jun 29 16:35:41 2000 Owen Taylor <otaylor@redhat.com>
* modules/arabic/{*.c,Makefile.am}: New version from Karl
diff --git a/ChangeLog.pre-1-2 b/ChangeLog.pre-1-2
index 7176ff87..dc99f44c 100644
--- a/ChangeLog.pre-1-2
+++ b/ChangeLog.pre-1-2
@@ -1,3 +1,9 @@
+Thu Jun 29 18:13:47 2000 Owen Taylor <otaylor@redhat.com>
+
+ * pango/pango-coverage.c: Fix various aspects of expanding
+ coverage tables beyond the first 256 blocks. (Based on
+ patch from ChiDeok Hwang.)
+
Thu Jun 29 16:35:41 2000 Owen Taylor <otaylor@redhat.com>
* modules/arabic/{*.c,Makefile.am}: New version from Karl
diff --git a/ChangeLog.pre-1-4 b/ChangeLog.pre-1-4
index 7176ff87..dc99f44c 100644
--- a/ChangeLog.pre-1-4
+++ b/ChangeLog.pre-1-4
@@ -1,3 +1,9 @@
+Thu Jun 29 18:13:47 2000 Owen Taylor <otaylor@redhat.com>
+
+ * pango/pango-coverage.c: Fix various aspects of expanding
+ coverage tables beyond the first 256 blocks. (Based on
+ patch from ChiDeok Hwang.)
+
Thu Jun 29 16:35:41 2000 Owen Taylor <otaylor@redhat.com>
* modules/arabic/{*.c,Makefile.am}: New version from Karl
diff --git a/ChangeLog.pre-1-6 b/ChangeLog.pre-1-6
index 7176ff87..dc99f44c 100644
--- a/ChangeLog.pre-1-6
+++ b/ChangeLog.pre-1-6
@@ -1,3 +1,9 @@
+Thu Jun 29 18:13:47 2000 Owen Taylor <otaylor@redhat.com>
+
+ * pango/pango-coverage.c: Fix various aspects of expanding
+ coverage tables beyond the first 256 blocks. (Based on
+ patch from ChiDeok Hwang.)
+
Thu Jun 29 16:35:41 2000 Owen Taylor <otaylor@redhat.com>
* modules/arabic/{*.c,Makefile.am}: New version from Karl
diff --git a/ChangeLog.pre-1-8 b/ChangeLog.pre-1-8
index 7176ff87..dc99f44c 100644
--- a/ChangeLog.pre-1-8
+++ b/ChangeLog.pre-1-8
@@ -1,3 +1,9 @@
+Thu Jun 29 18:13:47 2000 Owen Taylor <otaylor@redhat.com>
+
+ * pango/pango-coverage.c: Fix various aspects of expanding
+ coverage tables beyond the first 256 blocks. (Based on
+ patch from ChiDeok Hwang.)
+
Thu Jun 29 16:35:41 2000 Owen Taylor <otaylor@redhat.com>
* modules/arabic/{*.c,Makefile.am}: New version from Karl
diff --git a/pango/pango-coverage.c b/pango/pango-coverage.c
index 4445705d..6a5ce4d2 100644
--- a/pango/pango-coverage.c
+++ b/pango/pango-coverage.c
@@ -61,14 +61,8 @@ pango_coverage_new (void)
PangoCoverage *coverage = g_new (PangoCoverage, 1);
coverage->n_blocks = N_BLOCKS_INCREMENT;
- coverage->blocks = g_new (PangoBlockInfo, coverage->n_blocks);
+ coverage->blocks = g_new0 (PangoBlockInfo, coverage->n_blocks);
coverage->ref_count = 1;
-
- for (i=0; i<coverage->n_blocks; i++)
- {
- coverage->blocks[i].data = NULL;
- coverage->blocks[i].level = PANGO_COVERAGE_NONE;
- }
return coverage;
}
@@ -87,10 +81,11 @@ PangoCoverage *
pango_coverage_copy (PangoCoverage *coverage)
{
int i;
- PangoCoverage *result = g_new (PangoCoverage, 1);
+ PangoCoverage *result;
g_return_val_if_fail (coverage != NULL, NULL);
-
+
+ result = g_new (PangoCoverage, 1);
result->n_blocks = coverage->n_blocks;
result->blocks = g_new (PangoBlockInfo, coverage->n_blocks);
result->ref_count = 1;
@@ -215,8 +210,14 @@ void pango_coverage_set (PangoCoverage *coverage,
if (block_index > coverage->n_blocks)
{
- coverage->n_blocks += N_BLOCKS_INCREMENT;
+ int old_n_blocks = coverage->n_blocks;
+
+ coverage->n_blocks =
+ N_BLOCKS_INCREMENT * ((block_index + N_BLOCKS_INCREMENT - 1) / N_BLOCKS_INCREMENT);
+
coverage->blocks = g_renew (PangoBlockInfo, coverage->blocks, coverage->n_blocks);
+ memset (coverage->blocks + old_n_blocks, 0,
+ sizeof (PangoBlockInfo) * (coverage->n_blocks - old_n_blocks));
}
data = coverage->blocks[block_index].data;
@@ -264,9 +265,9 @@ void pango_coverage_max (PangoCoverage *coverage,
if (other->n_blocks > coverage->n_blocks)
{
- coverage->n_blocks += N_BLOCKS_INCREMENT;
+ coverage->n_blocks = other->n_blocks;
coverage->blocks = g_renew (PangoBlockInfo, coverage->blocks, coverage->n_blocks);
-
+
for (block_index = old_blocks; block_index < coverage->n_blocks; block_index++)
{
if (other->blocks[block_index].data)