Enlightenment CVS committal

Author  : rbdpngn
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src


Modified Files:
        ewl_password.c ewl_password.h ewl_text.c 


Log Message:
Zero out and free the memory used to store the password.
Fix a return type in the text align function.

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_password.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- ewl_password.c      26 Feb 2004 05:38:38 -0000      1.7
+++ ewl_password.c      28 May 2004 19:55:15 -0000      1.8
@@ -1,4 +1,3 @@
-
 #include <Ewl.h>
 
 /**
@@ -49,8 +48,10 @@
        ewl_callback_del(w, EWL_CALLBACK_KEY_DOWN, ewl_entry_key_down_cb);
        ewl_callback_del(w, EWL_CALLBACK_MOUSE_DOWN, ewl_entry_mouse_down_cb);
        ewl_callback_del(w, EWL_CALLBACK_MOUSE_MOVE, ewl_entry_mouse_move_cb);
-       ewl_callback_append(w, EWL_CALLBACK_KEY_DOWN,
-                           ewl_password_key_down_cb, NULL);
+       ewl_callback_append(w, EWL_CALLBACK_KEY_DOWN, ewl_password_key_down_cb,
+                           NULL);
+       ewl_callback_append(w, EWL_CALLBACK_DESTROY, ewl_password_destroy,
+                           NULL);
 
        ewl_password_set_text(e, text);
 
@@ -215,3 +216,17 @@
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
+
+void ewl_password_destroy(Ewl_Widget * w, void *ev_data, void *user_data)
+{
+       Ewl_Password *p = EWL_PASSWORD(w);
+
+       DENTER_FUNCTION(DLEVEL_STABLE);
+
+       if (p->real_text) {
+               ZERO(p->real_text, char, strlen(p->real_text));
+               FREE(p->real_text);
+       }
+
+       DLEAVE_FUNCTION(DLEVEL_STABLE);
+}
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_password.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- ewl_password.h      7 Dec 2003 21:34:21 -0000       1.2
+++ ewl_password.h      28 May 2004 19:55:15 -0000      1.3
@@ -48,6 +48,7 @@
  * Internally used callbacks, override at your own risk.
  */
 void ewl_password_key_down_cb(Ewl_Widget * w, void *ev_data, void *user_data);
+void ewl_password_destroy(Ewl_Widget * w, void *ev_data, void *user_data);
 
 /**
  * @}
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_text.c,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -3 -r1.62 -r1.63
--- ewl_text.c  27 May 2004 20:15:16 -0000      1.62
+++ ewl_text.c  28 May 2004 19:55:15 -0000      1.63
@@ -308,7 +308,7 @@
        Ewl_Text_Op_Align *opa;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
-       DCHECK_PARAM_PTR_RET("ta", ta, NULL);
+       DCHECK_PARAM_PTR_RET("ta", ta, 0);
 
        op = ewl_text_op_relevant_find(ta, EWL_TEXT_OP_TYPE_FONT_SET);
        opa = (Ewl_Text_Op_Align *)op;




-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to