Re: [E-devel] ephoto warnings patch

2007-05-19 Thread Stephen Houston
Thanks. Commited!

On 5/19/07, Marcus Hüwe <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> today i tried to compile ephoto on openSUSE 10.2 (gcc version 4.1.220061115)
> but the build failed because ephoto is built with
> "-Wall -Werror ... -D_FORTIFY_SOURCE=2":
>
> if gcc -DHAVE_CONFIG_H -I. -I. -I.-I/usr/include/ewl
> -I/usr/include/libexif   -Wall -Werror -O2 -g -m32 -march=i586 -mtune=i686
> -fmessage-length=0 -D_FORTIFY_SOURCE=2 -MT ephoto-ephoto.o -MD -MP -MF
> ".deps/ephoto-ephoto.Tpo" -c -o ephoto-ephoto.o `test -f 'ephoto.c' ||
> echo './'`ephoto.c; \
> then mv -f ".deps/ephoto-ephoto.Tpo" ".deps/ephoto-ephoto.Po";
> else rm -f ".deps/ephoto-ephoto.Tpo"; exit 1; fi
> cc1: warnings being treated as errors
> ephoto.c: In function 'main':
> ephoto.c:74: warning: ignoring return value of 'scanf', declared
> with attribute warn_unused_result
> ephoto.c:115: warning: ignoring return value of 'scanf', declared
> with attribute warn_unused_result
> ephoto.c:148: warning: ignoring return value of 'scanf', declared
> with attribute warn_unused_result
> ephoto.c:214: warning: ignoring return value of 'scanf', declared
> with attribute warn_unused_result
> ephoto.c:248: warning: ignoring return value of 'scanf', declared
> with attribute warn_unused_result
> make[3]: *** [ephoto-ephoto.o] Error 1
>
> If you check the return value of each scanf() call everything is ok.
>
> A patch is attached.
>
>
> Marcus
>
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>
>
>
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[E-devel] ephoto warnings patch

2007-05-19 Thread Marcus Hüwe
Hi,

today i tried to compile ephoto on openSUSE 10.2 (gcc version 4.1.2 20061115)
but the build failed because ephoto is built with
"-Wall -Werror ... -D_FORTIFY_SOURCE=2":

if gcc -DHAVE_CONFIG_H -I. -I. -I.-I/usr/include/ewl 
-I/usr/include/libexif   -Wall -Werror -O2 -g -m32 -march=i586 -mtune=i686 
-fmessage-length=0 -D_FORTIFY_SOURCE=2 -MT ephoto-ephoto.o -MD -MP -MF 
".deps/ephoto-ephoto.Tpo" -c -o ephoto-ephoto.o `test -f 'ephoto.c' || echo 
'./'`ephoto.c; \
then mv -f ".deps/ephoto-ephoto.Tpo" ".deps/ephoto-ephoto.Po"; else rm 
-f ".deps/ephoto-ephoto.Tpo"; exit 1; fi
cc1: warnings being treated as errors
ephoto.c: In function 'main':
ephoto.c:74: warning: ignoring return value of 'scanf', declared with 
attribute warn_unused_result
ephoto.c:115: warning: ignoring return value of 'scanf', declared with 
attribute warn_unused_result
ephoto.c:148: warning: ignoring return value of 'scanf', declared with 
attribute warn_unused_result
ephoto.c:214: warning: ignoring return value of 'scanf', declared with 
attribute warn_unused_result
ephoto.c:248: warning: ignoring return value of 'scanf', declared with 
attribute warn_unused_result
make[3]: *** [ephoto-ephoto.o] Error 1

If you check the return value of each scanf() call everything is ok.

A patch is attached.


Marcus
--- src/bin/ephoto.c.old	2007-04-19 05:17:11.0 +0200
+++ src/bin/ephoto.c	2007-05-19 23:57:22.0 +0200
@@ -71,7 +71,12 @@ int main(int argc, char **argv)
 			printf("Are you sure you want to create an album with "
 			   "the name %s and the description %s? ", 
 			   name, description);
-			scanf("%c", &input);
+			int ret = scanf("%c", &input);
+			if(!ret || ret == EOF)
+			{
+printf("read error\n");
+return 1;
+			}
 			if(input == 'y' || input == 'Y')
 			{
 db = ephoto_db_init();
@@ -112,7 +117,12 @@ int main(int argc, char **argv)
 			printf("Are you sure you want to add an image "
 			   "to album %s with a name %s and path %s? ", 
 			   album, name, path);
-			scanf("%c", &input);
+			int ret = scanf("%c", &input);
+			if(!ret || ret == EOF)
+			{
+printf("read error\n");
+return 1;
+			}
 			if(input == 'y' || input == 'Y')
 			{
 db = ephoto_db_init();
@@ -145,7 +155,12 @@ int main(int argc, char **argv)
 printf("Are you sure you want to add images "
"from the directory %s to the album %s? ",
path, album);
-scanf("%c", &input);
+int ret = scanf("%c", &input);
+if(!ret || ret == EOF)
+{
+		printf("read error\n");
+		return 1;
+}
 if(input == 'y' || input == 'Y')
 {
 db = ephoto_db_init();
@@ -211,7 +226,12 @@ int main(int argc, char **argv)
 
 			printf("Are you sure you want to remove the album %s? ", 
 			   name);
-			scanf("%c", &input);
+			int ret = scanf("%c", &input);
+			if(!ret || ret == EOF)
+			{
+printf("read error\n");
+return 1;
+			}
 			if(input == 'y' || input == 'Y')
 			{
 db = ephoto_db_init();
@@ -245,7 +265,12 @@ int main(int argc, char **argv)
 			printf("Are you sure you want to remove the image %s "
 			   "from the album %s? ", 
 			   path, album);
-			scanf("%c", &input);
+			int ret = scanf("%c", &input);
+			if(!ret || ret == EOF)
+			{
+printf("read error\n");
+return 1;
+			}
 			if(input == 'y' || input == 'Y')
 			{
 db = ephoto_db_init();
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Problem using Ecore_Con

2007-05-19 Thread Chris Stromblad
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hmm... perhaps it was just the retarded me who just quite couldn't
figure out how it worked. I thought ecore_con_server_data_get actually
was used to retrieve data from the server I've connected to.

Apparently that was wrong.

My problem is half solved now.

/ Chris

Chris Stromblad wrote:
> Hey again, it's me again!
> 
> Before I start asking things, please let me know if my questions are
> retarded and are better spent thinking about restrained, under the
> influence and heavily guarded. Moving on.
> 
> I'm attempting some very simple stuff using the Ecore_Con stuff. EFL
> versions are the latest possible to download on
> enlightenment.freedesktop.org.
> 
> My problem is this. I use ecore_con_server_connect to, well, connect to
> a server. I add a connection handler for ECORE_CON_EVENT_SERVER_ADD.
> Some data is sent using ecore_con_server_send. A handler for data
> retrieval has also been added.
> 
> The handlers works as expected and deals with the emitted signals. Now
> this is my problem. When the data handler gets called,
> ECORE_CON_EVENT_SERVER_DATA, I subsequently use the
> ecore_con_server_data_get. This function however always fail? Using
> TCPDUMP I can see that the data actually is sent back from the server as
> expected. So, now my questions is, how come the function always fail?
> 
> Must be me missing something obvious, no?
> 
> / Chris

- -
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.4 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQEVAwUBRk9+9hs+yp9zuAsMAQKTVAf/SncbhSKxZWvxMm+B549lwvBIFyB9doLo
R1WjYKUobuv6gEqMzK7W4NMhDGW3HeWTYVRWb3VtDGSZFi98UUYx+tPgHT2wUrKL
/D7jfYDvfM8o9af+e2wFJ9I1/ZNviSSBT1zSPWc9wO9n3ByLbd431DKQZpcuoF9O
PO7Zvbyp+oZQKPeLR1PzPUwE4c+/WfkGSHL3zyu3Zu701DLz1cPEtv5BWSjoD/Oj
ILm4I1MTwmE9D5zD7v7ivKRIOImi1sC8+INUC5hHDXM1XbV5NnM7zs+9BgqQL46C
+9OWE8rGmP6a9en4M0P/ftu1MSVnFp6iDWp+Gq5R3EOMtMQ0BIIe5g==
=9mwU
-END PGP SIGNATURE-

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[E-devel] Problem using Ecore_Con

2007-05-19 Thread Chris Stromblad
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hey again, it's me again!

Before I start asking things, please let me know if my questions are
retarded and are better spent thinking about restrained, under the
influence and heavily guarded. Moving on.

I'm attempting some very simple stuff using the Ecore_Con stuff. EFL
versions are the latest possible to download on
enlightenment.freedesktop.org.

My problem is this. I use ecore_con_server_connect to, well, connect to
a server. I add a connection handler for ECORE_CON_EVENT_SERVER_ADD.
Some data is sent using ecore_con_server_send. A handler for data
retrieval has also been added.

The handlers works as expected and deals with the emitted signals. Now
this is my problem. When the data handler gets called,
ECORE_CON_EVENT_SERVER_DATA, I subsequently use the
ecore_con_server_data_get. This function however always fail? Using
TCPDUMP I can see that the data actually is sent back from the server as
expected. So, now my questions is, how come the function always fail?

Must be me missing something obvious, no?

/ Chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.4 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQEVAwUBRk90gRs+yp9zuAsMAQKLegf+L7mfxxDO0tNx5cdORb8JlXF/OKGvZ3Rt
vSATez3kc04O2ICcl6xUFHReuEgHoXfoo48nU/smETaDq9uqcYWpoE5tDMFD2wOB
aGqCclwczKUwRrv+0I/dZpauQ4SBp5h+wp5Drv4WoPpqYLiBguT2FrGI7dLBYb0J
0xW8aMj26ksVv22imWHpSwJIdL5ZEGL5XETuldlMXQCHbHfIdh/A2iPmrdAuUVIZ
RVe1KcXw3DsVq7086DAC+7b2PnNtCXalwInBGmyewXBkx7kQcxPS8iD7udyMbnEw
RPZpaVmJago1p//COP+tQ/Ypoc35HcPEih/bGosz18/UMrII9eeCpA==
=xLDm
-END PGP SIGNATURE-

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] E CVS: libs/imlib2 raster

2007-05-19 Thread Kim Woelders
Sorry, but I'm backing this out.
After having spent about half a day trying to fix it I give up.

There is a problem with font sizing, at least for certain fonts, e.g. 
/usr/share/e16/E-docs/rothwell.ttf, where the font size seems to get 
scaled down somewhere along the way.
I got as far as to find out that if I remove the call to 
FT_Set_Char_Size in imlib_font_find_face_in_fontset, things seem to 
work, with one font in a font set, anyway.
I have no idea what I'm doing, so I think the author should have a look 
at it.

Was this benchmarked in any way? I have a suspicion that 
imlib_font_find_face_in_fontset is called all over the place and does 
somewhat more work than the corresponding old code.
Also, I find the logic in imlib_font_find_face_in_fontset "somewhat" 
unclear:

imlib_font_find_face_in_fontset()
{
   ...
   repeat_upto_invalid:
 while(something1)
 {
   maybe return;
 }
   if (something2)
 goto repeat_upto_invalid;
   return imlib_font_find_face_in_fontset() <-- recursive!!!
}

If this patch goes in again I strongly suggest to first
1) Make it work.
2) Clean up the code logic so it's possible to actually read
what is going on.
3) Fix up indentation so that the code can actually be read.
4) Fix up indentation so it's consistent with the rest of imlib2.

Furthermore I suggest to
5) Many places, if not all - Not change fn to fn_list.
This patch makes ImlibFont a list by nature, and changing
the parameter name most places just adds noise making it
harder to evaluate the changes.

Finally I suggest to
6) Commit unrelated changes separately.
The polygon.c change is (I guess) about removing some (probably
bogus?) warnings.
7) Not make useless changes in unrelated code.
In color_helpers.c math.h is already included by color_helpers.h.


raster - You are most likely busy elsewhere. If you like I can handle 
things if winfred(?) wants to have another go at it.

/Kim


Enlightenment CVS wrote:
> Enlightenment CVS committal
> 
> Author  : raster
> Project : e17
> Module  : libs/imlib2
> 
> Dir : e17/libs/imlib2/src/lib
> 
> 
> Modified Files:
>   api.c color_helpers.c font.h font_draw.c font_load.c 
>   font_main.c font_query.c polygon.c 
> 
> 
> Log Message:
> 
> 
> fontset patch from winfred
> 
> ===
> RCS file: /cvs/e/e17/libs/imlib2/src/lib/api.c,v
> retrieving revision 1.11
> retrieving revision 1.12
> diff -u -3 -r1.11 -r1.12
> --- api.c 15 Feb 2007 04:15:03 -  1.11
> +++ api.c 6 May 2007 13:54:43 -   1.12
> @@ -3078,16 +3078,21 @@
>   * @return NULL if no font found.
>   * 
>   * Loads a truetype font from the first directory in the font path that
> - * contains that font. The font name @p font_name format is 
> "font_name/size". For
> - * example. If there is a font file called blum.ttf somewhere in the
> + * contains that font. The font name @p font_name format is "font_name/size"
> + * or a comma separated list of "font_name/size" elements.
> + * For example: if there is a font file called blum.ttf somewhere in the
>   * font path you might use "blum/20" to load a 20 pixel sized font of
> - * blum. If the font cannot be found NULL is returned. 
> + * blum;  or "blum/20, vera/20, mono/20" to load one or all fonts 
> + * of the comma separated list. If the font cannot be found NULL is 
> returned. 
>   * 
>   **/
>  EAPI Imlib_Font
>  imlib_load_font(const char *font_name)
>  {
> -   return imlib_font_load_joined(font_name);
> + if(strchr(font_name, ',') != NULL)
> +   return imlib_font_load_fontset(font_name);
> + else
> +   return imlib_font_load_joined(font_name);
>  }
>  
>  /**
> @@ -3096,11 +3101,20 @@
>  EAPI void
>  imlib_free_font(void)
>  {
> +   ImlibFont *fn;
> +
> if (!ctx)
>ctx = imlib_context_new();
> CHECK_PARAM_POINTER("imlib_free_font", "font", ctx->font);
> -   imlib_font_free(ctx->font);
> -   ctx->font = NULL;
> +
> +   fn = (ImlibFont*)ctx->font; ctx->font = NULL;
> +
> +   if(fn->next_in_set == NULL)
> +  {
> +   imlib_font_free(fn);
> +   return;
> +  }
> +   imlib_font_free_fontset(fn);
>  }
>  
>  /**
> ===
> RCS file: /cvs/e/e17/libs/imlib2/src/lib/color_helpers.c,v
> retrieving revision 1.3
> retrieving revision 1.4
> diff -u -3 -r1.3 -r1.4
> --- color_helpers.c   23 Feb 2005 03:02:41 -  1.3
> +++ color_helpers.c   6 May 2007 13:54:43 -   1.4
> @@ -1,3 +1,4 @@
> +#include 
>  #include "color_helpers.h"
>  /*
>   * Color space conversion helper routines
> ===
> RCS file: /cvs/e/e17/libs/imlib2/src/lib/font.h,v
> retrieving revision 1.1
> retrieving revision 1.2
> diff -u -3 -r1.1 -r1.2
> --- font.h1 Nov 2004 09:45:31 -   1.1
> +++ font.h6 May 2007 13:54:43 -   1.2
> @@ -50,6 +50,7 @@
>  
> int references;
>  

Re: [E-devel] RFC evas_object_transform()

2007-05-19 Thread Simon TRENY
On Sat, 19 May 2007 09:35:25 +0900,
Carsten Haitzler (The Rasterman) <[EMAIL PROTECTED]> wrote :

> On Sat, 12 May 2007 10:58:26 +0200 Simon TRENY <[EMAIL PROTECTED]>
> babbled:
> 
> > On Sat, 12 May 2007 07:14:04 GMT,
> > "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote :
> > 
> > > 
> > >   Carsten wrote:
> > > 
> > > > personally, as an intermediate-step i'd like to simply be able
> > > > to modify the FILL of an image (or text object) so the FILL can
> > > > be transformed (we need to be able to disable tiling for
> > > > images). this will then allow for us to provide transformed
> > > > image data but within a rect - allowing us to worry about
> > > > events later but get the benefits of the visual elements now.
> > > 
> > >   I've already done all this. No need to 'disable tiling',
> > > that's what the fill-spread modes are for. Recall the
> > > shaped-gradient I once sent? Same thing.. except that here we
> > > take into account borders and hq down scaling (for the software
> > > engines). The gl engine is still a problem - if one wants to do
> > > things strictly with gl - since I need code to render to a
> > > texture buffer (though it may be possible to use a quad mesh or
> > > some such?).
> > For the GL engine, you can probably modify the texture matrix to
> > transform the filling of an image. I'm not sure how well it would
> > work with borders though (but actually, what borders "mean" when
> > the fill is transformed?)
> 
> that is a good question. what do borders mean then? i would say that
> borders remain "unscaled" at the bounds of the transformed quad (the
> quad being the bounds of the image post-transform).
Actually, I think it would make more sense if the borders were applied
before the transform. Imo, borders describe how the original texture
should scale. If the texture is already transformed when borders are
applied, it won't be easy/intuitive to predict the result.

And it would allow to rotate a bordered-scaled-rectangle for example.
If the borders were applied after the transform, the borders of the
rectangle would look really weird.

> 
> > > 
> > > > yup. you can convert a scale + rotate INTO a transform matrix,
> > > > but not the other way around (easily).
> > > 
> > >   Not difficult - it's impossible in general.. and much
> > > depends on the order one wants the transforms to be applied.
> > > 
> > >jose.
> > > 
> > > 
> > > 
> > > -
> > > This SF.net email is sponsored by DB2 Express
> > > Download DB2 Express C - the FREE version of DB2 express and take
> > > control of your XML. No limits. Just data. Click to get it now.
> > > http://sourceforge.net/powerbar/db2/
> > > ___
> > > enlightenment-devel mailing list
> > > enlightenment-devel@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> > > 
> > 
> > -
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2 express and take
> > control of your XML. No limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
> > ___
> > enlightenment-devel mailing list
> > enlightenment-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> > 
> 
> 

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] e16 menu accent bug

2007-05-19 Thread Kim Woelders
Egmont Koblinger wrote:
> Hi,
> 
> I've found the following bug in e-0.16.8.8:
> 
> I have a fully UTF-8 system, the locale is set accordingly before e16 is
> started, and my menus are encoded in UTF-8 too. These accents appear
> correctly nearly always. They are okay in the window titles of applications,
> in the menus, and usually in the menu titles too.
> 
> However, if a menu title (that is, the first line of the corresponding .menu
> file) contains an accented character that wouldn't fit in Latin-1 then "-?-"
> is displayed instead of the correct title.
> 
This should now be fixed in cvs.
Thanks,
/Kim


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel