Enlightenment CVS committal Author : vacuum Project : e17 Module : libs/embryo
Dir : e17/libs/embryo/src/bin Modified Files: embryo_cc_sc1.c embryo_cc_sc2.c Log Message: Fix my previous snprintf commit. =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/embryo/src/bin/embryo_cc_sc1.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -3 -r1.13 -r1.14 --- embryo_cc_sc1.c 25 Jul 2004 04:40:16 -0000 1.13 +++ embryo_cc_sc1.c 25 Jul 2004 14:52:24 -0000 1.14 @@ -19,7 +19,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.13 2004/07/25 04:40:16 vacuum Exp $ + * Version: $Id: embryo_cc_sc1.c,v 1.14 2004/07/25 14:52:24 vacuum Exp $ */ #include <assert.h> #include <ctype.h> @@ -2151,7 +2151,7 @@ { tag &= TAGMASK; assert(tag >= 0); - snprintf(dest, sizeof(dest)-1, "0%x", tag); + snprintf(dest, sizeof(dest), "0%x", tag); return isdigit(dest[1]) ? &dest[1] : dest; } @@ -2165,12 +2165,12 @@ assert(numtags >= 1 && numtags <= 2); opertok = (opername[1] == '\0') ? opername[0] : 0; if (opertok == '=') - snprintf(symname, sizeof(symname)-1, "%s%s%s", tag2str(tagstr1, resulttag), opername, + snprintf(symname, sizeof(symname), "%s%s%s", tag2str(tagstr1, resulttag), opername, tag2str(tagstr2, tag1)); else if (numtags == 1 || opertok == '~') - snprintf(symname, sizeof(symname)-1, "%s%s", opername, tag2str(tagstr1, tag1)); + snprintf(symname, sizeof(symname), "%s%s", opername, tag2str(tagstr1, tag1)); else - snprintf(symname, sizeof(symname)-1, "%s%s%s", tag2str(tagstr1, tag1), opername, + snprintf(symname, sizeof(symname), "%s%s%s", tag2str(tagstr1, tag1), opername, tag2str(tagstr2, tag2)); return symname; } @@ -2226,7 +2226,7 @@ assert(tagsym[1] != NULL); if (unary) { - snprintf(dest, sizeof(dest)-1, "operator%s(%s:)", opname, tagsym[1]->name); + snprintf(dest, sizeof(dest), "operator%s(%s:)", opname, tagsym[1]->name); } else { @@ -2234,10 +2234,10 @@ /* special case: the assignment operator has the return value * as the 2nd tag */ if (opname[0] == '=' && opname[1] == '\0') - snprintf(dest, sizeof(dest)-1, "%s:operator%s(%s:)", tagsym[0]->name, + snprintf(dest, sizeof(dest), "%s:operator%s(%s:)", tagsym[0]->name, opname, tagsym[1]->name); else - snprintf(dest, sizeof(dest)-1, "operator%s(%s:,%s:)", opname, + snprintf(dest, sizeof(dest), "operator%s(%s:,%s:)", opname, tagsym[0]->name, tagsym[1]->name); } /* if */ return dest; =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/embryo/src/bin/embryo_cc_sc2.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -3 -r1.9 -r1.10 --- embryo_cc_sc2.c 25 Jul 2004 04:40:16 -0000 1.9 +++ embryo_cc_sc2.c 25 Jul 2004 14:52:24 -0000 1.10 @@ -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_sc2.c,v 1.9 2004/07/25 04:40:16 vacuum Exp $ + * Version: $Id: embryo_cc_sc2.c,v 1.10 2004/07/25 14:52:24 vacuum Exp $ */ #include <assert.h> #include <stdio.h> @@ -1196,7 +1196,7 @@ extern char *sc_tokens[]; /* forward declaration */ if (tok < 256) - snprintf(s2, sizeof(s2)-1, "%c", (char)tok); + snprintf(s2, sizeof(s2), "%c", (char)tok); else strcpy(s2, sc_tokens[tok - tFIRST]); error(1, sc_tokens[tSYMBOL - tFIRST], s2); @@ -2139,13 +2139,13 @@ /* token already pushed back */ assert(_pushed); if (token < 256) - snprintf(s1, sizeof(s1)-1, "%c", (char)token); /* single character token */ + snprintf(s1, sizeof(s1), "%c", (char)token); /* single character token */ else strcpy(s1, sc_tokens[token - tFIRST]); /* multi-character symbol */ if (!freading) strcpy(s2, "-end of file-"); else if (_lextok < 256) - snprintf(s2, sizeof(s1)-1, "%c", (char)_lextok); + snprintf(s2, sizeof(s1), "%c", (char)_lextok); else strcpy(s2, sc_tokens[_lextok - tFIRST]); error(1, s1, s2); /* expected ..., but found ... */ ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click _______________________________________________ enlightenment-cvs mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs