aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-07-27 05:38:28 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-07-27 05:38:28 +0800
commite205c7947424a6148d11b9ec3b3def5d3a0b8004 (patch)
tree86f8b7066e1a0777ba1535797205ee858bea8244
parentf17d22edd03a8d209021f32bf543d21597f8bc77 (diff)
downloadgsoc2013-evolution-e205c7947424a6148d11b9ec3b3def5d3a0b8004.tar.gz
gsoc2013-evolution-e205c7947424a6148d11b9ec3b3def5d3a0b8004.tar.zst
gsoc2013-evolution-e205c7947424a6148d11b9ec3b3def5d3a0b8004.zip
Use fs->type in xmlGetProp since we already free'd 'type'. Fixes bug
2002-07-26 Jeffrey Stedfast <fejj@ximian.com> * filter-int.c (xml_decode): Use fs->type in xmlGetProp since we already free'd 'type'. Fixes bug #28113. svn path=/trunk/; revision=17622
-rw-r--r--filter/ChangeLog9
-rw-r--r--filter/filter-element.c11
-rw-r--r--filter/filter-element.h3
-rw-r--r--filter/filter-int.c12
-rw-r--r--filter/filter-int.h27
-rw-r--r--filter/filter-part.c2
6 files changed, 30 insertions, 34 deletions
diff --git a/filter/ChangeLog b/filter/ChangeLog
index ffdeedd65c..96e205484a 100644
--- a/filter/ChangeLog
+++ b/filter/ChangeLog
@@ -1,3 +1,12 @@
+2002-07-26 Jeffrey Stedfast <fejj@ximian.com>
+
+ * filter-int.c (xml_decode): Use fs->type in xmlGetProp since we
+ already free'd 'type'. Fixes bug #28113.
+
+ * filter-element.c: Removed the empty private struct.
+
+ * filter-int.c: Removed the empty private struct.
+
2002-07-25 Jeffrey Stedfast <fejj@ximian.com>
* filter-int.[c,h]: Use GtkType (I only changed this one because I
diff --git a/filter/filter-element.c b/filter/filter-element.c
index 2508ef69ef..3da614f065 100644
--- a/filter/filter-element.c
+++ b/filter/filter-element.c
@@ -1,3 +1,4 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* Copyright (C) 2000 Ximian Inc.
*
@@ -48,10 +49,6 @@ static void filter_element_class_init (FilterElementClass *class);
static void filter_element_init (FilterElement *gspaper);
static void filter_element_finalise (GtkObject *obj);
-#define _PRIVATE(x) (((FilterElement *)(x))->priv)
-struct _FilterElementPrivate {
-};
-
static GtkObjectClass *parent_class;
enum {
@@ -60,10 +57,10 @@ enum {
static guint signals[LAST_SIGNAL] = { 0 };
-guint
+GtkType
filter_element_get_type (void)
{
- static guint type = 0;
+ static GtkType type = 0;
if (!type) {
GtkTypeInfo type_info = {
@@ -106,7 +103,7 @@ filter_element_class_init (FilterElementClass *class)
static void
filter_element_init (FilterElement *o)
{
- o->priv = g_malloc0 (sizeof (*o->priv));
+ ;
}
static void
diff --git a/filter/filter-element.h b/filter/filter-element.h
index f6570ef98d..235ff38cde 100644
--- a/filter/filter-element.h
+++ b/filter/filter-element.h
@@ -35,7 +35,6 @@ typedef struct _FilterElementClass FilterElementClass;
struct _FilterElement {
GtkObject parent;
- struct _FilterElementPrivate *priv;
char *name;
gpointer data;
@@ -63,7 +62,7 @@ struct _FilterElementClass {
/* signals */
};
-guint filter_element_get_type (void);
+GtkType filter_element_get_type (void);
FilterElement *filter_element_new (void);
FilterElement *filter_element_new_type_name (const char *type);
diff --git a/filter/filter-int.c b/filter/filter-int.c
index d7225a9bda..e6b5cb8a55 100644
--- a/filter/filter-int.c
+++ b/filter/filter-int.c
@@ -38,17 +38,12 @@ static xmlNodePtr xml_encode (FilterElement *fe);
static int xml_decode (FilterElement *fe, xmlNodePtr node);
static GtkWidget *get_widget (FilterElement *fe);
static void build_code (FilterElement *fe, GString *out, struct _FilterPart *ff);
-static void format_sexp (FilterElement *, GString *);
+static void format_sexp (FilterElement *fe, GString *out);
static void filter_int_class_init (FilterIntClass *class);
static void filter_int_init (FilterInt *gspaper);
static void filter_int_finalise (GtkObject *obj);
-#define _PRIVATE(x) (((FilterInt *)(x))->priv)
-
-struct _FilterIntPrivate {
-};
-
static FilterElementClass *parent_class;
enum {
@@ -109,7 +104,6 @@ filter_int_init (FilterInt *o)
{
o->min = 0;
o->max = G_MAXINT;
- o->priv = g_malloc0 (sizeof (*o->priv));
}
static void
@@ -207,8 +201,8 @@ xml_decode (FilterElement *fe, xmlNodePtr node)
g_free(fs->type);
fs->type = g_strdup(type);
xmlFree(type);
-
- intval = xmlGetProp (node, type?type:"integer");
+
+ intval = xmlGetProp (node, fs->type ? fs->type : "integer");
if (intval) {
d(printf ("Value = %s\n", intval));
fs->val = atoi (intval);
diff --git a/filter/filter-int.h b/filter/filter-int.h
index f8cd2711c6..833fd30bc8 100644
--- a/filter/filter-int.h
+++ b/filter/filter-int.h
@@ -1,27 +1,26 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
- * Ripped off by Sam Creasey <sammy@oh.verio.com> from filter-score by:
+ * Authors: Jeffrey Stedfast <fejj@ximian.com>
*
- * Authors: Jeffrey Stedfast <fejj@helixcode.com>
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
+ * Copyright 2002 Ximian, Inc. (www.ximian.com)
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
*
*/
+
#ifndef _FILTER_INT_H
#define _FILTER_INT_H
@@ -36,7 +35,6 @@ typedef struct _FilterIntClass FilterIntClass;
struct _FilterInt {
FilterElement parent;
- struct _FilterIntPrivate *priv;
char *type;
int val;
@@ -60,4 +58,3 @@ void filter_int_set_value(FilterInt *fi, int val);
/* methods */
#endif /* ! _FILTER_INT_H */
-
diff --git a/filter/filter-part.c b/filter/filter-part.c
index 3f05341c81..32bb66e4b2 100644
--- a/filter/filter-part.c
+++ b/filter/filter-part.c
@@ -394,7 +394,7 @@ filter_part_build_code (FilterPart *ff, GString *out)
fe = l->data;
filter_element_build_code (fe, out, ff);
l = g_list_next (l);
- }
+ }
}
/**