Re: [E-devel] [PATCH] signedness issues in efreet_menu.c

2009-03-21 Thread Gustavo Sverzut Barbieri
in svn, but moving these code to use boolean or enum should be a
better solution, then just use a bitfield with 2 bits or bit more.

On Sat, Mar 21, 2009 at 8:38 AM, Albin Tonnerre
 wrote:
> Hello,
> efreet_menu.c compare variables which have type 'char' to -1 (members
> of the Efreet_Menu_Internal and Efreet_Menu_Layout structures). This
> causes issues on architectures where chars are unsigned, such as ARM (at
> least on the freerunner). In particular, the use of  in menu files
> results in malformed menus. The attached patch intends to fix this.
>
> Regards,
> Albin
>
> --
> Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
> powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
> easily build your RIAs with Flex Builder, the Eclipse(TM)based development
> software that enables intelligent coding and step-through debugging.
> Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>
>



-- 
Gustavo Sverzut Barbieri
http://profusion.mobi embedded systems
--
MSN: barbi...@gmail.com
Skype: gsbarbieri
Mobile: +55 (19) 9225-2202

--
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[E-devel] [PATCH] signedness issues in efreet_menu.c

2009-03-21 Thread Albin Tonnerre
Hello,
efreet_menu.c compare variables which have type 'char' to -1 (members
of the Efreet_Menu_Internal and Efreet_Menu_Layout structures). This
causes issues on architectures where chars are unsigned, such as ARM (at
least on the freerunner). In particular, the use of  in menu files
results in malformed menus. The attached patch intends to fix this.

Regards,
Albin
Index: src/lib/efreet_menu.c
===
--- src/lib/efreet_menu.c	(revision 39603)
+++ src/lib/efreet_menu.c	(working copy)
@@ -61,11 +61,11 @@
 
 Eina_List *layout; /**< This menus layout */
 Eina_List *default_layout; /**< Default layout */
-char show_empty;/**< Whether to show empty menus */
-char in_line;   /**< Whether this meny can be inlined */
-char inline_limit;  /**< Number of elements which triggers inline */
-char inline_header; /**< Whether we should use the header name when this menu is inlined */
-char inline_alias;  /**< Whether we should use the menu name when inlining */
+signed char show_empty;/**< Whether to show empty menus */
+signed char in_line;   /**< Whether this meny can be inlined */
+signed char inline_limit;  /**< Number of elements which triggers inline */
+signed char inline_header; /**< Whether we should use the header name when this menu is inlined */
+signed char inline_alias;  /**< Whether we should use the menu name when inlining */
 
 unsigned char seen_allocated:1; /**< have we set the only_unallocated */
 unsigned char only_unallocated:1;   /**< Show only unallocated .desktops */
@@ -184,11 +184,11 @@
 char *name;  /**< The name of the element */
 
 /* The items below are for Menuname Layout elements */
-char show_empty;/**< Whether to show empty menus */
-char in_line;   /**< Whether this meny can be inlined */
-char inline_limit;  /**< Number of elements which triggers inline */
-char inline_header; /**< Whether we should use the header name when this menu is inlined */
-char inline_alias;  /**< Whether we should use the menu name when inlining */
+signed char show_empty;/**< Whether to show empty menus */
+signed char in_line;   /**< Whether this meny can be inlined */
+signed char inline_limit;  /**< Number of elements which triggers inline */
+signed char inline_header; /**< Whether we should use the header name when this menu is inlined */
+signed char inline_alias;  /**< Whether we should use the menu name when inlining */
 };
 
 /**
--
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel