Commit Graph

295 Commits

Author SHA1 Message Date
Roberto Ierusalimschy
9107dd115c no more compatibility code for 'string.gfind' 2009-11-26 14:49:28 -02:00
Roberto Ierusalimschy
a6f465f558 new mark LUAMOD_API for all luaopen_* functions 2009-11-24 10:05:44 -02:00
Roberto Ierusalimschy
f4eed60ca9 better treatment of integer formats in string.format 2009-06-18 13:51:03 -03:00
Roberto Ierusalimschy
cbf0c7a103 check for invalid use of '%' in replacement string in 'string.gsub' 2009-02-03 17:39:19 -02:00
Roberto Ierusalimschy
b1203e036d 'posrelat' avoids problems with -(-2^31) 2008-06-12 11:21:18 -03:00
Roberto Ierusalimschy
24359ae294 'string.find' cannot find things after subject's end 2008-04-14 12:54:59 -03:00
Roberto Ierusalimschy
788506dd58 detail 2007-11-12 12:10:09 -02:00
Roberto Ierusalimschy
c06cc60946 BUG: 'gsub' may go wild when wrongly called without its third
> argument and with a large subject.
2007-10-29 13:51:10 -02:00
Roberto Ierusalimschy
7a78495f31 avoid problems with 'ptrdiff_t' 2007-10-25 17:30:36 -02:00
Roberto Ierusalimschy
d62a21b9d3 when formatting with '%q', all control characters are coded
as \nnn.
2007-02-07 15:53:08 -02:00
Roberto Ierusalimschy
93d3c8450c bug: string.format("%") reads past the string 2006-09-18 13:33:14 -03:00
Roberto Ierusalimschy
a7c9e45c64 avoid trailing white spaces 2006-09-11 11:07:24 -03:00
Roberto Ierusalimschy
ee41bc03ab details 2006-06-22 13:12:59 -03:00
Roberto Ierusalimschy
fe8f4c06f1 detail (better error message for invalid format) 2006-04-26 17:41:19 -03:00
Roberto Ierusalimschy
8487913697 BUG: option '%q' for string.format does not handle '\r' correctly 2006-04-12 17:13:52 -03:00
Roberto Ierusalimschy
bfdcbbcd76 small optimizations (lua_newtable -> lua_createtable) 2005-12-29 14:23:32 -02:00
Roberto Ierusalimschy
428325baec detail 2005-12-21 10:59:43 -02:00
Roberto Ierusalimschy
9fbefdf69c integer formats in 'string.format' may need to operate with larger-than-int
types
2005-12-15 16:53:34 -02:00
Roberto Ierusalimschy
88f9843eee better error message 2005-10-26 11:28:19 -02:00
Roberto Ierusalimschy
62367dda44 string.gsub accepts a table as the replacement value 2005-10-23 15:46:30 -02:00
Roberto Ierusalimschy
ed7039024d avoid some warnings 2005-10-19 11:05:11 -02:00
Roberto Ierusalimschy
bf96d3fdd9 'string.find' as it was in 5.0 2005-09-19 10:49:12 -03:00
Roberto Ierusalimschy
3390f9a35a detail 2005-08-26 14:36:32 -03:00
Roberto Ierusalimschy
5e8a9e324c luaL_openlib -> luaL_register, luaL_putchar -> luaL_addchar 2005-08-15 11:12:32 -03:00
Roberto Ierusalimschy
894cd31c52 #string is primitive 2005-08-09 14:42:02 -03:00
Roberto Ierusalimschy
280f7becb8 "%0" stands for the whole pattern (in gsub) 2005-07-31 13:47:34 -03:00
Roberto Ierusalimschy
80ac5e83fd details (alphabetical order for list of functions) 2005-07-12 11:32:08 -03:00
Roberto Ierusalimschy
8efb44b5e0 changes in 'string.find' and 'string.gfind' (new 'string.match' and
'string.gmatch')
2005-07-05 11:30:38 -03:00
Roberto Ierusalimschy
90de38bf1f warnings in VS .Net 2005-05-31 11:25:18 -03:00
Roberto Ierusalimschy
f21e9c172f details 2005-05-20 12:53:42 -03:00
Roberto Ierusalimschy
67578ec51f several small details 2005-05-17 16:49:15 -03:00
Roberto Ierusalimschy
c2bb9abcec better quotes for strings in error messages 2005-05-16 18:19:00 -03:00
Roberto Ierusalimschy
da32450c3d new API function `lua_tolstring' 2005-05-16 16:21:11 -03:00
Roberto Ierusalimschy
6cf85dcc90 metatables for all types 2005-05-05 12:34:03 -03:00
Roberto Ierusalimschy
408cb71795 avoid name conflict with some spurious included header files 2005-03-22 13:54:29 -03:00
Roberto Ierusalimschy
f8df21bd20 `luaconf.h´ exports all its definitions always (so all of them
must have a lua/LUA prefix).
2005-03-08 17:10:05 -03:00
Roberto Ierusalimschy
0ed8519127 detail 2004-12-01 13:46:06 -02:00
Roberto Ierusalimschy
10e48b9160 details 2004-11-19 14:59:08 -02:00
Roberto Ierusalimschy
45d566f676 small corrections (thanks to Mike Pall) 2004-11-01 11:33:33 -03:00
Roberto Ierusalimschy
9e6aa878c9 string.byte truncates indices out of range 2004-08-09 10:30:33 -03:00
Roberto Ierusalimschy
c0fdaf5842 string.byte may return multiple values 2004-08-06 14:35:38 -03:00
Roberto Ierusalimschy
4206d7ed60 `lua_Chunkwriter' returns 0 in case of success 2004-07-09 15:24:41 -03:00
Roberto Ierusalimschy
2b2d8ecd7a details 2004-06-08 11:31:15 -03:00
Roberto Ierusalimschy
b4cd38ba6c new scheme for configuration through `luaconf.h' 2004-04-30 17:13:38 -03:00
Roberto Ierusalimschy
24434b59f7 '%' must be '%%' to avoid formatting problems 2004-01-02 09:54:14 -02:00
Roberto Ierusalimschy
f04fe526cd new functions `lua_tointeger' and lua_pushinteger' 2003-10-07 17:13:41 -03:00
Roberto Ierusalimschy
0ddedaee92 new function `string.reverse' 2003-05-14 11:35:54 -03:00
Roberto Ierusalimschy
0d88545b82 warnings from several compilers (mainly typecasts when lua_Number is float) 2003-04-03 10:35:34 -03:00
Roberto Ierusalimschy
1a553f9199 better error messages 2003-03-19 18:16:12 -03:00
Roberto Ierusalimschy
d8a3a00d84 `string.find' also accepts out-of-range indices 2003-03-14 15:59:53 -03:00
Roberto Ierusalimschy
034de1fe73 new names for functions that open C libraries 2003-03-11 09:24:34 -03:00
Roberto Ierusalimschy
8f105d6b59 string.byte returns nil if index is out-of-range 2003-02-12 07:10:41 -02:00
Roberto Ierusalimschy
32fd039bb5 `openlib' functions return new module 2002-12-20 08:26:33 -02:00
Roberto Ierusalimschy
27c6b4d422 each .c file defines its own name 2002-12-04 15:38:31 -02:00
Roberto Ierusalimschy
9b1c586b2f renaming stringdump' -> string.dump' 2002-11-25 15:33:33 -02:00
Roberto Ierusalimschy
097edd3884 better names for auxiliar functions 2002-11-14 13:41:38 -02:00
Roberto Ierusalimschy
12c4e48506 `frontier' patterns 2002-08-23 16:45:24 -03:00
Roberto Ierusalimschy
4d7a554921 style for switch statements 2002-08-21 16:39:31 -03:00
Roberto Ierusalimschy
cfcf200806 concat' goes to table' library 2002-06-26 16:28:08 -03:00
Roberto Ierusalimschy
78c507b7b8 lua_upcall' -> lua_call' 2002-06-25 16:18:49 -03:00
Roberto Ierusalimschy
d8678edddc luaL_verror -> luaL_error 2002-06-18 12:16:18 -03:00
Roberto Ierusalimschy
eb3de8768a rawcall' -> upcall' (unprotected call) 2002-06-13 10:44:50 -03:00
Roberto Ierusalimschy
5b8ee9fa8d new names for standard libraries 2002-06-05 14:24:04 -03:00
Roberto Ierusalimschy
71144e3ff0 errors `return' int, to avoid warnings
+ home-made `sprintf' (first version)
2002-05-06 16:05:10 -03:00
Roberto Ierusalimschy
85dcb411a8 all textual errors go through `luaL_verror' 2002-05-02 14:12:27 -03:00
Roberto Ierusalimschy
13ab5a6bb1 details 2002-04-02 17:43:08 -03:00
Roberto Ierusalimschy
88c9bf99de standard libraries in packages 2002-03-20 09:54:08 -03:00
Roberto Ierusalimschy
c97dc294a9 first implementation of `gfind' 2002-03-11 10:29:40 -03:00
Roberto Ierusalimschy
87b0e3d477 no more `lua_istrue' function 2002-02-08 20:39:36 -02:00
Roberto Ierusalimschy
cfaa8fbf1d better check for option in `strfind' 2002-01-03 15:27:43 -02:00
Roberto Ierusalimschy
592a309177 tag system replaced by event tables 2001-12-05 18:15:18 -02:00
Roberto Ierusalimschy
72659a0605 no more explicit support for wide-chars; too much troble... 2001-11-28 18:13:13 -02:00
Roberto Ierusalimschy
070204300c more consistent names for auxlib functions 2001-10-26 15:33:30 -02:00
Roberto Ierusalimschy
e7c2eebd87 new function `concat' 2001-10-16 15:41:43 -02:00
Roberto Ierusalimschy
e1d072571e better syntax for type casts 2001-08-31 16:46:07 -03:00
Roberto Ierusalimschy
34a09b65f3 some changes of arguments from char to int 2001-08-30 17:55:58 -03:00
Roberto Ierusalimschy
b3dd9b1bb1 `format' can handle \0 in format string (why not?) 2001-07-17 15:46:49 -03:00
Roberto Ierusalimschy
dd3a63c205 new way to handle `profiles' 2001-03-26 11:31:49 -03:00
Roberto Ierusalimschy
6d4db86888 open functions are lua_Cfunctions 2001-03-06 17:09:38 -03:00
Roberto Ierusalimschy
9e8a46daa2 details (identation) 2001-03-02 14:40:08 -03:00
Roberto Ierusalimschy
39b7978329 first (big) step to support wide chars 2001-02-23 14:17:25 -03:00
Roberto Ierusalimschy
5f37134e64 avoid '...' and "..." inside comments 2001-02-22 15:59:59 -03:00
Roberto Ierusalimschy
52ee91dd73 better encapsulation of some types 2001-02-22 14:15:18 -03:00
Roberto Ierusalimschy
7e3d3e1f70 details 2001-02-02 17:02:40 -02:00
Roberto Ierusalimschy
4ff5545709 new macro pushliteral 2001-01-10 14:58:11 -02:00
Roberto Ierusalimschy
cce8ebd306 obsolete `format' option (d$). 2000-12-18 11:41:41 -02:00
Roberto Ierusalimschy
10ac68c648 first implementation for position captures 2000-12-04 12:43:06 -02:00
Roberto Ierusalimschy
96253ed8ce better support for 64-bit machines (avoid excessive use of longs) 2000-11-24 15:39:56 -02:00
Roberto Ierusalimschy
35d6b15057 some cleaning 2000-11-23 11:49:35 -02:00
Roberto Ierusalimschy
2cbbf3933a new macro LUALIB_API (so the lib can be a separate DLL) 2000-10-27 14:15:53 -02:00
Roberto Ierusalimschy
64eecc0b82 new macro LUA_API 2000-10-20 14:39:03 -02:00
Roberto Ierusalimschy
001f2bdd0e new definition for types-tags 2000-10-05 09:14:08 -03:00
Roberto Ierusalimschy
620d22f2a0 new API function lua_rawget 2000-09-14 11:09:31 -03:00
Roberto Ierusalimschy
787a78f83e new scheme for buffers 2000-09-11 14:38:42 -03:00
Roberto Ierusalimschy
6e80c1cde1 new version for API 2000-09-05 16:33:32 -03:00
Roberto Ierusalimschy
f0b3cd1d6f new API functions pop', insert', and `move' 2000-08-31 17:23:40 -03:00
Roberto Ierusalimschy
a1d3e001b9 comments 2000-08-31 10:30:22 -03:00
Roberto Ierusalimschy
a97f29f154 explicit stack control in the API 2000-08-29 17:43:28 -03:00
Roberto Ierusalimschy
9fdf73bc9a first version for new API 2000-08-28 14:57:04 -03:00
Roberto Ierusalimschy
e238efc536 default now is multi-state 2000-08-09 16:16:57 -03:00
Roberto Ierusalimschy
094880ef9e details 2000-06-12 11:37:18 -03:00
Roberto Ierusalimschy
1de5587184 `lua.h' is included before any other Lua header file 2000-06-12 10:52:05 -03:00
Roberto Ierusalimschy
ef62b340e0 code cleaner for 16 bits. 2000-05-24 10:54:49 -03:00
Roberto Ierusalimschy
fe5c37ae95 BUG: `strfind' gets wrong subject length when there is an offset 2000-05-02 15:32:22 -03:00
Roberto Ierusalimschy
3c9d999424 many details (most by lhf). 2000-03-03 11:58:26 -03:00
Roberto Ierusalimschy
74f1c3d025 small changes for "clean C" 2000-02-08 14:39:42 -02:00
Roberto Ierusalimschy
acdb0b741e comments. 1999-12-27 15:33:22 -02:00
Roberto Ierusalimschy
7d1499ba88 new macro luaL_openl 1999-11-22 15:39:51 -02:00
Roberto Ierusalimschy
29ede6aa13 first implementation of multiple states (reentrant code). 1999-11-22 11:12:07 -02:00
Roberto Ierusalimschy
a6755e2f1a BUG: `strfind' does not handle \0 in plain search. 1999-11-11 14:45:04 -02:00
Roberto Ierusalimschy
bbab974717 details (comments) 1999-10-25 11:35:44 -02:00
Roberto Ierusalimschy
c787dccd9b "const" !!! 1999-08-16 17:52:00 -03:00
Roberto Ierusalimschy
900257e814 char-set may contain '%]' 1999-08-10 09:55:56 -03:00
Roberto Ierusalimschy
36b6fe8d17 better treatment for arbitrary limits 1999-06-17 14:04:03 -03:00
Roberto Ierusalimschy
924bbe020b bigger limits 1999-05-14 09:24:04 -03:00
Roberto Ierusalimschy
7808ea3a5f new implementation for '*' in patterns + new option '+' 1999-05-05 16:23:11 -03:00
Roberto Ierusalimschy
cc0f635ef7 '$' at end of pattern was matching regular '$', too. 1999-04-30 11:12:05 -03:00
Roberto Ierusalimschy
b678e465a1 warnings in Solaris 1999-02-26 12:49:53 -03:00
Roberto Ierusalimschy
6a853fcb8b details (from lhf) 1999-02-25 18:07:26 -03:00
Roberto Ierusalimschy
bf6d2ccf92 details 1999-02-12 17:23:02 -02:00
Roberto Ierusalimschy
028ec00ab9 details 1999-02-05 09:22:58 -02:00
Roberto Ierusalimschy
1dcf1c9cbd format "%s" may break limit of "sprintf" on some machines. 1999-02-04 17:29:51 -02:00
Roberto Ierusalimschy
b94110a68f bug: "format" does not check size of format item (such as "%00000...00000d"). 1999-01-04 10:53:24 -02:00
Roberto Ierusalimschy
766e67ef3b to avoid warnings about "typecast" (Visual C++) 1998-12-28 11:44:54 -02:00
Roberto Ierusalimschy
c64f36ab2b better behavior for "strsub" when indices are out-of-range 1998-12-01 16:41:25 -02:00
Roberto Ierusalimschy
a84bca67fc bug: gsub/strfind do not check whether captures are properly finished. 1998-11-10 17:38:12 -02:00
Roberto Ierusalimschy
ad446a0eb0 "%q" can handle strings with '\0'. 1998-07-12 13:13:45 -03:00
Roberto Ierusalimschy
bee1a5aeb2 spelling 1998-07-01 11:21:57 -03:00
Roberto Ierusalimschy
e869d17eb1 functions should return explicit "nil"s. 1998-06-29 15:24:06 -03:00
Roberto Ierusalimschy
468fbdbde7 details 1998-06-24 10:33:00 -03:00
Roberto Ierusalimschy
9618aaf07d small corrections in comments 1998-06-19 13:14:09 -03:00
Roberto Ierusalimschy
6152973f9c new names for 'ascii' ('strbyte') and 'int2str' ('strchar') 1998-05-31 19:20:45 -03:00
Roberto Ierusalimschy
da252eeff7 arguments for "format" 'x', 'X', 'o' and 'u' must be unsigned int. 1998-05-18 19:21:55 -03:00
Roberto Ierusalimschy
daa937c043 pattern-matching support for '\0'. 1998-03-24 17:14:25 -03:00
Roberto Ierusalimschy
be6d215f67 BUG: gsub('a', '(b?)%1*' ...) loops (because the capture is empty). 1998-03-09 15:28:08 -03:00
Roberto Ierusalimschy
043c2ac258 new names for "lua_pushlstr" and "lua_getstrlen" 1998-03-06 15:47:42 -03:00
Roberto Ierusalimschy
88a2023c32 support for strings with '\0' 1998-03-06 13:54:42 -03:00
Roberto Ierusalimschy
8622dc18bf bug: format size limits with little problems 1998-01-27 17:11:36 -02:00
Roberto Ierusalimschy
6ac047afc4 details 1998-01-09 12:57:43 -02:00
Roberto Ierusalimschy
0e1058cfdd small optimizations in switch order 1998-01-09 12:44:55 -02:00
Roberto Ierusalimschy
502343b402 new scheme for buffers, centralized in auxlib. 1997-12-17 18:48:58 -02:00
Roberto Ierusalimschy
82d09fbf0d new structure for closures, without static variables. 1997-12-15 15:58:49 -02:00
Roberto Ierusalimschy
80b3d28f4a details (mainly error messages) 1997-12-09 11:50:08 -02:00
Roberto Ierusalimschy
9ae0c082a3 small details by lint. 1997-11-26 16:53:45 -02:00
Roberto Ierusalimschy
75ac0d2172 Standard library for strings and pattern-matching 1997-09-16 16:25:59 -03:00