Enlightenment CVS committal
Author : azundris
Project : e17
Module : apps/examine
Dir : e17/apps/examine/src
Modified Files:
examine_client.c
Log Message:
* add'l robustness (I/II)
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/examine/src/examine_client.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -3 -r1.21 -r1.22
--- examine_client.c 1 Dec 2004 23:08:55 -0000 1.21
+++ examine_client.c 9 Feb 2005 11:31:03 -0000 1.22
@@ -260,6 +260,7 @@
if (*label && *typename) {
prop_tmp = malloc(sizeof(examine_prop));
+ memset(prop_tmp,0,sizeof(examine_prop));
prop_tmp->key = strdup(label);
prop_tmp->bound = BOUND_NONE;
@@ -309,8 +310,9 @@
prop_tmp->data = strdup(range);
} else if (!strcmp(type, "boolean")) {
prop_tmp->type = PT_BLN;
- } else
- prop_tmp->value.ptr = NULL;
+ } else {
+ prop_tmp->type = PT_NIL;
+ prop_tmp->value.ptr = prop_tmp->oldvalue.ptr = NULL; }
prop_tmp->next = prop_list;
prop_list = prop_tmp;
@@ -406,7 +408,15 @@
}
break;
default: /* PT_STR, PT_RGB */
- if (strcmp(target->value.ptr, target->oldvalue.ptr) != 0) {
+printf("$%x, %s, %p,
%p\n",target->type,target->key,target->value.ptr,target->oldvalue.ptr);
+if(target->value.ptr)
+ printf("|%s|\n",target->value.ptr);
+if(target->oldvalue.ptr)
+ printf("|%s|\n",target->oldvalue.ptr);
+
+ if (target->value.ptr &&
+ (!target->oldvalue.ptr ||
+ strcmp(target->value.ptr, target->oldvalue.ptr))) {
free(target->oldvalue.ptr);
target->oldvalue.ptr = strdup(target->value.ptr);
examine_client_set_val(target);
@@ -433,11 +443,15 @@
examine_prop *prop;
Ewl_Widget *sibling;
- ret = strstr(examine_client_buf, "=") + 1;
- if (ret == 1) {
- printf("OFFENDING STRING: %s\n", examine_client_buf);
- return;
- }
+printf("|%s|\n",examine_client_buf);
+
+ ret = strstr(examine_client_buf, "=");
+ if (ret == NULL) {
+ if(strcasecmp(examine_client_buf,"<undefined>"))
+ printf("OFFENDING STRING: %s\n", examine_client_buf);
+ return; }
+
+ ret++;
if (*ret == '"') {
ret++;
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs