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_sc5.c 


Log Message:
sanitized asm file handling
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/embryo/src/bin/embryo_cc_sc.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- embryo_cc_sc.h      26 Mar 2005 16:37:25 -0000      1.8
+++ embryo_cc_sc.h      26 Mar 2005 16:44:12 -0000      1.9
@@ -9,7 +9,7 @@
  *  Copyright J.E. Hendrix, 1982, 1983
  *  Copyright T. Riemersma, 1997-2003
  *
- *  Version: $Id: embryo_cc_sc.h,v 1.8 2005/03/26 16:37:25 tsauerbeck Exp $
+ *  Version: $Id: embryo_cc_sc.h,v 1.9 2005/03/26 16:44:12 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
@@ -412,7 +412,7 @@
 
 /* output to intermediate (.ASM) file */
    void               *sc_openasm(int fd);     /* read/write */
-   void                sc_closeasm(void *handle, int deletefile);
+   void                sc_closeasm(void *handle);
    void                sc_resetasm(void *handle);
    int                 sc_writeasm(void *handle, char *str);
    char               *sc_readasm(void *handle, char *target, int maxchars);
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/embryo/src/bin/embryo_cc_sc1.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -3 -r1.23 -r1.24
--- embryo_cc_sc1.c     26 Mar 2005 16:37:25 -0000      1.23
+++ embryo_cc_sc1.c     26 Mar 2005 16:44:12 -0000      1.24
@@ -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.23 2005/03/26 16:37:25 tsauerbeck Exp $
+ *  Version: $Id: embryo_cc_sc1.c,v 1.24 2005/03/26 16:44:12 tsauerbeck Exp $
  */
 #include <assert.h>
 #include <ctype.h>
@@ -220,12 +220,10 @@
 }
 
 void
-sc_closeasm(void *handle, int deletefile)
+sc_closeasm(void *handle)
 {
    if (handle != NULL)
       fclose((FILE *) handle);
-   if (deletefile)
-      unlink(outfname);
 }
 
 void
@@ -326,6 +324,8 @@
    if (fd_out < 0)
      error(101, outfname);
 
+   unlink (outfname); /* kill this file as soon as it's (f)close'd */
+
    setconfig(argv[0]);         /* the path to the include files */
    lcl_ctrlchar = sc_ctrlchar;
    lcl_packstr = sc_packstr;
@@ -428,7 +428,7 @@
        assemble(binf, outf);   /* assembler file is now input */
      }                         /* if */
    if (outf != NULL)
-      sc_closeasm(outf, TRUE);
+      sc_closeasm(outf);
    if (binf != NULL)
       sc_closebin(binf, errnum != 0);
 
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/embryo/src/bin/embryo_cc_sc5.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- embryo_cc_sc5.c     19 Oct 2004 16:50:27 -0000      1.5
+++ embryo_cc_sc5.c     26 Mar 2005 16:44:12 -0000      1.6
@@ -22,7 +22,7 @@
  *      misrepresented as being the original software.
  *  3.  This notice may not be removed or altered from any source distribution.
  *
- *  Version: $Id: embryo_cc_sc5.c,v 1.5 2004/10/19 16:50:27 tsauerbeck Exp $
+ *  Version: $Id: embryo_cc_sc5.c,v 1.6 2005/03/26 16:44:12 tsauerbeck Exp $
  */
 #include <unistd.h>
 #include <stdio.h>
@@ -94,7 +94,7 @@
 
    if (sc_error(number, string, inpfname, start, fline, argptr))
    {
-      sc_closeasm(outf, TRUE);
+      sc_closeasm(outf);
       outf = NULL;
       longjmp(errbuf, 3);
    }
@@ -109,7 +109,7 @@
 
        if (outf != NULL)
          {
-            sc_closeasm(outf, TRUE);
+            sc_closeasm(outf);
             outf = NULL;
          }                     /* if */
        longjmp(errbuf, 2);     /* fatal error, quit */




-------------------------------------------------------
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=6595&alloc_id=14396&op=click
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to