aboutsummaryrefslogtreecommitdiffstats
path: root/property.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--property.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/property.c b/property.c
index d465275..8e1e081 100644
--- a/property.c
+++ b/property.c
@@ -1,4 +1,4 @@
-/* $Id: property.c,v 1.2 2006/08/13 11:38:20 reinelt Exp $
+/* $Id: property.c,v 1.3 2006/08/13 18:14:03 harbaum Exp $
*
* dynamic properties
*
@@ -23,6 +23,9 @@
*
*
* $Log: property.c,v $
+ * Revision 1.3 2006/08/13 18:14:03 harbaum
+ * Added KVV plugin
+ *
* Revision 1.2 2006/08/13 11:38:20 reinelt
* text widget uses dynamic properties
*
@@ -93,32 +96,31 @@ int property_eval(PROPERTY * prop)
{
RESULT old;
int update = 1;
-
+
/* this is a bit ugly: we need to remember the old value */
-
+
old.type = prop->result.type;
old.size = prop->result.size;
old.number = prop->result.number;
- old.string = prop->result.string != NULL ? strdup(prop->result.string) : NULL;
-
+ old.string = prop->result.string != NULL ? strdup(prop->result.string) : NULL;
+
DelResult(&prop->result);
Eval(prop->compiled, &prop->result);
-
+
if (prop->result.type & R_NUMBER && old.type & R_NUMBER && prop->result.number == old.number) {
update = 0;
}
-
+
if (prop->result.type & R_STRING && old.type & R_STRING && prop->result.size == old.size) {
if (prop->result.string == NULL && old.string == NULL) {
update = 0;
- }
- else if (prop->result.string != NULL && old.string != NULL && strcmp(prop->result.string, old.string) == 0) {
+ } else if (prop->result.string != NULL && old.string != NULL && strcmp(prop->result.string, old.string) == 0) {
update = 0;
}
}
-
+
if (old.string)
- free (old.string);
+ free(old.string);
return update;
}