eab73b3dee
Rocklua was using the full fscanf implementation to simply read %ld for the file:read("*n") function wasting 1k on unneeded/unused functionality Instead, I've implemented a filetol function to duplicate it without the extra overhead using strtol which as an added bonus ERANGE errors now resolve to LONG_MIN and LONGMAX instead of integer overflow filetol() reads long int from an open file, skips preceding whitespaces returns -1 if error, 1 on success. *num set to LONG_MAX or LONG_MIN on overflow. If number of digits is > than LUAI_MAXNUMBER2STR filepointer will continue till the next non digit but buffer will stop being filled with characters. Preceding zero is ignored. Change-Id: Ia42d0f73c63a894625bca4581e9b7e1cc7387fd2
39 lines
360 B
Text
39 lines
360 B
Text
lauxlib.c
|
|
lapi.c
|
|
lbaselib.c
|
|
lbitlib.c
|
|
lcode.c
|
|
ldebug.c
|
|
ldo.c
|
|
ldump.c
|
|
lfunc.c
|
|
lgc.c
|
|
liolib.c
|
|
llex.c
|
|
lmathlib.c
|
|
lmem.c
|
|
loadlib.c
|
|
lobject.c
|
|
lopcodes.c
|
|
loslib.c
|
|
lparser.c
|
|
lstate.c
|
|
lstring.c
|
|
lstrlib.c
|
|
ltable.c
|
|
ltablib.c
|
|
ltm.c
|
|
lundump.c
|
|
lvm.c
|
|
lzio.c
|
|
rockaux.c
|
|
rocklib.c
|
|
rocklib_img.c
|
|
tlsf_helper.c
|
|
strftime.c
|
|
strpbrk.c
|
|
strtoul.c
|
|
strtol.c
|
|
strstr.c
|
|
rocklua.c
|
|
luadir.c
|