Roberto Ierusalimschy
|
5273477cb9
|
in 'lua_number2strx', use the call to 'l_sprintf' to add exponent
to result directly
|
9 years ago |
Roberto Ierusalimschy
|
5aabb7a891
|
buffer size changed from size_t to int (it is always small) +
comments + assert that printf result fits in given buffer
|
10 years ago |
Roberto Ierusalimschy
|
19eb6ae580
|
using 'snprintf' in C99 (both for documentation of buffer sizes
and some complains from tools)
|
10 years ago |
Roberto Ierusalimschy
|
99391e24ea
|
new configuration macro 'l_mathlim' (simplifies some dependencies
on float type)
|
10 years ago |
Roberto Ierusalimschy
|
48d0674c2e
|
more consistent use of locale radix character across Lua
|
10 years ago |
Roberto Ierusalimschy
|
e723c75c02
|
details (avoid 'lint' warnings)
|
10 years ago |
Roberto Ierusalimschy
|
2a57d2346e
|
detail
|
10 years ago |
Roberto Ierusalimschy
|
5e8c162b6c
|
detail
|
10 years ago |
Roberto Ierusalimschy
|
b7dfd18612
|
make buffer for format specification a little larger (length modifier
can be larger than 2, e.g. "I64")
|
10 years ago |
Roberto Ierusalimschy
|
8efcd411fe
|
own implementation for 'string.format("%a")' for C89 platforms
|
10 years ago |
Roberto Ierusalimschy
|
3509914916
|
BUG (when compiled with long double): buffer overflow when formatting
string.format("%.99f", 1e4930)
|
10 years ago |
Roberto Ierusalimschy
|
57e91b4159
|
correct computation for limit in 'getnum'
|
10 years ago |
Roberto Ierusalimschy
|
ef7d29c666
|
better limits for 'sting.rep' and 'string.packsize'
|
10 years ago |
Roberto Ierusalimschy
|
5c519a69d3
|
new function 'string.packsize'
|
10 years ago |
Roberto Ierusalimschy
|
32a1f54b9a
|
no more default size for option 'c' in pack/unpack
|
10 years ago |
Roberto Ierusalimschy
|
b401d37188
|
detail (to avoid a "to avoid warnings" return)
|
10 years ago |
Roberto Ierusalimschy
|
74e10b9c3b
|
details (error messages)
|
10 years ago |
Roberto Ierusalimschy
|
50b18f60cb
|
detail
|
10 years ago |
Roberto Ierusalimschy
|
ad73e5156e
|
more direct way to fill sign-extension extra bytes when packing
integers with sizes larger than lua_Integer + added comments
|
10 years ago |
Roberto Ierusalimschy
|
cfabcbfb17
|
added macro for configuring padding value in 'string.pack'
|
10 years ago |
Roberto Ierusalimschy
|
28fdbcf393
|
added include for 'lprefix.h', for stuff that must be added before
any other header file
|
10 years ago |
Roberto Ierusalimschy
|
dcfc3c9405
|
new option '=' (native endian) for pack/unpack
|
10 years ago |
Roberto Ierusalimschy
|
4542fb9f78
|
comments (a few extra quotes around identifiers)
|
10 years ago |
Roberto Ierusalimschy
|
61c3c80177
|
detail
|
10 years ago |
Roberto Ierusalimschy
|
fa4d5c8689
|
pack/unpack do not handle final '\0' as an "option" (it streches
unnecessarily the switch range)
|
10 years ago |
Roberto Ierusalimschy
|
bdf566a8a3
|
`name' in comments changed to 'name'
|
10 years ago |
Roberto Ierusalimschy
|
ff9ca88aa6
|
added some casts to avoid warnings in some compilers
|
10 years ago |
Roberto Ierusalimschy
|
57559547a3
|
in 'pack'/'unpack', endianness and alignment treated like options +
small changes in names and handling of internal options ('KOption')
|
10 years ago |
Roberto Ierusalimschy
|
f97c64d7bf
|
macros 'LUA_QL'/'LUA_QL' deprecated
|
10 years ago |
Roberto Ierusalimschy
|
c172a4f7c2
|
'dumpint' and related functions replaced by 'string.pack'/'string.unpack'
|
10 years ago |
Roberto Ierusalimschy
|
798660c9cd
|
deprecated "cast macros" ('luaL_checkint', 'luaL_optint', etc.)
|
10 years ago |
Roberto Ierusalimschy
|
4fba117433
|
[un]'dumpint' -> [un]'dumpinteger'
|
10 years ago |
Roberto Ierusalimschy
|
1aa5262634
|
do not assume numbers are coercible to strings
|
10 years ago |
Roberto Ierusalimschy
|
3ccbae84d2
|
added some casts between integral types (to avoid warnings)
|
10 years ago |
Roberto Ierusalimschy
|
68616c6669
|
using lua_Unsigned (instead of lua_Integer) for bit manipulation
|
11 years ago |
Roberto Ierusalimschy
|
3d4913f703
|
back to larger sizes for 'dumpint/undumpint' (small Lua should
be able to dump/undump long-long integers)
|
11 years ago |
Roberto Ierusalimschy
|
a2c094fe2d
|
size of strings in 'string.rep' should be limited by the size of
lua_Integer, not of 'int'
|
11 years ago |
Roberto Ierusalimschy
|
ef789d4161
|
new global macro 'LUA_MAXUNSIGNED'
|
11 years ago |
Roberto Ierusalimschy
|
115fa77009
|
maximum size for dump of integers is size of lua_Integer (which
means that there is no overflows when undumping)
|
11 years ago |
Roberto Ierusalimschy
|
561030c211
|
pack/unpack functions renamed dump/undump
|
11 years ago |
Roberto Ierusalimschy
|
48c745a611
|
avoid constant overflow when shifting left signed integers until
their last bit
|
11 years ago |
Roberto Ierusalimschy
|
8ef9117924
|
fancier way to do sign extension
|
11 years ago |
Roberto Ierusalimschy
|
420cc62fac
|
missplelling in comments/function names (endianess -> endianness)
|
11 years ago |
Roberto Ierusalimschy
|
2d5e2212d4
|
native lua_Number may be neither float nor double (in pack/unpackfloat)
|
11 years ago |
Roberto Ierusalimschy
|
da4811238a
|
details (typos in comments)
|
11 years ago |
Roberto Ierusalimschy
|
ad40bb1181
|
detail in string.rep: allow large repetitions of the empty string (no
possibility of overflows)
|
11 years ago |
Roberto Ierusalimschy
|
6318de80d3
|
added 'strip' parameter to lua_dump/string.dump
|
11 years ago |
Roberto Ierusalimschy
|
916bd874ad
|
added explicit default options to string.pack/unpack functions
|
11 years ago |
Roberto Ierusalimschy
|
cd848cab6b
|
first implementation for string.pack/unpackfloat + try not to assume
that chars have 8 bits
|
11 years ago |
Roberto Ierusalimschy
|
29256e8960
|
first implementation of string.packint/string.unpackint
|
11 years ago |