1
0
Fork 0
forked from len0rd/rockbox

puzzles: refactor and resync with upstream

This brings puzzles up-to-date with upstream revision
2d333750272c3967cfd5cd3677572cddeaad5932, though certain changes made
by me, including cursor-only Untangle and some compilation fixes
remain. Upstream code has been moved to its separate subdirectory and
future syncs can be done by simply copying over the new sources.

Change-Id: Ia6506ca5f78c3627165ea6791d38db414ace0804
This commit is contained in:
Franklin Wei 2017-04-29 18:21:56 -04:00
parent 03dd4b92be
commit 881746789a
329 changed files with 27350 additions and 1043 deletions

View file

@ -1346,9 +1346,12 @@ double scalbn_wrapper (double x, int n)
if (k > 0) /* normal result */
{__HI(x) = (hx&0x800fffff)|(k<<20); return x;}
if (k <= -54)
{
if (n > 50000) /* in case integer overflow in n+k */
return huge*copysign_wrapper(huge,x); /*overflow*/
else return tiny*copysign_wrapper(tiny,x); /*underflow*/
else
return tiny*copysign_wrapper(tiny,x); /*underflow*/
}
k += 54; /* subnormal result */
__HI(x) = (hx&0x800fffff)|(k<<20);
return x*twom54;
@ -1607,18 +1610,6 @@ static void bcopy_wrapper(const void *src, void *dst, size_t n)
memmove(dst, src, n);
}
int
sscanf_wrapper(const char *ibuf, const char *fmt, ...)
{
va_list ap;
int ret;
va_start(ap, fmt);
ret = rb_vsscanf(ibuf, fmt, ap);
va_end(ap);
return(ret);
}
int
rb_vsscanf(const char *inp, char const *fmt0, va_list ap)
{
@ -2065,6 +2056,18 @@ match_failure:
return (nassigned);
}
int
sscanf_wrapper(const char *ibuf, const char *fmt, ...)
{
va_list ap;
int ret;
va_start(ap, fmt);
ret = rb_vsscanf(ibuf, fmt, ap);
va_end(ap);
return(ret);
}
/*
* Fill in the given table from the scanset at the given format
* (just after `['). Return a pointer to the character past the