get rid of ulton() - a joke

saves 32 bss, but adds 84 text oO
This commit is contained in:
tg
2006-11-09 23:55:52 +00:00
parent 88bf6422d9
commit 320f503391
4 changed files with 16 additions and 30 deletions

9
eval.c
View File

@ -2,7 +2,7 @@
#include "sh.h"
__RCSID("$MirOS: src/bin/mksh/eval.c,v 1.13 2006/08/01 13:43:26 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/eval.c,v 1.14 2006/11/09 23:55:51 tg Exp $");
/*
* string expansion
@ -717,7 +717,12 @@ varsub(Expand *xp, char *sp, char *word,
if (Flag(FNOUNSET) && c == 0 && !zero_ok)
errorf("%s: parameter not set", sp);
*stypep = 0; /* unqualified variable/string substitution */
xp->str = str_save(ulton((unsigned long)c, 10), ATEMP);
{
char tmpbuf[11];
shf_snprintf(tmpbuf, 11, "%lu", (unsigned long)c);
xp->str = str_save(tmpbuf, ATEMP);
}
return XSUB;
}