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
misc.c
View File

@ -30,7 +30,7 @@
#include <grp.h>
#endif
__RCSID("$MirOS: src/bin/mksh/misc.c,v 1.187 2012/04/06 12:59:27 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/misc.c,v 1.188 2012/05/04 20:08:25 tg Exp $");
/* type bits for unsigned char */
unsigned char chtypes[UCHAR_MAX + 1];
@ -485,17 +485,6 @@ getn(const char *s, int *ai)
return (rv);
}
/* getn() that prints error */
int
bi_getn(const char *as, int *ai)
{
int rv;
if (!(rv = getn(as, ai)))
bi_errorf("%s: %s", as, "bad number");
return (rv);
}
/**
* pattern simplifications:
* - @(x) -> x (not @(x|y) though)