Make match function globally available to stdlib functions.

* libc/stdlib/strtod.c (match): Move from here...
	* libc/stdlib/gdtoa-hexnan.c (match): ...to here.
	* libc/stdlib/mprec.h (match): Declare and add __match define.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen
2015-11-20 18:03:05 +01:00
parent b5d8a403ec
commit 51bf1b81f3
4 changed files with 26 additions and 21 deletions

View File

@ -44,6 +44,24 @@ THIS SOFTWARE.
#include "gdtoa.h"
#ifdef INFNAN_CHECK
int
_DEFUN (match, (sp, t),
_CONST char **sp _AND
char *t)
{
int c, d;
_CONST char *s = *sp;
while( (d = *t++) !=0) {
if ((c = *++s) >= 'A' && c <= 'Z')
c += 'a' - 'A';
if (c != d)
return 0;
}
*sp = s + 1;
return 1;
}
static void
_DEFUN (L_shift, (x, x1, i),
__ULong *x _AND