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