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 -0000 1.6 +++ embryo_cc_sc.h 26 Mar 2005 15:21:02 -0000 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 @@ cell nameincells(char *name); void setfile(char *name, int fileno); void setline(int line, int fileno); -void setfiledirect(char *name); -void setlinedirect(int line); void setlabel(int index); void endexpr(int fullexpr); void startfunc(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 -0000 1.20 +++ embryo_cc_sc1.c 26 Mar 2005 15:21:02 -0000 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; /* do not create .LST file */ skipinput = 0; /* number of lines to skip from the first * input file */ sc_ctrlchar = CTRL_CHAR; /* the escape character */ =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/embryo/src/bin/embryo_cc_sc2.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -3 -r1.15 -r1.16 --- embryo_cc_sc2.c 19 Oct 2004 16:50:27 -0000 1.15 +++ embryo_cc_sc2.c 26 Mar 2005 15:21:02 -0000 1.16 @@ -21,7 +21,7 @@ * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. * - * Version: $Id: embryo_cc_sc2.c,v 1.15 2004/10/19 16:50:27 tsauerbeck Exp $ + * Version: $Id: embryo_cc_sc2.c,v 1.16 2005/03/26 15:21:02 tsauerbeck Exp $ */ #include <assert.h> #include <stdio.h> @@ -126,7 +126,6 @@ fcurrent = fnumber; icomment = FALSE; setfile(inpfname, fcurrent); - setfiledirect(inpfname); listline = -1; /* force a #line directive when changing the file */ setactivefile(fcurrent); return TRUE; @@ -276,7 +275,6 @@ inpfname = (char *)popstk(); inpf = (FILE *) popstk(); setactivefile(fcurrent); - setfiledirect(inpfname); listline = -1; /* force a #line directive when changing the file */ elsedone = 0; } /* if */ @@ -1717,21 +1715,6 @@ lptr = pline; /* reset "line pointer" to start of the parsing buffer */ } /* if */ #endif - if (sc_status == statFIRST && sc_listing && freading - && (iscommand == CMD_NONE || iscommand == CMD_EMPTYLINE - || iscommand == CMD_DIRECTIVE)) - { - listline++; - if (fline != listline) - { - listline = fline; - setlinedirect(fline); - } /* if */ - if (iscommand == CMD_EMPTYLINE) - fputs("\n", outf); - else - fputs(pline, outf); - } /* if */ } while (iscommand != CMD_NONE && iscommand != CMD_TERM && freading); /* enddo */ } =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/embryo/src/bin/embryo_cc_sc4.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- embryo_cc_sc4.c 20 Apr 2004 03:50:11 -0000 1.2 +++ embryo_cc_sc4.c 26 Mar 2005 15:21:02 -0000 1.3 @@ -18,7 +18,7 @@ * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. * - * Version: $Id: embryo_cc_sc4.c,v 1.2 2004/04/20 03:50:11 raster Exp $ + * Version: $Id: embryo_cc_sc4.c,v 1.3 2005/03/26 15:21:02 tsauerbeck Exp $ */ #include <assert.h> #include <ctype.h> @@ -171,23 +171,6 @@ } /* if */ } -SC_FUNC void -setfiledirect(char *name) -{ - if (sc_status == statFIRST && sc_listing) - { - assert(name != NULL); - fprintf(outf, "#file %s\n", name); - } /* if */ -} - -SC_FUNC void -setlinedirect(int line) -{ - if (sc_status == statFIRST && sc_listing) - fprintf(outf, "#line %d\n", line); -} - /* setlabel * * Post a code label (specified as a number), on a new line. @@ -232,14 +215,6 @@ startfunc(char *fname) { stgwrite("\tproc"); - if (sc_asmfile) - { - char symname[2 * sNAMEMAX + 16]; - - funcdisplayname(symname, fname); - stgwrite("\t; "); - stgwrite(symname); - } /* if */ stgwrite("\n"); code_idx += opcodes(1); } @@ -679,12 +654,8 @@ SC_FUNC void ffcall(symbol * sym, int numargs) { - char symname[2 * sNAMEMAX + 16]; - assert(sym != NULL); assert(sym->ident == iFUNCTN); - if (sc_asmfile) - funcdisplayname(symname, sym->name); if ((sym->usage & uNATIVE) != 0) { /* reserve a SYSREQ id if called for the first time */ @@ -693,11 +664,6 @@ sym->addr = ntv_funcid++; stgwrite("\tsysreq.c "); outval(sym->addr, FALSE); - if (sc_asmfile) - { - stgwrite("\t; "); - stgwrite(symname); - } /* if */ stgwrite("\n\tstack "); outval((numargs + 1) * sizeof(cell), TRUE); code_idx += opcodes(2) + opargs(2); @@ -707,13 +673,6 @@ /* normal function */ stgwrite("\tcall "); stgwrite(sym->name); - if (sc_asmfile - && !isalpha(sym->name[0]) && sym->name[0] != '_' - && sym->name[0] != sc_ctrlchar) - { - stgwrite("\t; "); - stgwrite(symname); - } /* if */ stgwrite("\n"); code_idx += opcodes(1) + opargs(1); } /* if */ =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/embryo/src/bin/embryo_cc_scvars.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- embryo_cc_scvars.c 12 Oct 2004 16:57:38 -0000 1.4 +++ embryo_cc_scvars.c 26 Mar 2005 15:21:02 -0000 1.5 @@ -20,7 +20,7 @@ * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. * - * Version: $Id: embryo_cc_scvars.c,v 1.4 2004/10/12 16:57:38 tsauerbeck Exp $ + * Version: $Id: embryo_cc_scvars.c,v 1.5 2005/03/26 15:21:02 tsauerbeck Exp $ */ #include <stdio.h> #include <stdlib.h> /* for _MAX_PATH */ @@ -57,8 +57,6 @@ int sc_debug = sCHKBOUNDS; /* by default: bounds checking+assertions */ int charbits = 8; /* a "char" is 8 bits */ int sc_packstr = FALSE; /* strings are packed by default? */ -int sc_asmfile = FALSE; /* create .ASM file? */ -int sc_listing = FALSE; /* create .LST file? */ int sc_compress = TRUE; /* compress bytecode? */ int sc_needsemicolon = TRUE; /* semicolon required to terminate expressions? */ int sc_dataalign = sizeof(cell); /* data alignment value */ ------------------------------------------------------- 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