Commit 1213b7a6 authored by Morten Welinder's avatar Morten Welinder Committed by Morten Welinder

Fix bogus check. (expr_name_remove): Abort until someone fixes this.

1999-08-01  Morten Welinder  <terra@diku.dk>

	* src/expr-name.c (expr_name_add): Fix bogus check.
	(expr_name_remove): Abort until someone fixes this.

	* src/style.c (style_font_unref): Unref the font.

	* src/expr.c (eval_expr_real): Fix OPER_CONCAT case.  From Jody.

	* src/value.c (value_cast_to_float): FMR fix from Jody.
parent 4ca5068d
1999-08-01 Morten Welinder <terra@diku.dk>
* src/expr-name.c (expr_name_add): Fix bogus check.
(expr_name_remove): Abort until someone fixes this.
* src/style.c (style_font_unref): Unref the font.
* src/expr.c (eval_expr_real): Fix OPER_CONCAT case. From Jody.
* src/value.c (value_cast_to_float): FMR fix from Jody.
1999-08-01 Manish Vachharajani <mvachhar@vger.rutgers.edu>
* src/sheet-object-container.c: fix reference to
......
1999-08-01 Morten Welinder <terra@diku.dk>
* src/expr-name.c (expr_name_add): Fix bogus check.
(expr_name_remove): Abort until someone fixes this.
* src/style.c (style_font_unref): Unref the font.
* src/expr.c (eval_expr_real): Fix OPER_CONCAT case. From Jody.
* src/value.c (value_cast_to_float): FMR fix from Jody.
1999-08-01 Manish Vachharajani <mvachhar@vger.rutgers.edu>
* src/sheet-object-container.c: fix reference to
......
......@@ -123,8 +123,9 @@ expr_name_add (Workbook *wb, char const *name,
{
ExprName *expr_name;
g_return_val_if_fail (wb != NULL, 0);
g_return_val_if_fail (name != NULL, 0);
g_return_val_if_fail (expr_name != NULL, 0);
g_return_val_if_fail (expr != NULL, 0);
if ((expr_name = expr_name_lookup (wb, name))) {
*error_msg = _("already defined");
......@@ -179,6 +180,8 @@ expr_name_remove (ExprName *expr_name)
g_assert (g_list_find (wb->names, expr_name) == NULL);
} else {
printf ("Removing from globals\n");
/* FIXME -- this code is not right. */
abort ();
g_assert (g_list_find (wb->names, expr_name) != NULL);
global_names = g_list_remove (global_names, expr_name);
g_assert (g_list_find (wb->names, expr_name) == NULL);
......
......@@ -973,7 +973,7 @@ eval_expr_real (FunctionEvalInfo *s, ExprTree const *tree)
b = eval_expr_real (s, tree->u.binary.value_b);
if (VALUE_IS_PROBLEM(b)) {
value_release (a);
return NULL;
return b;
}
sa = value_get_as_string (a);
......
......@@ -245,6 +245,8 @@ style_font_ref (StyleFont *sf)
void
style_font_unref (StyleFont *sf)
{
static gboolean warning_shown = FALSE;
g_return_if_fail (sf != NULL);
g_return_if_fail (sf->ref_count > 0);
......@@ -252,6 +254,13 @@ style_font_unref (StyleFont *sf)
if (sf->ref_count != 0)
return;
if (!warning_shown) {
warning_shown = TRUE;
g_warning ("FIXME or FIXgnomeprint: How do we get rid of a GnomeDisplayFont?");
}
gtk_object_unref (GTK_OBJECT (sf->font));
g_hash_table_remove (style_font_hash, sf);
g_free (sf->font_name);
g_free (sf);
......
......@@ -295,8 +295,9 @@ value_cast_to_float (Value *v)
if (v->type == VALUE_FLOAT)
return v;
if (v->type == VALUE_BOOLEAN) {
value_release (v);
return value_new_float(v->v.v_bool ? 1. : 0.);
newv = value_new_float(v->v.v_bool ? 1. : 0.);
value_release (v);
return newv;
}
newv = g_new (Value, 1);
......
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