Re: [E-devel] E CVS: libs/ecore onefang

2006-10-28 Thread Kim Woelders
Enlightenment CVS wrote:
 Enlightenment CVS committal
 
 Author  : onefang
 Project : e17
 Module  : libs/ecore
 
 Dir : e17/libs/ecore/src/lib/ecore_file
 
 
 Modified Files:
   Ecore_File.h ecore_file.c 
 
 
 Log Message:
 Copy filename escaping code from e_utils to make it more generally available.
 Step 2 is to remove the original and have everything call this one instead.
 
 ===
 RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore_file/Ecore_File.h,v
 retrieving revision 1.27
 retrieving revision 1.28
 diff -u -3 -r1.27 -r1.28
 --- Ecore_File.h  8 Sep 2006 16:52:29 -   1.27
 +++ Ecore_File.h  28 Oct 2006 08:48:11 -  1.28
 @@ -76,6 +76,7 @@
 EAPI char   *ecore_file_readlink (const char *link);
 EAPI Ecore_List *ecore_file_ls   (const char *dir);
 EAPI char   *ecore_file_app_exe_get  (const char *app);
 +   EAPI char   *ecore_file_escape_name  (const char *filename);
 EAPI char   *ecore_file_strip_ext(const char *file);
 
 EAPI Ecore_File_Monitor *ecore_file_monitor_add(const char *path,
 ===
 RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore_file/ecore_file.c,v
 retrieving revision 1.49
 retrieving revision 1.50
 diff -u -3 -r1.49 -r1.50
 --- ecore_file.c  15 Oct 2006 09:32:25 -  1.49
 +++ ecore_file.c  28 Oct 2006 08:48:11 -  1.50
 @@ -480,6 +480,40 @@
  }
  
  EAPI char *
 +ecore_file_escape_name(const char *filename)
 +{
 +   const char *p;
 +   char *q;
 +   static char buf[PATH_MAX];
 +   
 +   p = filename;
 +   q = buf;
 +   while (*p)
 + {
 + if ((q - buf)  (PATH_MAX - 6)) return NULL;
 + if (
 + (*p == ' ') || (*p == '\t') || (*p == '\n') ||
 + (*p == '\\') || (*p == '\'') || (*p == '\') ||
 + (*p == ';') || (*p == '!') || (*p == '#') ||
 + (*p == '$') || (*p == '%') || (*p == '') ||
 + (*p == '*') || (*p == '(') || (*p == ')') ||
 + (*p == '[') || (*p == ']') || (*p == '{') ||
 + (*p == '}') || (*p == '|') || (*p == '') ||
 + (*p == '') || (*p == '?')
 + )
 +   {
 +  *q = '\\';
 +  q++;
 +   }
 + *q = *p;
 + q++;
 + p++;
 + }
 +   *q = 0;
 +   return strdup(buf);
 +}
 +
 +EAPI char *
  ecore_file_strip_ext(const char *path)
  {
 char *p, *file = NULL;
 
Do you really want static in static char buf[PATH_MAX] ?

/Kim

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] E CVS: libs/ecore onefang

2006-10-28 Thread David Seikel
On Sat, 28 Oct 2006 17:41:39 +0200 Kim Woelders [EMAIL PROTECTED] wrote:

 Enlightenment CVS wrote:
  Enlightenment CVS committal
  
  Author  : onefang
  Project : e17
  Module  : libs/ecore
  
  Dir : e17/libs/ecore/src/lib/ecore_file
  
  
  Modified Files:
  Ecore_File.h ecore_file.c 
  
  
  Log Message:
  Copy filename escaping code from e_utils to make it more generally
  available. Step 2 is to remove the original and have everything
  call this one instead.
  
  ===
  RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore_file/Ecore_File.h,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -3 -r1.27 -r1.28
  --- Ecore_File.h8 Sep 2006 16:52:29 -   1.27
  +++ Ecore_File.h28 Oct 2006 08:48:11 -  1.28
  @@ -76,6 +76,7 @@
  EAPI char   *ecore_file_readlink (const char *link);
  EAPI Ecore_List *ecore_file_ls   (const char *dir);
  EAPI char   *ecore_file_app_exe_get  (const char *app);
  +   EAPI char   *ecore_file_escape_name  (const char *filename);
  EAPI char   *ecore_file_strip_ext(const char *file);
  
  EAPI Ecore_File_Monitor *ecore_file_monitor_add(const char
  *path,
  ===
  RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore_file/ecore_file.c,v
  retrieving revision 1.49 retrieving revision 1.50
  diff -u -3 -r1.49 -r1.50
  --- ecore_file.c15 Oct 2006 09:32:25 -  1.49
  +++ ecore_file.c28 Oct 2006 08:48:11 -  1.50
  @@ -480,6 +480,40 @@
   }
   
   EAPI char *
  +ecore_file_escape_name(const char *filename)
  +{
  +   const char *p;
  +   char *q;
  +   static char buf[PATH_MAX];
  +   
  +   p = filename;
  +   q = buf;
  +   while (*p)
  + {
  +   if ((q - buf)  (PATH_MAX - 6)) return NULL;
  +   if (
  +   (*p == ' ') || (*p == '\t') || (*p == '\n') ||
  +   (*p == '\\') || (*p == '\'') || (*p == '\') ||
  +   (*p == ';') || (*p == '!') || (*p == '#') ||
  +   (*p == '$') || (*p == '%') || (*p == '') ||
  +   (*p == '*') || (*p == '(') || (*p == ')') ||
  +   (*p == '[') || (*p == ']') || (*p == '{') ||
  +   (*p == '}') || (*p == '|') || (*p == '') ||
  +   (*p == '') || (*p == '?')
  +   )
  + {
  +*q = '\\';
  +q++;
  + }
  +   *q = *p;
  +   q++;
  +   p++;
  + }
  +   *q = 0;
  +   return strdup(buf);
  +}
  +
  +EAPI char *
   ecore_file_strip_ext(const char *path)
   {
  char *p, *file = NULL;
  
 Do you really want static in static char buf[PATH_MAX] ?

Correct, it's not wanted anymore.  I'll fix that now.


signature.asc
Description: PGP signature
-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Subtitles in Emotion ?

2006-10-28 Thread The Rasterman
On Sat, 28 Oct 2006 22:44:07 +0200 Charles de Noyelle [EMAIL PROTECTED]
babbled:

 Hello,
 
 My post is about .srt subtitles in Emotion.
 
 I tried to look into the code, and I *think* that nothing is done to 
 read subtitles. What I expected and look for is kind of
 
 EAPI void emotion_object_{subtitles,spu}_file_set ( Evas_Object *obj, 
 const char *filename )
 
 I saw the emotion_object_spu_channel_count(Evas_Object *obj) But I 
 could not figure out what it was used for... DVD's subs ?

yes - dvd subtitles are handled by libxine as video overlays - they do work if
turned on. there is no way to use external files.

 The thing is that needs some changes in Emotion EAPI, and maybe, a such 
 thing is not wanted (read subtitles in Emotion).
 
 What do you thing about it? Would that be easy to do? Is it necessary?

i suggest first looking at gstreamer and xine api's to see if you can put it
there as the subtitles also need to be timed to the video.

 
 The point for me to do this, is to be able to read subtitled movies in 
 rage, which I just love :) (thanx raster)
 
 I made the first patch to be able to do so in this app... It enables 
 rage to avoid the thumbnailing of .srt files.

thanks - though won't appply to my local rage src at all - i currently don't
have any time to work on this unfortunately :(

 - 8 ---
 rage-0.1.0/src/bin/bg.c bg.c
 32a33,40
   int
   is_subtitle_file ( char *file )
   {
  if ( ( strlen ( file )  4 ) 
  !strncmp ( (file + strlen (file) - 4 ), .srt, 4 ) ) return 1;
  return 0;
   }
  
 48c56
 if (file[0] != '.')
 ---
  if ( (file[0] != '.')  ( ! is_subtitle_file ( file ) ) )
  8 ---
 
 I know, it was kind of easy to make, and probably not well made... but 
 it might help someone :)
 
 -- 
 Charles de Noyelle
 
 -
 Using Tomcat but need to do more? Need to support web services, security?
 Get stuff done quickly with pre-integrated technology to make your job easier
 Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
 ___
 enlightenment-devel mailing list
 enlightenment-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
 


-- 
- Codito, ergo sum - I code, therefore I am --
The Rasterman (Carsten Haitzler)[EMAIL PROTECTED]
裸好多
Tokyo, Japan (東京 日本)

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] E CVS: libs/ecore onefang

2006-10-28 Thread The Rasterman
On Sat, 28 Oct 2006 17:41:39 +0200 Kim Woelders [EMAIL PROTECTED] babbled:

 Enlightenment CVS wrote:
  Enlightenment CVS committal
  
  Author  : onefang
  Project : e17
  Module  : libs/ecore
  
  Dir : e17/libs/ecore/src/lib/ecore_file
  
  
  Modified Files:
  Ecore_File.h ecore_file.c 
  
  
  Log Message:
  Copy filename escaping code from e_utils to make it more generally
  available. Step 2 is to remove the original and have everything call this
  one instead.
  
  ===
  RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore_file/Ecore_File.h,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -3 -r1.27 -r1.28
  --- Ecore_File.h8 Sep 2006 16:52:29 -   1.27
  +++ Ecore_File.h28 Oct 2006 08:48:11 -  1.28
  @@ -76,6 +76,7 @@
  EAPI char   *ecore_file_readlink (const char *link);
  EAPI Ecore_List *ecore_file_ls   (const char *dir);
  EAPI char   *ecore_file_app_exe_get  (const char *app);
  +   EAPI char   *ecore_file_escape_name  (const char *filename);
  EAPI char   *ecore_file_strip_ext(const char *file);
  
  EAPI Ecore_File_Monitor *ecore_file_monitor_add(const char *path,
  ===
  RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore_file/ecore_file.c,v
  retrieving revision 1.49
  retrieving revision 1.50
  diff -u -3 -r1.49 -r1.50
  --- ecore_file.c15 Oct 2006 09:32:25 -  1.49
  +++ ecore_file.c28 Oct 2006 08:48:11 -  1.50
  @@ -480,6 +480,40 @@
   }
   
   EAPI char *
  +ecore_file_escape_name(const char *filename)
  +{
  +   const char *p;
  +   char *q;
  +   static char buf[PATH_MAX];
  +   
  +   p = filename;
  +   q = buf;
  +   while (*p)
  + {
  +   if ((q - buf)  (PATH_MAX - 6)) return NULL;
  +   if (
  +   (*p == ' ') || (*p == '\t') || (*p == '\n') ||
  +   (*p == '\\') || (*p == '\'') || (*p == '\') ||
  +   (*p == ';') || (*p == '!') || (*p == '#') ||
  +   (*p == '$') || (*p == '%') || (*p == '') ||
  +   (*p == '*') || (*p == '(') || (*p == ')') ||
  +   (*p == '[') || (*p == ']') || (*p == '{') ||
  +   (*p == '}') || (*p == '|') || (*p == '') ||
  +   (*p == '') || (*p == '?')
  +   )
  + {
  +*q = '\\';
  +q++;
  + }
  +   *q = *p;
  +   q++;
  +   p++;
  + }
  +   *q = 0;
  +   return strdup(buf);
  +}
  +
  +EAPI char *
   ecore_file_strip_ext(const char *path)
   {
  char *p, *file = NULL;
  
 Do you really want static in static char buf[PATH_MAX] ?

no - thats a leftover from how it was used in e - to just not have to free up
the returns when used as part of snprintf's. u don't want both a static and a
strdup. :)

 /Kim
 
 -
 Using Tomcat but need to do more? Need to support web services, security?
 Get stuff done quickly with pre-integrated technology to make your job easier
 Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
 ___
 enlightenment-devel mailing list
 enlightenment-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
 


-- 
- Codito, ergo sum - I code, therefore I am --
The Rasterman (Carsten Haitzler)[EMAIL PROTECTED]
裸好多
Tokyo, Japan (東京 日本)

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel