E CVS: libs/imlib2 raster

2005-03-26 Thread enlightenment-cvs
Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/imlib2

Dir : e17/libs/imlib2/src/modules/loaders


Modified Files:
loader_bz2.c 


Log Message:


no dot!

===
RCS file: 
/cvsroot/enlightenment/e17/libs/imlib2/src/modules/loaders/loader_bz2.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- loader_bz2.c26 Mar 2005 06:48:40 -  1.2
+++ loader_bz2.c26 Mar 2005 11:30:24 -  1.3
@@ -60,6 +60,8 @@
if (p) {
if (strcasecmp(p + 1, bz2)) return 0;
}
+   else
+   return 0;
if (!(fp = fopen (im-real_file, rb))) {
return 0;
}




---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/imlib2 tsauerbeck

2005-03-26 Thread enlightenment-cvs
Enlightenment CVS committal

Author  : tsauerbeck
Project : e17
Module  : libs/imlib2

Dir : e17/libs/imlib2/src/modules/loaders


Modified Files:
loader_bz2.c 


Log Message:
another bug in the bz2 loader: we need to duplicate the original filename so we 
don't access free'd memory
===
RCS file: 
/cvsroot/enlightenment/e17/libs/imlib2/src/modules/loaders/loader_bz2.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- loader_bz2.c26 Mar 2005 11:30:24 -  1.3
+++ loader_bz2.c26 Mar 2005 11:43:06 -  1.4
@@ -54,14 +54,13 @@
 
assert (im);
 
-   /* we'll need a copy of it later */
-   file = im-real_file;
p = strrchr(im-real_file, '.');
if (p) {
-   if (strcasecmp(p + 1, bz2)) return 0;
-   }
-   else
+   if (strcasecmp(p + 1, bz2))
+   return 0;
+   } else
return 0;
+
if (!(fp = fopen (im-real_file, rb))) {
return 0;
}
@@ -85,12 +84,15 @@
return 0;
}
 
+   /* remember the original filename */
+   file = strdup (im-real_file);
+
free (im-real_file);
im-real_file = strdup (tmp);
loader-load (im, progress, progress_granularity, immediate_load);
 
free (im-real_file);
-   im-real_file = strdup (file);
+   im-real_file = file;
unlink (tmp);
 
return 1;




---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/imlib2 tsauerbeck

2005-03-26 Thread enlightenment-cvs
Enlightenment CVS committal

Author  : tsauerbeck
Project : e17
Module  : libs/imlib2

Dir : e17/libs/imlib2/src/modules/loaders


Modified Files:
loader_zlib.c 


Log Message:
fixed a fd leak and a bad memory access bug
===
RCS file: 
/cvsroot/enlightenment/e17/libs/imlib2/src/modules/loaders/loader_zlib.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- loader_zlib.c   1 Nov 2004 09:45:31 -   1.1
+++ loader_zlib.c   26 Mar 2005 11:46:49 -  1.2
@@ -67,22 +67,28 @@
 {
ImlibLoader *loader;
int src, dest;
-   char *file, tmp[] = /tmp/imlib2_loader_zlib-XX;
+   char *file, *p, tmp[] = /tmp/imlib2_loader_zlib-XX;
struct stat st;
 
assert (im);
 
-   /* we'll need a copy of it later */
-   file = im-real_file;
+   /* check that this file ends in *.gz */
+   p = strrchr(im-real_file, '.');
+   if (p) {
+   if (strcasecmp(p + 1, gz))
+   return 0;
+   } else
+   return 0;
 
if (stat (im-real_file, st)  0)
return 0;
 
-   if ((dest = mkstemp (tmp))  0)
+   if ((src = open (im-real_file, O_RDONLY))  0) {
return 0;
+   }
 
-   if ((src = open (im-real_file, O_RDONLY))  0) {
-   unlink (tmp);
+   if ((dest = mkstemp (tmp))  0) {
+   close (src);
return 0;
}
 
@@ -96,12 +102,15 @@
return 0;
}
 
+   /* remember the original filename */
+   file = strdup (im-real_file);
+
free (im-real_file);
im-real_file = strdup (tmp);
loader-load (im, progress, progress_granularity, immediate_load);
 
free (im-real_file);
-   im-real_file = strdup (file);
+   im-real_file = file;
unlink (tmp);
 
return 1;




---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: e kwo

2005-03-26 Thread enlightenment-cvs
Enlightenment CVS committal

Author  : kwo
Project : e16
Module  : e

Dir : e16/e/src


Modified Files:
timestamp.h 


Log Message:
Sat Mar 26 13:09:50 CET 2005
(Kim)

--- 0.16.8 0.07 ---
Update theme.
Remove non-functional external imageclass stuff.
Copyright updates. More enlightenment-e16.
Simplify building non-final releases.
Fix pointer focus on virtual roots.
Fix type (may have caused trouble with focus list settings).
Avoid confusion with edb. Fix null string item problem.
Fix some remembered settings bugs.
Fix various opacity setting bugs.
Fix keygrabs handling (e.g. focus list staying up).

===
RCS file: /cvsroot/enlightenment/e16/e/src/timestamp.h,v
retrieving revision 1.639
retrieving revision 1.640
diff -u -3 -r1.639 -r1.640
--- timestamp.h 19 Mar 2005 11:04:52 -  1.639
+++ timestamp.h 26 Mar 2005 12:12:00 -  1.640
@@ -1 +1 @@
-#define E_CHECKOUT_DATE $Date: 2005/03/19 11:04:52 $
+#define E_CHECKOUT_DATE $Date: 2005/03/26 12:12:00 $




---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/imlib2 tsauerbeck

2005-03-26 Thread enlightenment-cvs
Enlightenment CVS committal

Author  : tsauerbeck
Project : e17
Module  : libs/imlib2

Dir : e17/libs/imlib2/src/modules/loaders


Modified Files:
loader_bz2.c loader_zlib.c 


Log Message:
zlib/bz2 loaders, round 2: look for the real loader using a fake filename 
(original filename with the bz2/gz suffix cut)
===
RCS file: 
/cvsroot/enlightenment/e17/libs/imlib2/src/modules/loaders/loader_bz2.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- loader_bz2.c26 Mar 2005 11:43:06 -  1.4
+++ loader_bz2.c26 Mar 2005 12:32:07 -  1.5
@@ -51,16 +51,27 @@
FILE *fp;
int dest, res;
char *file, tmp[] = /tmp/imlib2_loader_bz2-XX, *p;
+   char real_ext[16];
 
assert (im);
 
+   /* make sure this file ends in .bz2 and that there's another ext
+* (e.g. foo.png.bz2
+*/
p = strrchr(im-real_file, '.');
-   if (p) {
+   if (p  p != im-real_file) {
if (strcasecmp(p + 1, bz2))
return 0;
} else
return 0;
 
+   strncpy (real_ext, p - sizeof (real_ext) + 1, sizeof (real_ext));
+   real_ext[sizeof (real_ext) - 1] = '\0';
+
+   /* abort if there's no dot in the real filename */
+   if (!strrchr (real_ext, '.'))
+   return 0;
+
if (!(fp = fopen (im-real_file, rb))) {
return 0;
}
@@ -79,7 +90,7 @@
return 0;
}
 
-   if (!(loader = __imlib_FindBestLoaderForFile (tmp, 0))) {
+   if (!(loader = __imlib_FindBestLoaderForFile (real_ext, 0))) {
unlink (tmp);
return 0;
}
===
RCS file: 
/cvsroot/enlightenment/e17/libs/imlib2/src/modules/loaders/loader_zlib.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- loader_zlib.c   26 Mar 2005 11:46:49 -  1.2
+++ loader_zlib.c   26 Mar 2005 12:32:07 -  1.3
@@ -68,18 +68,28 @@
ImlibLoader *loader;
int src, dest;
char *file, *p, tmp[] = /tmp/imlib2_loader_zlib-XX;
+   char real_ext[16];
struct stat st;
 
assert (im);
 
-   /* check that this file ends in *.gz */
+   /* check that this file ends in *.gz and that there's another ext
+* (e.g. foo.png.gz
+*/
p = strrchr(im-real_file, '.');
-   if (p) {
+   if (p  p != im-real_file) {
if (strcasecmp(p + 1, gz))
return 0;
} else
return 0;
 
+   strncpy (real_ext, p - sizeof (real_ext) + 1, sizeof (real_ext));
+   real_ext[sizeof (real_ext) - 1] = '\0';
+
+   /* abort if there's no dot in the real filename */
+   if (!strrchr (real_ext, '.'))
+   return 0;
+
if (stat (im-real_file, st)  0)
return 0;
 
@@ -97,7 +107,7 @@
close (src);
close (dest);
 
-   if (!(loader = __imlib_FindBestLoaderForFile (tmp, 0))) {
+   if (!(loader = __imlib_FindBestLoaderForFile (real_ext, 0))) {
unlink (tmp);
return 0;
}




---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/imlib2 tsauerbeck

2005-03-26 Thread enlightenment-cvs
Enlightenment CVS committal

Author  : tsauerbeck
Project : e17
Module  : libs/imlib2

Dir : e17/libs/imlib2/src/modules/loaders


Modified Files:
loader_zlib.c 


Log Message:
fix uncompression for the zlib loader
===
RCS file: 
/cvsroot/enlightenment/e17/libs/imlib2/src/modules/loaders/loader_zlib.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- loader_zlib.c   26 Mar 2005 12:32:07 -  1.3
+++ loader_zlib.c   26 Mar 2005 13:05:30 -  1.4
@@ -14,59 +14,39 @@
 #include image.h
 
 #define OUTBUF_SIZE 16484
-#define INBUF_SIZE 1024
 
-static int handle_buffer (DATA8 *src, unsigned long src_len,
-  DATA8 **dest, unsigned long *dest_len)
+static int uncompress_file (int src, int dest)
 {
-   static DATA8 outbuf[OUTBUF_SIZE];
-   uLongf outbuf_len = OUTBUF_SIZE;
-   int res;
-
-   assert (src);
-   assert (src_len);
-   assert (dest);
-   assert (dest_len);
-
-   res = uncompress (outbuf, outbuf_len, src, src_len);
-
-   switch (res) {
-   case Z_OK:
-   *dest = outbuf;
-   *dest_len = (unsigned long) outbuf_len;
-   return 1;
-   case Z_BUF_ERROR:
-   return 0;
-   default:
-   *dest = NULL;
-   *dest_len = 0;
-   return 0;
-   }
-}
+   gzFile gf;
+   DATA8 outbuf[OUTBUF_SIZE];
+   int ret = 1, bytes;
 
-static void uncompress_file (int src, int dest, off_t size)
-{
-   DATA8 inbuf[INBUF_SIZE], *outbuf;
-   off_t left;
-   ssize_t inlen;
-   unsigned long outlen = 0;
-
-   for (left = size; left; left -= inlen) {
-   inlen = read (src, inbuf, MIN (left, INBUF_SIZE));
-   
-   if (inlen = 0)
-   break;
+   gf = gzdopen (dup (src), rb);
+   if (!gf)
+   return 0;
 
-   if (handle_buffer (inbuf, inlen, outbuf, outlen))
-   write (dest, outbuf, outlen);
+   while (1) {
+   bytes = gzread (gf, outbuf, OUTBUF_SIZE);
+
+   if (!bytes)
+   break;
+   else if (bytes == -1) {
+   ret = 0;
+   break;
+   } else
+   write (dest, outbuf, bytes);
}
+
+   gzclose (gf);
+
+   return ret;
 }
 
 char load (ImlibImage *im, ImlibProgressFunction progress,
char progress_granularity, char immediate_load)
 {
ImlibLoader *loader;
-   int src, dest;
+   int src, dest, res;
char *file, *p, tmp[] = /tmp/imlib2_loader_zlib-XX;
char real_ext[16];
struct stat st;
@@ -102,11 +82,15 @@
return 0;
}
 
-   uncompress_file (src, dest, st.st_size);
-
+   res = uncompress_file (src, dest);
close (src);
close (dest);
 
+   if (!res) {
+   unlink (tmp);
+   return 0;
+   }
+
if (!(loader = __imlib_FindBestLoaderForFile (real_ext, 0))) {
unlink (tmp);
return 0;




---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/imlib2 tsauerbeck

2005-03-26 Thread enlightenment-cvs
Enlightenment CVS committal

Author  : tsauerbeck
Project : e17
Module  : libs/imlib2

Dir : e17/libs/imlib2/src/modules/loaders


Modified Files:
loader_bz2.c 


Log Message:
handle bzip2 errors
===
RCS file: 
/cvsroot/enlightenment/e17/libs/imlib2/src/modules/loaders/loader_bz2.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- loader_bz2.c26 Mar 2005 12:35:59 -  1.6
+++ loader_bz2.c26 Mar 2005 13:13:51 -  1.7
@@ -21,7 +21,7 @@
 {
BZFILE *bf;
DATA8 outbuf[OUTBUF_SIZE];
-   int bytes, error;
+   int bytes, error, ret = 1;
 
bf = BZ2_bzReadOpen (error, fp, 0, 0, NULL, 0);
 
@@ -35,13 +35,18 @@
 
if (error == BZ_OK || error == BZ_STREAM_END)
write (dest, outbuf, bytes);
-   else
+
+   if (error == BZ_STREAM_END)
+   break;
+   else if (error != BZ_OK) {
+   ret = 0;
break;
+   }
}
 
BZ2_bzReadClose (error, bf);
 
-   return 1;
+   return ret;
 }
 
 char load (ImlibImage *im, ImlibProgressFunction progress,




---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/embryo tsauerbeck

2005-03-26 Thread enlightenment-cvs
Enlightenment CVS committal

Author  : tsauerbeck
Project : e17
Module  : libs/embryo

Dir : e17/libs/embryo/src/bin


Modified Files:
embryo_cc_sc.h embryo_cc_sc1.c embryo_cc_sc2.c embryo_cc_sc4.c 
embryo_cc_scvars.c 


Log Message:
removed some dead code
===
RCS file: /cvsroot/enlightenment/e17/libs/embryo/src/bin/embryo_cc_sc.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- embryo_cc_sc.h  12 Oct 2004 16:57:37 -  1.6
+++ embryo_cc_sc.h  26 Mar 2005 15:21:02 -  1.7
@@ -9,7 +9,7 @@
  *  Copyright J.E. Hendrix, 1982, 1983
  *  Copyright T. Riemersma, 1997-2003
  *
- *  Version: $Id: embryo_cc_sc.h,v 1.6 2004/10/12 16:57:37 tsauerbeck Exp $
+ *  Version: $Id: embryo_cc_sc.h,v 1.7 2005/03/26 15:21:02 tsauerbeck Exp $
  *
  *  This software is provided as-is, without any express or implied warranty.
  *  In no event will the authors be held liable for any damages arising from
@@ -501,8 +501,6 @@
 cellnameincells(char *name);
 voidsetfile(char *name, int fileno);
 voidsetline(int line, int fileno);
-voidsetfiledirect(char *name);
-voidsetlinedirect(int line);
 voidsetlabel(int index);
 voidendexpr(int fullexpr);
 voidstartfunc(char *fname);
===
RCS file: /cvsroot/enlightenment/e17/libs/embryo/src/bin/embryo_cc_sc1.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -3 -r1.20 -r1.21
--- embryo_cc_sc1.c 26 Feb 2005 14:46:07 -  1.20
+++ embryo_cc_sc1.c 26 Mar 2005 15:21:02 -  1.21
@@ -21,7 +21,7 @@
  *  must not be misrepresented as being the original software.
  *  3.  This notice may not be removed or altered from any source
  *  distribution.  
- *  Version: $Id: embryo_cc_sc1.c,v 1.20 2005/02/26 14:46:07 tsauerbeck Exp $
+ *  Version: $Id: embryo_cc_sc1.c,v 1.21 2005/03/26 15:21:02 tsauerbeck Exp $
  */
 #include assert.h
 #include ctype.h
@@ -316,10 +316,7 @@
 
setopt(argc, argv, inpfname, outfname, incfname, reportname);
/* set output names that depend on the input name */
-   if (sc_listing)
-  set_extension(outfname, .lst, TRUE);
-   else
-  set_extension(outfname, .asm, TRUE);
+   set_extension(outfname, .asm, TRUE);
strcpy(binfname, outfname);
set_extension(binfname, .amx, TRUE);
setconfig(argv[0]); /* the path to the include files */
@@ -336,33 +333,15 @@
if (outf == NULL)
   error(101, outfname);
/* immediately open the binary file, for other programs to check */
-   if (sc_asmfile || sc_listing)
- {
-   binf = NULL;
- }
-   else
- {
-   binf = (FILE *) sc_openbin(binfname);
-   if (binf == NULL)
-  error(101, binfname);
- } /* if */
+   binf = (FILE *) sc_openbin(binfname);
+   if (binf == NULL)
+ error(101, binfname);
setconstants(); /* set predefined constants and tagnames */
for (i = 0; i  skipinput; i++) /* skip lines in the input file */
   if (sc_readsrc(inpf, pline, sLINEMAX) != NULL)
 fline++;   /* keep line number up to date */
skipinput = fline;
sc_status = statFIRST;
-   /* write starting options (from the command line or the
-* configuration file) */
-   if (sc_listing)
- {
-   fprintf(outf, #pragma ctrlchar '%c'\n, sc_ctrlchar);
-   fprintf(outf, #pragma pack %s\n, sc_packstr ? true : false);
-   fprintf(outf, #pragma semicolon %s\n,
-   sc_needsemicolon ? true : false);
-   fprintf(outf, #pragma tabsize %d\n, sc_tabsize);
-   setfiledirect(inpfname);
- } /* if */
/* do the first pass through the file */
inpfmark = sc_getpossrc(inpf);
if (strlen(incfname)  0)
@@ -383,9 +362,6 @@
 
/* second pass */
sc_status = statWRITE;  /* set, to enable warnings */
-   /* write a report, if requested */
-   if (sc_listing)
-  goto cleanup;
 
/* ??? for re-parsing the listing file instead of the original source
 * file (and doing preprocessing twice):
@@ -438,14 +414,14 @@
if (inpf != NULL)   /* main source file is not closed, do it now */
   sc_closesrc(inpf);
/* write the binary file (the file is already open) */
-   if (!(sc_asmfile || sc_listing)  errnum == 0  jmpcode == 0)
+   if (errnum == 0  jmpcode == 0)
  {
assert(binf != NULL);
sc_resetasm(outf);  /* flush and loop back, for reading */
assemble(binf, outf);   /* assembler file is now input */
  } /* if */
if (outf != NULL)
-  sc_closeasm(outf, !(sc_asmfile || sc_listing));
+  sc_closeasm(outf, TRUE);
if (binf != NULL)
   sc_closebin(binf, errnum != 0);
 
@@ -568,8 +544,6 @@
 {
resetglobals();
 
-   sc_asmfile = FALSE; /* do not create .ASM file */
-   sc_listing = FALSE; 

E CVS: libs/embryo tsauerbeck

2005-03-26 Thread enlightenment-cvs
Enlightenment CVS committal

Author  : tsauerbeck
Project : e17
Module  : libs/embryo

Dir : e17/libs/embryo/src/bin


Modified Files:
embryo_cc_sc1.c 


Log Message:
Don't simply change the extension of the input file to foo.sma if it doesn't 
end in '.sma' already. If we really want embryo_cc to only accept *.sma files, 
it should print an error message if we feed it something other than a *.sma 
file. To be defined ;)

===
RCS file: /cvsroot/enlightenment/e17/libs/embryo/src/bin/embryo_cc_sc1.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -3 -r1.21 -r1.22
--- embryo_cc_sc1.c 26 Mar 2005 15:21:02 -  1.21
+++ embryo_cc_sc1.c 26 Mar 2005 15:27:14 -  1.22
@@ -21,7 +21,7 @@
  *  must not be misrepresented as being the original software.
  *  3.  This notice may not be removed or altered from any source
  *  distribution.  
- *  Version: $Id: embryo_cc_sc1.c,v 1.21 2005/03/26 15:21:02 tsauerbeck Exp $
+ *  Version: $Id: embryo_cc_sc1.c,v 1.22 2005/03/26 15:27:14 tsauerbeck Exp $
  */
 #include assert.h
 #include ctype.h
@@ -672,7 +672,6 @@
   {
 /* input file */
 strcpy(iname, argv[i]); /* FIXME */
-set_extension(iname, .sma, FALSE);
   }
   else
   {




---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/emotion raster

2005-03-26 Thread enlightenment-cvs
Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/emotion

Dir : e17/libs/emotion/src/modules/xine


Modified Files:
emotion_xine_vo_out.c 


Log Message:


segv waiting to happen

===
RCS file: 
/cvsroot/enlightenment/e17/libs/emotion/src/modules/xine/emotion_xine_vo_out.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- emotion_xine_vo_out.c   12 Jan 2005 11:35:04 -  1.4
+++ emotion_xine_vo_out.c   26 Mar 2005 15:49:17 -  1.5
@@ -522,6 +522,8 @@
int clip_right;
uint8_t clr=0;

+   if (!rle) return;
+   
uint8_t *dst_y = dst_base[0] + dst_pitches[0] * y_off + x_off;
uint8_t *dst_cr = dst_base[2] + (y_off / 2) * dst_pitches[1] + (x_off / 2) 
+ 1;
uint8_t *dst_cb = dst_base[1] + (y_off / 2) * dst_pitches[2] + (x_off / 2) 
+ 1;




---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/embryo tsauerbeck

2005-03-26 Thread enlightenment-cvs
Enlightenment CVS committal

Author  : tsauerbeck
Project : e17
Module  : libs/embryo

Dir : e17/libs/embryo/src/bin


Modified Files:
embryo_cc_sc.h embryo_cc_sc1.c 


Log Message:
use a temporary file for the intermediate asm output
===
RCS file: /cvsroot/enlightenment/e17/libs/embryo/src/bin/embryo_cc_sc.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- embryo_cc_sc.h  26 Mar 2005 15:21:02 -  1.7
+++ embryo_cc_sc.h  26 Mar 2005 16:37:25 -  1.8
@@ -9,7 +9,7 @@
  *  Copyright J.E. Hendrix, 1982, 1983
  *  Copyright T. Riemersma, 1997-2003
  *
- *  Version: $Id: embryo_cc_sc.h,v 1.7 2005/03/26 15:21:02 tsauerbeck Exp $
+ *  Version: $Id: embryo_cc_sc.h,v 1.8 2005/03/26 16:37:25 tsauerbeck Exp $
  *
  *  This software is provided as-is, without any express or implied warranty.
  *  In no event will the authors be held liable for any damages arising from
@@ -411,7 +411,7 @@
int sc_eofsrc(void *handle);
 
 /* output to intermediate (.ASM) file */
-   void   *sc_openasm(char *filename); /* read/write */
+   void   *sc_openasm(int fd); /* read/write */
voidsc_closeasm(void *handle, int deletefile);
voidsc_resetasm(void *handle);
int sc_writeasm(void *handle, char *str);
===
RCS file: /cvsroot/enlightenment/e17/libs/embryo/src/bin/embryo_cc_sc1.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -3 -r1.22 -r1.23
--- embryo_cc_sc1.c 26 Mar 2005 15:27:14 -  1.22
+++ embryo_cc_sc1.c 26 Mar 2005 16:37:25 -  1.23
@@ -21,7 +21,7 @@
  *  must not be misrepresented as being the original software.
  *  3.  This notice may not be removed or altered from any source
  *  distribution.  
- *  Version: $Id: embryo_cc_sc1.c,v 1.22 2005/03/26 15:27:14 tsauerbeck Exp $
+ *  Version: $Id: embryo_cc_sc1.c,v 1.23 2005/03/26 16:37:25 tsauerbeck Exp $
  */
 #include assert.h
 #include ctype.h
@@ -214,9 +214,9 @@
 }
 
 void   *
-sc_openasm(char *filename)
+sc_openasm(int fd)
 {
-   return fopen(filename, w+);
+   return fdopen(fd, w+);
 }
 
 void
@@ -285,7 +285,7 @@
 int
 sc_compile(int argc, char *argv[])
 {
-   int entry, i, jmpcode;
+   int entry, i, jmpcode, fd_out;
int retcode;
charincfname[_MAX_PATH];
charreportname[_MAX_PATH];
@@ -293,6 +293,7 @@
void   *inpfmark;
charlcl_ctrlchar;
int lcl_packstr, lcl_needsemicolon, lcl_tabsize;
+   char *tmpdir;
 
/* set global variables to their initial value */
binf = NULL;
@@ -314,11 +315,17 @@
if (!phopt_init())
   error(103);  /* insufficient memory */
 
-   setopt(argc, argv, inpfname, outfname, incfname, reportname);
-   /* set output names that depend on the input name */
-   set_extension(outfname, .asm, TRUE);
-   strcpy(binfname, outfname);
-   set_extension(binfname, .amx, TRUE);
+   setopt(argc, argv, inpfname, binfname, incfname, reportname);
+
+   /* open the output file */
+   tmpdir = getenv(TMPDIR);
+   if (!tmpdir) tmpdir = /tmp;
+
+   snprintf(outfname, _MAX_PATH, %s/embryo_cc.asm-tmp-XX, tmpdir);
+   fd_out = mkstemp(outfname);
+   if (fd_out  0)
+ error(101, outfname);
+
setconfig(argv[0]); /* the path to the include files */
lcl_ctrlchar = sc_ctrlchar;
lcl_packstr = sc_packstr;
@@ -328,7 +335,7 @@
if (inpf == NULL)
   error(100, inpfname);
freading = TRUE;
-   outf = (FILE *) sc_openasm(outfname);   /* first write to assembler
+   outf = (FILE *) sc_openasm(fd_out); /* first write to assembler
 * file (may be temporary) */
if (outf == NULL)
   error(101, outfname);




---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/ewl rbdpngn

2005-03-26 Thread enlightenment-cvs
Enlightenment CVS committal

Author  : rbdpngn
Project : e17
Module  : libs/ewl

Dir : e17/libs/ewl/src/lib


Modified Files:
ewl_image.c 


Log Message:
Use the minimum size of the edje group for the image widget preferred size.

===
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_image.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- ewl_image.c 26 Mar 2005 05:54:33 -  1.4
+++ ewl_image.c 27 Mar 2005 03:41:13 -  1.5
@@ -48,6 +48,8 @@
ewl_widget_init(w, image);
ewl_widget_inherit(w, image);
 
+   ewl_object_fill_policy_set(EWL_OBJECT(w), EWL_FLAG_FILL_NONE);
+
/*
 * Append necessary callbacks.
 */
@@ -282,6 +284,7 @@
 {
Ewl_Image  *i;
Ewl_Embed  *emb;
+   int width, height;
 
DENTER_FUNCTION(DLEVEL_STABLE);
DCHECK_PARAM_PTR(w, w);
@@ -300,7 +303,7 @@
 
if (i-path)
edje_object_file_set(i-image, i-path, i-key);
-
+   evas_object_image_size_get(i-image, i-ow, i-oh);
} else {
i-image = evas_object_image_add(emb-evas);
if (!i-image)
@@ -308,28 +311,31 @@
 
if (i-path)
evas_object_image_file_set(i-image, i-path, i-key);
+   edje_object_size_min_get(i-image, i-ow, i-oh);
}
 
evas_object_layer_set(i-image, ewl_widget_layer_sum_get(w));
if (w-fx_clip_box)
evas_object_clip_set(i-image, w-fx_clip_box);
-   evas_object_image_size_get(i-image, i-ow, i-oh);
evas_object_pass_events_set(i-image, TRUE);
evas_object_show(i-image);
 
if (!i-ow)
-   i-ow = 256;
+   i-ow = 1;
if (!i-oh)
-   i-oh = 256;
+   i-oh = 1;
+
+   width = ewl_object_preferred_inner_w_get(EWL_OBJECT(i));
+   height = ewl_object_preferred_inner_h_get(EWL_OBJECT(i));
 
-   if (!ewl_object_preferred_inner_w_get(EWL_OBJECT(i))) {
+   if ((width  EWL_OBJECT_MIN_SIZE)  (height  EWL_OBJECT_MIN_SIZE)) {
+   ewl_image_scale_to(i, width, height);
+   }
+   else {
ewl_object_preferred_inner_w_set(EWL_OBJECT(i), i-ow);
ewl_object_preferred_inner_h_set(EWL_OBJECT(i), i-oh);
ewl_image_scale(i, i-sw, i-sh);
}
-   else
-   ewl_image_scale_to(i, 
ewl_object_preferred_inner_w_get(EWL_OBJECT(i)),
-   
ewl_object_preferred_inner_h_get(EWL_OBJECT(i)));
 
DLEAVE_FUNCTION(DLEVEL_STABLE);
 }




---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs