Commit c6356356 authored by Morten Welinder's avatar Morten Welinder Committed by Morten Welinder

Fix for large ranges.

2001-10-29  Morten Welinder  <terra@diku.dk>

	* src/eval.c (add_range_dep): Fix for large ranges.
parent 5366cac5
2001-10-29 Morten Welinder <terra@diku.dk>
* src/eval.c (add_range_dep): Fix for large ranges.
2001-10-29 Jody Goldberg <jgoldberg@home.com>
* src/number-match.c (format_create_regexp) : escape escaped
......
......@@ -2,6 +2,7 @@ Gnumeric 0.74
Morten:
* Find and fix leaks.
* Fix an ugly dependency bug.
--------------------------------------------------------------------------
Gnumeric 0.73
......
2001-10-29 Morten Welinder <terra@diku.dk>
* src/eval.c (add_range_dep): Fix for large ranges.
2001-10-29 Jody Goldberg <jgoldberg@home.com>
* src/number-match.c (format_create_regexp) : escape escaped
......
2001-10-29 Morten Welinder <terra@diku.dk>
* src/eval.c (add_range_dep): Fix for large ranges.
2001-10-29 Jody Goldberg <jgoldberg@home.com>
* src/number-match.c (format_create_regexp) : escape escaped
......
2001-10-29 Morten Welinder <terra@diku.dk>
* src/eval.c (add_range_dep): Fix for large ranges.
2001-10-29 Jody Goldberg <jgoldberg@home.com>
* src/number-match.c (format_create_regexp) : escape escaped
......
......@@ -419,13 +419,13 @@ add_range_dep (DependencyContainer *deps, Dependent *dependent,
GSList const *cl = g_slist_find (result->dependent_list,
dependent);
if (cl)
return;
continue;
/* It was not: add it */
result->dependent_list = g_slist_prepend (result->dependent_list,
dependent);
return;
continue;
}
}
......@@ -445,12 +445,12 @@ drop_range_dep (DependencyContainer *deps, Dependent *dependent,
int i = r->range.start.row / BUCKET_SIZE;
int const end = r->range.end.row / BUCKET_SIZE;
if (!deps)
return;
for ( ; i <= end; i++) {
DependencyRange *result;
if (!deps)
return;
result = g_hash_table_lookup (deps->range_hash[i], r);
if (result) {
result->dependent_list =
......@@ -1257,7 +1257,8 @@ sheet_dump_dependencies (Sheet const *sheet)
for (i = (SHEET_MAX_ROWS-1)/BUCKET_SIZE; i >= 0 ; i--) {
GHashTable *hash = sheet->deps->range_hash[i];
if (hash != NULL && g_hash_table_size (hash) > 0) {
printf ("Range hash size %d: range over which cells in list depend\n",
printf ("Bucket %d (%d-%d): Range hash size %d: range over which cells in list depend\n",
i, i * BUCKET_SIZE, (i + 1) * BUCKET_SIZE - 1,
g_hash_table_size (hash));
g_hash_table_foreach (hash,
dump_range_dep, NULL);
......
......@@ -419,13 +419,13 @@ add_range_dep (DependencyContainer *deps, Dependent *dependent,
GSList const *cl = g_slist_find (result->dependent_list,
dependent);
if (cl)
return;
continue;
/* It was not: add it */
result->dependent_list = g_slist_prepend (result->dependent_list,
dependent);
return;
continue;
}
}
......@@ -445,12 +445,12 @@ drop_range_dep (DependencyContainer *deps, Dependent *dependent,
int i = r->range.start.row / BUCKET_SIZE;
int const end = r->range.end.row / BUCKET_SIZE;
if (!deps)
return;
for ( ; i <= end; i++) {
DependencyRange *result;
if (!deps)
return;
result = g_hash_table_lookup (deps->range_hash[i], r);
if (result) {
result->dependent_list =
......@@ -1257,7 +1257,8 @@ sheet_dump_dependencies (Sheet const *sheet)
for (i = (SHEET_MAX_ROWS-1)/BUCKET_SIZE; i >= 0 ; i--) {
GHashTable *hash = sheet->deps->range_hash[i];
if (hash != NULL && g_hash_table_size (hash) > 0) {
printf ("Range hash size %d: range over which cells in list depend\n",
printf ("Bucket %d (%d-%d): Range hash size %d: range over which cells in list depend\n",
i, i * BUCKET_SIZE, (i + 1) * BUCKET_SIZE - 1,
g_hash_table_size (hash));
g_hash_table_foreach (hash,
dump_range_dep, NULL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment