aboutsummaryrefslogtreecommitdiffstats
path: root/filter
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-06-02 07:09:19 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-06-02 07:09:19 +0800
commit8771a6de3590d468d1a2c3cfab34955c624f614a (patch)
treedc23ed6ab0533bc9f241976f33b6c6cc2d7ee117 /filter
parent69a1e923a71ee881721e21b991de08b897f9e7b0 (diff)
downloadgsoc2013-evolution-8771a6de3590d468d1a2c3cfab34955c624f614a.tar.gz
gsoc2013-evolution-8771a6de3590d468d1a2c3cfab34955c624f614a.tar.zst
gsoc2013-evolution-8771a6de3590d468d1a2c3cfab34955c624f614a.zip
More code cleanup.
Diffstat (limited to 'filter')
-rw-r--r--filter/filter-colour.c4
-rw-r--r--filter/filter-datespec.c16
-rw-r--r--filter/filter-element.c2
-rw-r--r--filter/filter-element.h4
-rw-r--r--filter/filter-file.c4
-rw-r--r--filter/filter-input.c8
-rw-r--r--filter/filter-int.c4
-rw-r--r--filter/filter-option.c4
-rw-r--r--filter/filter-part.c4
-rw-r--r--filter/filter-rule.c8
-rw-r--r--filter/rule-context.c8
11 files changed, 33 insertions, 33 deletions
diff --git a/filter/filter-colour.c b/filter/filter-colour.c
index c175829a5e..7672a77be6 100644
--- a/filter/filter-colour.c
+++ b/filter/filter-colour.c
@@ -116,7 +116,7 @@ filter_colour_new (void)
return (FilterColour *) g_object_new (FILTER_TYPE_COLOUR, NULL, NULL);
}
-static int
+static gint
colour_eq (FilterElement *fe, FilterElement *cm)
{
FilterColour *fc = (FilterColour *) fe;
@@ -151,7 +151,7 @@ xml_encode (FilterElement *fe)
return value;
}
-static int
+static gint
xml_decode (FilterElement *fe, xmlNodePtr node)
{
FilterColour *fc = (FilterColour *)fe;
diff --git a/filter/filter-datespec.c b/filter/filter-datespec.c
index 4ab85d36bf..a7ef49981e 100644
--- a/filter/filter-datespec.c
+++ b/filter/filter-datespec.c
@@ -66,7 +66,7 @@ typedef struct _timespan {
const gchar *past_plural;
const gchar *future_singular;
const gchar *future_plural;
- float max;
+ gfloat max;
} timespan;
#ifdef ngettext
@@ -195,7 +195,7 @@ validate (FilterElement *fe)
return valid;
}
-static int
+static gint
date_eq (FilterElement *fe, FilterElement *cm)
{
FilterDatespec *fd = (FilterDatespec *)fe, *cd = (FilterDatespec *)cm;
@@ -228,13 +228,13 @@ xml_encode (FilterElement *fe)
work = xmlNewChild (value, NULL, (const guchar *)"datespec", NULL);
sprintf (str, "%d", fds->type);
xmlSetProp (work, (const guchar *)"type", (guchar *)str);
- sprintf (str, "%d", (int)fds->value);
+ sprintf (str, "%d", (gint)fds->value);
xmlSetProp (work, (const guchar *)"value", (guchar *)str);
return value;
}
-static int
+static gint
xml_decode (FilterElement *fe, xmlNodePtr node)
{
FilterDatespec *fds = (FilterDatespec *)fe;
@@ -263,7 +263,7 @@ xml_decode (FilterElement *fe, xmlNodePtr node)
return 0;
}
-static int
+static gint
get_best_span (time_t val)
{
gint i;
@@ -508,13 +508,13 @@ format_sexp (FilterElement *fe, GString *out)
g_string_append (out, "(get-current-date)");
break;
case FDST_SPECIFIED:
- g_string_append_printf (out, "%d", (int) fds->value);
+ g_string_append_printf (out, "%d", (gint) fds->value);
break;
case FDST_X_AGO:
- g_string_append_printf (out, "(- (get-current-date) %d)", (int) fds->value);
+ g_string_append_printf (out, "(- (get-current-date) %d)", (gint) fds->value);
break;
case FDST_X_FUTURE:
- g_string_append_printf (out, "(+ (get-current-date) %d)", (int) fds->value);
+ g_string_append_printf (out, "(+ (get-current-date) %d)", (gint) fds->value);
break;
}
}
diff --git a/filter/filter-element.c b/filter/filter-element.c
index f2d65d63b4..7eb898f025 100644
--- a/filter/filter-element.c
+++ b/filter/filter-element.c
@@ -244,7 +244,7 @@ validate (FilterElement *fe)
return TRUE;
}
-static int
+static gint
element_eq (FilterElement *fe, FilterElement *cm)
{
return ((fe->name && cm->name && strcmp (fe->name, cm->name) == 0)
diff --git a/filter/filter-element.h b/filter/filter-element.h
index 4c105a77c3..5a78c98980 100644
--- a/filter/filter-element.h
+++ b/filter/filter-element.h
@@ -77,12 +77,12 @@ void filter_element_set_data (FilterElement *fe, gpointer data);
/* methods */
gboolean filter_element_validate (FilterElement *fe);
-int filter_element_eq (FilterElement *fe, FilterElement *cm);
+gint filter_element_eq (FilterElement *fe, FilterElement *cm);
void filter_element_xml_create (FilterElement *fe, xmlNodePtr node);
xmlNodePtr filter_element_xml_encode (FilterElement *fe);
-int filter_element_xml_decode (FilterElement *fe, xmlNodePtr node);
+gint filter_element_xml_decode (FilterElement *fe, xmlNodePtr node);
FilterElement *filter_element_clone (FilterElement *fe);
void filter_element_copy_value (FilterElement *de, FilterElement *se);
diff --git a/filter/filter-file.c b/filter/filter-file.c
index 0d421042e6..ea14fadb12 100644
--- a/filter/filter-file.c
+++ b/filter/filter-file.c
@@ -184,7 +184,7 @@ validate (FilterElement *fe)
return TRUE;
}
-static int
+static gint
file_eq (FilterElement *fe, FilterElement *cm)
{
FilterFile *ff = (FilterFile *)fe, *cf = (FilterFile *)cm;
@@ -224,7 +224,7 @@ xml_encode (FilterElement *fe)
return value;
}
-static int
+static gint
xml_decode (FilterElement *fe, xmlNodePtr node)
{
FilterFile *file = (FilterFile *)fe;
diff --git a/filter/filter-input.c b/filter/filter-input.c
index 5eeed60de7..690ccd6e48 100644
--- a/filter/filter-input.c
+++ b/filter/filter-input.c
@@ -175,7 +175,7 @@ validate (FilterElement *fe)
pattern = fi->values->data;
if ((regerr = regcomp (&regexpat, pattern, REG_EXTENDED | REG_NEWLINE | REG_ICASE))) {
- size_t reglen;
+ gsize reglen;
gchar *regmsg;
/* regerror gets called twice to get the full error string
@@ -200,7 +200,7 @@ validate (FilterElement *fe)
return valid;
}
-static int
+static gint
list_eq (GList *al, GList *bl)
{
gint truth = TRUE;
@@ -214,7 +214,7 @@ list_eq (GList *al, GList *bl)
return truth && al == NULL && bl == NULL;
}
-static int
+static gint
input_eq (FilterElement *fe, FilterElement *cm)
{
FilterInput *fi = (FilterInput *)fe, *ci = (FilterInput *)cm;
@@ -263,7 +263,7 @@ xml_encode (FilterElement *fe)
return value;
}
-static int
+static gint
xml_decode (FilterElement *fe, xmlNodePtr node)
{
FilterInput *fi = (FilterInput *)fe;
diff --git a/filter/filter-int.c b/filter/filter-int.c
index 220e12fb38..9d72fdfdc8 100644
--- a/filter/filter-int.c
+++ b/filter/filter-int.c
@@ -144,7 +144,7 @@ filter_int_set_value (FilterInt *fi, gint val)
fi->val = val;
}
-static int
+static gint
int_eq (FilterElement *fe, FilterElement *cm)
{
return FILTER_ELEMENT_CLASS (parent_class)->eq (fe, cm)
@@ -193,7 +193,7 @@ xml_encode (FilterElement *fe)
return value;
}
-static int
+static gint
xml_decode (FilterElement *fe, xmlNodePtr node)
{
FilterInt *fs = (FilterInt *)fe;
diff --git a/filter/filter-option.c b/filter/filter-option.c
index 5341705986..07e7ee950d 100644
--- a/filter/filter-option.c
+++ b/filter/filter-option.c
@@ -211,7 +211,7 @@ filter_option_remove_all (FilterOption *fo)
fo->current = NULL;
}
-static int
+static gint
option_eq(FilterElement *fe, FilterElement *cm)
{
FilterOption *fo = (FilterOption *)fe, *co = (FilterOption *)cm;
@@ -322,7 +322,7 @@ xml_encode (FilterElement *fe)
return value;
}
-static int
+static gint
xml_decode (FilterElement *fe, xmlNodePtr node)
{
FilterOption *fo = (FilterOption *)fe;
diff --git a/filter/filter-part.c b/filter/filter-part.c
index f8dc448f77..79b9da9ac0 100644
--- a/filter/filter-part.c
+++ b/filter/filter-part.c
@@ -489,7 +489,7 @@ filter_part_expand_code (FilterPart *ff, const gchar *source, GString *out)
fe = filter_part_find_element (ff, name);
d(printf("expand code: looking up variab le '%s' = %p\n", ff, name, fe));
if (fe) {
- g_string_append_printf (out, "%.*s", (int)(newstart-start), start);
+ g_string_append_printf (out, "%.*s", (gint)(newstart-start), start);
filter_element_format_sexp (fe, out);
#if 0
} else if ((val = g_hash_table_lookup (ff->globals, name))) {
@@ -497,7 +497,7 @@ filter_part_expand_code (FilterPart *ff, const gchar *source, GString *out)
e_sexp_encode_string (out, val);
#endif
} else {
- g_string_append_printf (out, "%.*s", (int)(end-start+1), start);
+ g_string_append_printf (out, "%.*s", (gint)(end-start+1), start);
}
start = end + 1;
}
diff --git a/filter/filter-rule.c b/filter/filter-rule.c
index 00610c48ea..354d276fe8 100644
--- a/filter/filter-rule.c
+++ b/filter/filter-rule.c
@@ -203,7 +203,7 @@ filter_rule_validate (FilterRule *fr)
return FILTER_RULE_GET_CLASS (fr)->validate (fr);
}
-static int
+static gint
validate (FilterRule *fr)
{
gint valid = TRUE;
@@ -240,7 +240,7 @@ filter_rule_eq (FilterRule *fr, FilterRule *cm)
&& FILTER_RULE_GET_CLASS (fr)->eq (fr, cm);
}
-static int
+static gint
list_eq(GList *al, GList *bl)
{
gint truth = TRUE;
@@ -256,7 +256,7 @@ list_eq(GList *al, GList *bl)
return truth && al == NULL && bl == NULL;
}
-static int
+static gint
rule_eq (FilterRule *fr, FilterRule *cm)
{
return fr->enabled == cm->enabled
@@ -387,7 +387,7 @@ filter_rule_xml_decode (FilterRule *fr, xmlNodePtr node, RuleContext *f)
return res;
}
-static int
+static gint
xml_decode (FilterRule *fr, xmlNodePtr node, RuleContext *f)
{
xmlNodePtr work;
diff --git a/filter/rule-context.c b/filter/rule-context.c
index e9dc71a150..5f00adff71 100644
--- a/filter/rule-context.c
+++ b/filter/rule-context.c
@@ -295,7 +295,7 @@ rule_context_load(RuleContext *rc, const gchar *system, const gchar *user)
return res;
}
-static int
+static gint
load(RuleContext *rc, const gchar *system, const gchar *user)
{
xmlNodePtr set, rule, root;
@@ -422,7 +422,7 @@ rule_context_save(RuleContext *rc, const gchar *user)
return RULE_CONTEXT_GET_CLASS(rc)->save(rc, user);
}
-static int
+static gint
save(RuleContext *rc, const gchar *user)
{
xmlDocPtr doc;
@@ -507,14 +507,14 @@ source_hashf(const gchar *a)
return 0;
}
-static int
+static gint
source_eqf(const gchar *a, const gchar *b)
{
return((a && b && strcmp(a, b) == 0))
|| (a == NULL && b == NULL);
}
-static int
+static gint
revert(RuleContext *rc, const gchar *user)
{
xmlNodePtr set, rule;