forked from enlightenment/efl
back to previous. no snprintf's. one of these broke embryo_cc.
SVN revision: 11037
This commit is contained in:
parent
2815e3efc1
commit
dcac490cff
|
@ -2151,7 +2151,7 @@ tag2str(char *dest, int tag)
|
||||||
{
|
{
|
||||||
tag &= TAGMASK;
|
tag &= TAGMASK;
|
||||||
assert(tag >= 0);
|
assert(tag >= 0);
|
||||||
snprintf(dest, sizeof(dest), "0%x", tag);
|
sprintf(dest, "0%x", tag);
|
||||||
return isdigit(dest[1]) ? &dest[1] : dest;
|
return isdigit(dest[1]) ? &dest[1] : dest;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2165,12 +2165,12 @@ operator_symname(char *symname, char *opername, int tag1, int tag2,
|
||||||
assert(numtags >= 1 && numtags <= 2);
|
assert(numtags >= 1 && numtags <= 2);
|
||||||
opertok = (opername[1] == '\0') ? opername[0] : 0;
|
opertok = (opername[1] == '\0') ? opername[0] : 0;
|
||||||
if (opertok == '=')
|
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));
|
tag2str(tagstr2, tag1));
|
||||||
else if (numtags == 1 || opertok == '~')
|
else if (numtags == 1 || opertok == '~')
|
||||||
snprintf(symname, sizeof(symname), "%s%s", opername, tag2str(tagstr1, tag1));
|
sprintf(symname, "%s%s", opername, tag2str(tagstr1, tag1));
|
||||||
else
|
else
|
||||||
snprintf(symname, sizeof(symname), "%s%s%s", tag2str(tagstr1, tag1), opername,
|
sprintf(symname, "%s%s%s", tag2str(tagstr1, tag1), opername,
|
||||||
tag2str(tagstr2, tag2));
|
tag2str(tagstr2, tag2));
|
||||||
return symname;
|
return symname;
|
||||||
}
|
}
|
||||||
|
@ -2226,7 +2226,7 @@ funcdisplayname(char *dest, char *funcname)
|
||||||
assert(tagsym[1] != NULL);
|
assert(tagsym[1] != NULL);
|
||||||
if (unary)
|
if (unary)
|
||||||
{
|
{
|
||||||
snprintf(dest, sizeof(dest), "operator%s(%s:)", opname, tagsym[1]->name);
|
sprintf(dest, "operator%s(%s:)", opname, tagsym[1]->name);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -2234,11 +2234,11 @@ funcdisplayname(char *dest, char *funcname)
|
||||||
/* special case: the assignment operator has the return value
|
/* special case: the assignment operator has the return value
|
||||||
* as the 2nd tag */
|
* as the 2nd tag */
|
||||||
if (opname[0] == '=' && opname[1] == '\0')
|
if (opname[0] == '=' && opname[1] == '\0')
|
||||||
snprintf(dest, sizeof(dest), "%s:operator%s(%s:)", tagsym[0]->name,
|
sprintf(dest, "%s:operator%s(%s:)", tagsym[0]->name, opname,
|
||||||
opname, tagsym[1]->name);
|
tagsym[1]->name);
|
||||||
else
|
else
|
||||||
snprintf(dest, sizeof(dest), "operator%s(%s:,%s:)", opname,
|
sprintf(dest, "operator%s(%s:,%s:)", opname, tagsym[0]->name,
|
||||||
tagsym[0]->name, tagsym[1]->name);
|
tagsym[1]->name);
|
||||||
} /* if */
|
} /* if */
|
||||||
return dest;
|
return dest;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1196,7 +1196,7 @@ command(void)
|
||||||
extern char *sc_tokens[]; /* forward declaration */
|
extern char *sc_tokens[]; /* forward declaration */
|
||||||
|
|
||||||
if (tok < 256)
|
if (tok < 256)
|
||||||
snprintf(s2, sizeof(s2), "%c", (char)tok);
|
sprintf(s2, "%c", (char)tok);
|
||||||
else
|
else
|
||||||
strcpy(s2, sc_tokens[tok - tFIRST]);
|
strcpy(s2, sc_tokens[tok - tFIRST]);
|
||||||
error(1, sc_tokens[tSYMBOL - tFIRST], s2);
|
error(1, sc_tokens[tSYMBOL - tFIRST], s2);
|
||||||
|
@ -2139,13 +2139,13 @@ needtoken(int token)
|
||||||
/* token already pushed back */
|
/* token already pushed back */
|
||||||
assert(_pushed);
|
assert(_pushed);
|
||||||
if (token < 256)
|
if (token < 256)
|
||||||
snprintf(s1, sizeof(s1), "%c", (char)token); /* single character token */
|
sprintf(s1, "%c", (char)token); /* single character token */
|
||||||
else
|
else
|
||||||
strcpy(s1, sc_tokens[token - tFIRST]); /* multi-character symbol */
|
strcpy(s1, sc_tokens[token - tFIRST]); /* multi-character symbol */
|
||||||
if (!freading)
|
if (!freading)
|
||||||
strcpy(s2, "-end of file-");
|
strcpy(s2, "-end of file-");
|
||||||
else if (_lextok < 256)
|
else if (_lextok < 256)
|
||||||
snprintf(s2, sizeof(s1), "%c", (char)_lextok);
|
sprintf(s2, "%c", (char)_lextok);
|
||||||
else
|
else
|
||||||
strcpy(s2, sc_tokens[_lextok - tFIRST]);
|
strcpy(s2, sc_tokens[_lextok - tFIRST]);
|
||||||
error(1, s1, s2); /* expected ..., but found ... */
|
error(1, s1, s2); /* expected ..., but found ... */
|
||||||
|
|
Loading…
Reference in New Issue