diff options
Diffstat (limited to 'newlib/libc/stdlib/gdtoa-hexnan.c')
-rw-r--r-- | newlib/libc/stdlib/gdtoa-hexnan.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/newlib/libc/stdlib/gdtoa-hexnan.c b/newlib/libc/stdlib/gdtoa-hexnan.c index 4630005..24e3783 100644 --- a/newlib/libc/stdlib/gdtoa-hexnan.c +++ b/newlib/libc/stdlib/gdtoa-hexnan.c @@ -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 |