move bi_getn from misc.c to funcs.c and make it static

even antique gcc versions will usually inline it now
This commit is contained in:
tg
2012-05-04 20:08:25 +00:00
parent 4cc5fc3e29
commit 7c4bf78446
3 changed files with 14 additions and 15 deletions

13
funcs.c
View File

@ -38,7 +38,7 @@
#endif
#endif
__RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.212 2012/04/06 13:28:59 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.213 2012/05/04 20:08:24 tg Exp $");
#if HAVE_KILLPG
/*
@ -60,6 +60,17 @@ __RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.212 2012/04/06 13:28:59 tg Exp $");
#define c_ulimit c_true
#endif
/* getn() that prints error */
static int
bi_getn(const char *as, int *ai)
{
int rv;
if (!(rv = getn(as, ai)))
bi_errorf("%s: %s", as, "bad number");
return (rv);
}
static int
c_true(const char **wp MKSH_A_UNUSED)
{