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:
13
misc.c
13
misc.c
@ -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)
|
||||
|
Reference in New Issue
Block a user