None of the changes in embryo_cc_sc1.c were correct.
They used sizeof on pointers rather than arrays...
All of the changes in embryo_cc_sc2.c were correct.
//Peter
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of [EMAIL PROTECTED]
Sent: Tuesday, July 27, 2004 02:58
To: [EMAIL PROTECTED]
Subject: E CVS: libs/embryo raster
Enlightenment CVS committal
Author : raster
Project : e17
Module : libs/embryo
Dir : e17/libs/embryo/src/bin
Modified Files:
embryo_cc_sc1.c embryo_cc_sc2.c
Log Message:
back to previous. no snprintf's. one of these broke embryo_cc.
===
RCS file:
/cvsroot/enlightenment/e17/libs/embryo/src/bin/embryo_cc_sc1.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -3 -r1.14 -r1.15
--- embryo_cc_sc1.c 25 Jul 2004 14:52:24 - 1.14
+++ embryo_cc_sc1.c 27 Jul 2004 00:58:25 - 1.15
@@ -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.14 2004/07/25 14:52:24
vacuum Exp $
+ * Version: $Id: embryo_cc_sc1.c,v 1.15 2004/07/27 00:58:25
raster Exp $
*/
#include assert.h
#include ctype.h
@@ -2151,7 +2151,7 @@
{
tag = TAGMASK;
assert(tag = 0);
- snprintf(dest, sizeof(dest), 0%x, tag);
+ sprintf(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), %s%s%s,
tag2str(tagstr1, resulttag), opername,
+ sprintf(symname, %s%s%s, tag2str(tagstr1,
resulttag), opername,
tag2str(tagstr2, tag1));
else if (numtags == 1 || opertok == '~')
- snprintf(symname, sizeof(symname), %s%s, opername,
tag2str(tagstr1, tag1));
+ sprintf(symname, %s%s, opername, tag2str(tagstr1, tag1));
else
- snprintf(symname, sizeof(symname), %s%s%s,
tag2str(tagstr1, tag1), opername,
+ sprintf(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), operator%s(%s:), opname,
tagsym[1]-name);
+ sprintf(dest, operator%s(%s:), opname, tagsym[1]-name);
}
else
{
@@ -2234,11 +2234,11 @@
/* special case: the assignment operator has the return value
* as the 2nd tag */
if (opname[0] == '=' opname[1] == '\0')
-snprintf(dest, sizeof(dest), %s:operator%s(%s:),
tagsym[0]-name,
- opname, tagsym[1]-name);
+sprintf(dest, %s:operator%s(%s:), tagsym[0]-name, opname,
+tagsym[1]-name);
else
-snprintf(dest, sizeof(dest), operator%s(%s:,%s:), opname,
- tagsym[0]-name, tagsym[1]-name);
+sprintf(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.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- embryo_cc_sc2.c 25 Jul 2004 14:52:24 - 1.10
+++ embryo_cc_sc2.c 27 Jul 2004 00:58:25 - 1.11
@@ -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.10 2004/07/25 14:52:24
vacuum Exp $
+ * Version: $Id: embryo_cc_sc2.c,v 1.11 2004/07/27 00:58:25
raster Exp $
*/
#include assert.h
#include stdio.h
@@ -1196,7 +1196,7 @@
extern char*sc_tokens[];
/* forward declaration */
if (tok 256)
-snprintf(s2, sizeof(s2), %c, (char)tok);
+sprintf(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), %c, (char)token); /*
single character token */
+sprintf(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), %c, (char)_lextok);
+sprintf(s2, %c, (char)_lextok);
else