Enlightenment CVS committal

Author  : rbdpngn
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src


Modified Files:
        ewl_enums.h ewl_widget.c 


Log Message:
Re-ordered some enum typedef's because of a report with some difficulties
mixing EWL with C++. Fixed some nasty string handling which got fubar from
an interrupted train of thought.

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_enums.h,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -3 -r1.46 -r1.47
--- ewl_enums.h 17 Feb 2004 17:25:11 -0000      1.46
+++ ewl_enums.h 23 Feb 2004 06:08:13 -0000      1.47
@@ -9,6 +9,7 @@
  */
 
 /**
+ * @enum Ewl_Callback_Type
  * This defines the various types of callbacks that can be hooked up for each
  * widget.
  */
@@ -47,6 +48,7 @@
 typedef enum Ewl_Callback_Type Ewl_Callback_Type;
 
 /**
+ * @enum Ewl_Event_Notify
  * Flags for the callbacks to indicate interception or notification of the
  * parent.
  */
@@ -60,6 +62,7 @@
 typedef enum Ewl_Event_Notify Ewl_Event_Notify;
 
 /**
+ * @enum Ewl_Orientation
  * The orientation enum is used in a few widgets to specify whether the widget
  * should be laid out in a horizontal or vertical fashion.
  */
@@ -72,6 +75,7 @@
 typedef enum Ewl_Orientation Ewl_Orientation;
 
 /**
+ * @enum Ewl_Flags
  * A variety of flags that affect layout, visibility, scheduling and
  * properties of objects.
  */
@@ -157,8 +161,9 @@
                EWL_FLAG_STATE_SELECTED | EWL_FLAG_STATE_DND | \
                EWL_FLAG_STATE_DISABLED)
 
-typedef enum Ewl_Position Ewl_Position;
-
+/**
+ * @enum Ewl_Position
+ */
 enum Ewl_Position
 {
        EWL_POSITION_LEFT = 0x1,
@@ -167,18 +172,24 @@
        EWL_POSITION_BOTTOM = 0x8
 };
 
-#define EWL_POSITION_MASK (0xf)
+typedef enum Ewl_Position Ewl_Position;
 
-typedef enum Ewl_Window_Flags Ewl_Window_Flags;
+#define EWL_POSITION_MASK (0xf)
 
+/**
+ * @enum Ewl_Window_Flags
+ */
 enum Ewl_Window_Flags
 {
        EWL_WINDOW_BORDERLESS = 1,
        EWL_WINDOW_USER_CONFIGURE = 2
 };
 
-typedef enum Ewl_Tree_Node_Flags Ewl_Tree_Node_Flags;
+typedef enum Ewl_Window_Flags Ewl_Window_Flags;
 
+/**
+ * @enum Ewl_Tree_Node_Flags
+ */
 enum Ewl_Tree_Node_Flags
 {
        EWL_TREE_NODE_NOEXPAND = 0,
@@ -186,15 +197,21 @@
        EWL_TREE_NODE_EXPANDED = 2
 };
 
-typedef enum Ewl_Notebook_Flags Ewl_Notebook_Flags;
+typedef enum Ewl_Tree_Node_Flags Ewl_Tree_Node_Flags;
 
+/**
+ * @enum Ewl_Notebook_Flags
+ */
 enum Ewl_Notebook_Flags
 {
        EWL_NOTEBOOK_FLAG_TABS_HIDDEN = 0x10
 };
 
-typedef enum Ewl_Scrollbar_Flags Ewl_ScrollBar_Flags;
+typedef enum Ewl_Notebook_Flags Ewl_Notebook_Flags;
 
+/**
+ * @enum Ewl_Scrollbar_Flags
+ */
 enum Ewl_Scrollbar_Flags
 {
        EWL_SCROLLBAR_FLAG_NONE,
@@ -202,15 +219,19 @@
        EWL_SCROLLBAR_FLAG_ALWAYS_HIDDEN
 };
 
+typedef enum Ewl_Scrollbar_Flags Ewl_ScrollBar_Flags;
 
-typedef enum Ewl_Filedialog_Type Ewl_Filedialog_Type;
-
+/**
+ * @enum Ewl_Filedialog_Type
+ */
 enum Ewl_Filedialog_Type
 {
        EWL_FILEDIALOG_TYPE_OPEN,
        EWL_FILEDIALOG_TYPE_SAVE
 };
 
+typedef enum Ewl_Filedialog_Type Ewl_Filedialog_Type;
+
 /**
  * @}
  */
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_widget.c,v
retrieving revision 1.102
retrieving revision 1.103
diff -u -3 -r1.102 -r1.103
--- ewl_widget.c        23 Feb 2004 05:43:27 -0000      1.102
+++ ewl_widget.c        23 Feb 2004 06:08:13 -0000      1.103
@@ -425,16 +425,11 @@
        if (w->inheritance)
                il = strlen(w->inheritance);
 
-       il += al;
+       il += al + 2;
        current = (char *)malloc(il);
        if (current) {
-               /*
-                * NOTE: This strcat should be safe, the strings lengths have
-                * already been computed to determine the size of the
-                * allocation.
-                */
-               strcat(current, appearance);
-               IF_FREE(w->inheritance);
+               snprintf(current, il, "%s:%s:", w->inheritance, appearance);
+               FREE(w->inheritance);
                w->inheritance = current;
        }
 




-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to