Commit Graph

291 Commits

Author SHA1 Message Date
Roberto Ierusalimschy 7d45a5f48f C functions and userdata also have environments 2005-02-18 10:40:02 -02:00
Roberto Ierusalimschy 2d8b099274 better checking for read errors (with `ferror´) 2004-08-13 16:52:13 -03:00
Roberto Ierusalimschy f87057690b `io.lines' also can give the file name in its error message 2004-08-09 11:35:59 -03:00
Roberto Ierusalimschy 76d8b8db06 `lua_pushfstring' now supports `%p' option too 2004-07-09 13:01:38 -03:00
Roberto Ierusalimschy ce455481ab separation between io lib and os lib 2004-07-09 12:47:48 -03:00
Roberto Ierusalimschy 0733c83b8c other modules may need FILEHANDLE definition 2004-05-28 15:35:05 -03:00
Roberto Ierusalimschy e9844a4f1d `popen' is not ANSI and therefore was removed from the basic library 2004-05-28 15:32:51 -03:00
Roberto Ierusalimschy 37cd986532 in `time', uses default if `isdst' is absent 2004-05-10 17:26:37 -03:00
Roberto Ierusalimschy b4cd38ba6c new scheme for configuration through `luaconf.h' 2004-04-30 17:13:38 -03:00
Roberto Ierusalimschy 10de467c79 new function `lua_createtable' 2003-10-10 10:29:28 -03:00
Roberto Ierusalimschy 533737f26e new functions `lua_getfield' and `lua_setfield' 2003-10-10 09:57:55 -03:00
Roberto Ierusalimschy f04fe526cd new functions `lua_tointeger' and lua_pushinteger' 2003-10-07 17:13:41 -03:00
Roberto Ierusalimschy 64066359dd bug: IBM AS400 (OS400) has sizeof(void *)==16, and a `%p' may generate
up to 60 characters in a `printf'. That causes a buffer overflow in
`tostring'..
2003-08-25 16:49:47 -03:00
Roberto Ierusalimschy 66ed154c89 details 2003-07-09 09:08:43 -03:00
Roberto Ierusalimschy 0ec4c473df bug: file:close cannot be called without a file. 2003-07-07 10:32:52 -03:00
Roberto Ierusalimschy f93051155c ok to use `#elif' and `#if defined()' 2003-05-14 18:01:53 -03:00
Roberto Ierusalimschy 524ae9fc3d new function `setvbuf' 2003-05-14 16:03:43 -03:00
Roberto Ierusalimschy 82dfacbcf7 detail 2003-04-30 17:24:38 -03:00
Roberto Ierusalimschy 26097b6c4b uses integers as keys to standard i/o files 2003-04-30 17:15:55 -03:00
Roberto Ierusalimschy 1a553f9199 better error messages 2003-03-19 18:16:12 -03:00
Roberto Ierusalimschy 40cfb0691e new auxiliary functions for `type' manipulation 2003-03-18 09:25:32 -03:00
Roberto Ierusalimschy 7ea180af6e detail 2003-03-14 16:08:11 -03:00
Roberto Ierusalimschy 05d567d52e `io.input'/`io.output' always return current file 2003-03-14 16:00:16 -03:00
Roberto Ierusalimschy 034de1fe73 new names for functions that open C libraries 2003-03-11 09:24:34 -03:00
Roberto Ierusalimschy 572bddc0b0 LUA_USETMPNAME -> USE_TMPNAME 2003-03-06 16:36:44 -03:00
Roberto Ierusalimschy 60d11ec316 by default, gcc does not get tmpname 2003-02-27 09:39:05 -03:00
Roberto Ierusalimschy 7285fa393b use C names for C types 2003-02-11 13:31:50 -02:00
Roberto Ierusalimschy 5085f09ce5 small optimizations 2003-02-11 13:24:52 -02:00
Roberto Ierusalimschy 9a5bab82ff use the more modern _POSIX_C_SOURCE instead of older _POSIX_SOURCE 2003-01-17 13:27:28 -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 90d7892007 new function `io.type' 2002-12-04 13:27:17 -02:00
Roberto Ierusalimschy 041cb96992 small bug: `write' must return three values in case of errors 2002-12-04 13:17:36 -02:00
Roberto Ierusalimschy d9340154ac `__tostring' for files + small bug (could do invalid read inside
a userdata when it was not a file)
2002-11-25 13:05:39 -02:00
Roberto Ierusalimschy 96ba5d0bc2 include file name in error messages 2002-11-18 14:53:19 -02:00
Roberto Ierusalimschy 097edd3884 better names for auxiliar functions 2002-11-14 13:41:38 -02:00
Roberto Ierusalimschy 6505503b49 do not pretend that file is closed when close fails 2002-10-21 17:41:24 -03:00
Roberto Ierusalimschy ec748fcb0a correct handling of opened files in presence of memory allocation
errors
2002-10-16 17:41:35 -03:00
Roberto Ierusalimschy 669129a6d8 io.lines() iterate over the standard input file 2002-10-11 17:40:32 -03:00
Roberto Ierusalimschy e8f35fc4ff unification of __index & __gettable (and __newindex & __settable) 2002-09-19 17:12:47 -03:00
Roberto Ierusalimschy f6bc7884be new generators for reading a file line by line 2002-09-17 17:35:54 -03:00
Roberto Ierusalimschy 81a8845e4f detail 2002-08-21 11:57:48 -03:00
Roberto Ierusalimschy 576bded513 details 2002-08-16 17:02:13 -03:00
Roberto Ierusalimschy 2e38c6ae5a `luadebug.h' content now is included in `lua.h' 2002-08-06 15:01:50 -03:00
Roberto Ierusalimschy 79c8edb6c4 new names for light userdata operations 2002-07-17 13:25:13 -03:00
Roberto Ierusalimschy ce6b930464 `isdst' should be a boolean (and not 0/1!!) 2002-07-12 15:54:53 -03:00
Roberto Ierusalimschy 88607acc2c details 2002-06-26 13:37:23 -03:00
Roberto Ierusalimschy d8678edddc luaL_verror -> luaL_error 2002-06-18 12:16:18 -03:00
Roberto Ierusalimschy 000d081fd0 warnings from other compilers 2002-06-06 15:17:33 -03:00
Roberto Ierusalimschy e3cddc950c C is not C++... 2002-06-06 09:43:08 -03:00
Roberto Ierusalimschy 5a8f383e60 io.close() closes standard output file; `close' now is method 2002-06-05 14:42:03 -03:00
Roberto Ierusalimschy 5b8ee9fa8d new names for standard libraries 2002-06-05 14:24:04 -03:00
Roberto Ierusalimschy a102221a0b better error messages 2002-06-05 13:59:37 -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 1ce6cb6032 no more option `*u' in read (too complex) 2002-04-12 16:56:25 -03:00
Roberto Ierusalimschy 237969724f support for `light' userdata + simpler support for `boxed' udata 2002-04-05 15:54:31 -03:00
Roberto Ierusalimschy c3b90061ea new design for iolib (object style) 2002-04-04 17:24:56 -03:00
Roberto Ierusalimschy d1f220217b when possible, library functions accept nil as none 2002-03-27 12:30:41 -03:00
Roberto Ierusalimschy 88c9bf99de standard libraries in packages 2002-03-20 09:54:08 -03:00
Roberto Ierusalimschy 252e01e398 `setlocale' may be used to query the current locale 2002-02-08 20:39:56 -02:00
Roberto Ierusalimschy 86a4de256e no more lua_[gs]etstr 2002-02-07 15:25:36 -02:00
Roberto Ierusalimschy d6fd33e76f `eventtable' renamed to `metatable' 2002-01-30 15:26:44 -02:00
Roberto Ierusalimschy 09e15692f3 rename of lua_isnull to lua_isnone 2001-12-20 19:27:12 -02:00
Roberto Ierusalimschy 9cd36059ad new API functions lua_getstr/lua_setstr 2001-12-10 20:09:51 -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 b840a7518d details 2001-10-02 13:43:29 -03:00
Roberto Ierusalimschy e1d072571e better syntax for type casts 2001-08-31 16:46:07 -03:00
Roberto Ierusalimschy 45b173cbf8 warnings/details 2001-07-21 21:59:36 -03:00
Roberto Ierusalimschy 6c8e652aa6 use macros for 'getc' 2001-07-16 17:24:48 -03:00
Roberto Ierusalimschy ae1cf64348 better names for type-related functions 2001-07-12 15:11:58 -03:00
Roberto Ierusalimschy a264fd089e small bug in read_chars (fread x eof) 2001-07-12 11:59:14 -03:00
Roberto Ierusalimschy 61a036eaa5 new macro to control format for `read"*n"' 2001-06-28 11:45:44 -03:00
Roberto Ierusalimschy 9559c111a3 new `read' option `*u' (read-until) + simpler implementation for `read' 2001-06-22 10:49:42 -03:00
Roberto Ierusalimschy 4905fdd135 C++ warning 2001-06-08 13:48:32 -03:00
Roberto Ierusalimschy 65c289b046 details 2001-06-07 10:46:29 -03:00
Roberto Ierusalimschy d5b83ead90 new implementation for userdatas, without `keys' 2001-06-06 15:00:19 -03:00
Roberto Ierusalimschy 572a69b6af name changes 2001-04-23 13:35:45 -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 35023355f2 details for wchar 2001-02-23 14:28:12 -03:00
Roberto Ierusalimschy 39b7978329 first (big) step to support wide chars 2001-02-23 14:17:25 -03:00
Roberto Ierusalimschy 52ee91dd73 better encapsulation of some types 2001-02-22 14:15:18 -03:00
Roberto Ierusalimschy dc17a9cc24 new semantics for pushuserdata 2001-02-09 17:52:54 -02:00
Roberto Ierusalimschy e70e6a3b7a <read(0)> tests for EOF 2001-02-09 14:25:50 -02:00
Roberto Ierusalimschy 1f917e709c better use of extra include files (both for tests and for old_ansi) 2001-02-06 14:01:29 -02:00
Roberto Ierusalimschy 7e3d3e1f70 details 2001-02-02 17:02:40 -02:00
Roberto Ierusalimschy 9b45439860 details 2001-01-26 12:16:24 -02:00
Roberto Ierusalimschy bce6572579 new macros + new names to facilitate compilation of threaded version 2001-01-26 09:45:51 -02:00
Roberto Ierusalimschy a53d9b66ca first implementation for type names 2001-01-25 14:45:36 -02:00
Roberto Ierusalimschy f2c451d745 all accesses to TObjects done through macros 2001-01-18 13:59:09 -02:00
Roberto Ierusalimschy 321c7fb6f8 details 2001-01-11 16:59:20 -02:00
Roberto Ierusalimschy 4ff5545709 new macro pushliteral 2001-01-10 14:58:11 -02:00
Roberto Ierusalimschy 6af005ec20 bug: when `read' fails it must return nil (and not no value) 2000-12-22 15:32:28 -02:00
Roberto Ierusalimschy 1db05793a0 `time' does not need to correct its table argument (use `date' for that) 2000-12-22 14:57:13 -02:00
Roberto Ierusalimschy af97be026b new function for time and date 2000-12-18 11:42:19 -02:00
Roberto Ierusalimschy 4894c27962 lua_Number defined in lua.h (1st version) 2000-12-04 16:33:40 -02:00
Roberto Ierusalimschy 35d6b15057 some cleaning 2000-11-23 11:49:35 -02:00
Roberto Ierusalimschy 67c1afff59 lua_settagmethod does not return old tag method 2000-10-31 11:10:24 -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 89f98c0995 in function `read_file', realloc() doesn't free the buffer if it can't
allocate new memory
2000-10-26 10:53:55 -02:00
Roberto Ierusalimschy b892f0a877 new API function `createuserdata' 2000-10-26 10:47:05 -02:00
Roberto Ierusalimschy 64eecc0b82 new macro LUA_API 2000-10-20 14:39:03 -02:00
Roberto Ierusalimschy f6834f4393 new API function `lua_type' + new type lua_Type 2000-10-02 17:10:55 -03:00
Roberto Ierusalimschy f9dd50cefc `read("*w")' should return nil at EOF 2000-09-22 15:14:06 -03:00
Roberto Ierusalimschy 620d22f2a0 new API function lua_rawget 2000-09-14 11:09:31 -03:00
Roberto Ierusalimschy f45cba42b5 details for OLD_ANSI 2000-09-13 17:12:14 -03:00
Roberto Ierusalimschy 5d033f33eb details in ERRORMESSAGE 2000-09-12 15:41:55 -03:00
Roberto Ierusalimschy c1f725ba4a read patterns (deprecated) use new auxlib's buffer system 2000-09-12 10:58:37 -03:00
Roberto Ierusalimschy d1c351857d ERRORMESSAGE uses auxlib's buffer to build message string 2000-09-12 10:48:34 -03:00
Roberto Ierusalimschy 8060193702 `lauxlib' is now part of the libraries (not used by core Lua) 2000-09-11 17:29:27 -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 10b4799ce5 details 2000-08-31 10:30:10 -03:00
Roberto Ierusalimschy a97f29f154 explicit stack control in the API 2000-08-29 17:43:28 -03:00
Roberto Ierusalimschy ac12f4db4b C upvalues are the last arguments to a function 2000-08-29 11:33:31 -03:00
Roberto Ierusalimschy 9fdf73bc9a first version for new API 2000-08-28 14:57:04 -03:00
Roberto Ierusalimschy e662e0f1cd simpler way to access _INPUT and _OUTPUT 2000-08-22 14:47:17 -03:00
Roberto Ierusalimschy ddc8d94a08 new name for `lua_[sg]etglobaltable' 2000-08-14 16:18:14 -03:00
Roberto Ierusalimschy e238efc536 default now is multi-state 2000-08-09 16:16:57 -03:00
Roberto Ierusalimschy 52062684e1 better control over use of `errno' 2000-06-20 14:13:21 -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 f63d7753b8 files are closed when collected (again) 2000-05-30 15:55:16 -03:00
Roberto Ierusalimschy 8e617985fa functions `for...' and `raw...' are obsolete now 2000-05-26 16:17:57 -03:00
Roberto Ierusalimschy ef62b340e0 code cleaner for 16 bits. 2000-05-24 10:54:49 -03:00
Roberto Ierusalimschy 44b71ca816 defines for _ERRORMESSAGE and _ALERT 2000-05-09 11:50:16 -03:00
Roberto Ierusalimschy 2ae9c856cf more uniform names 2000-04-24 18:05:11 -03:00
Roberto Ierusalimschy 556a89e537 new names for debug types 2000-03-30 14:19:48 -03:00
Roberto Ierusalimschy 5f3c5ace95 message detail 2000-03-22 13:24:13 -03:00
Roberto Ierusalimschy 6759299880 new implementation for handling I/O tags + setglobal TM for tracing
changes in _INPUT/_OUTPUT
2000-03-20 16:13:45 -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 2877bad4c2 new debug API (first version) 2000-01-19 10:00:45 -02:00
Roberto Ierusalimschy bcdbdaccc3 more debug information (still with bug for tag methods...) 1999-12-30 16:28:40 -02:00
Roberto Ierusalimschy fb60283974 better error messages 1999-12-28 09:52:49 -02:00
Roberto Ierusalimschy 5b08fcd5a1 no more "lua" in error messages 1999-12-27 11:04:53 -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 a7fa7bafc8 new warnings with option "-W" (gcc) 1999-11-09 15:59:35 -02:00
Roberto Ierusalimschy 80b39d83c3 default `success' for exit is more useful. 1999-10-26 09:00:12 -02:00
Roberto Ierusalimschy 910836fb53 warnings from Visual C++ 1999-10-19 11:33:22 -02:00
Roberto Ierusalimschy cca78b5c71 Visual C++ warning 1999-10-11 14:06:01 -02:00
Roberto Ierusalimschy d435b7acd8 read patterns are deprecated; new option `read(n)' to read n bytes. 1999-10-07 17:18:36 -02:00
Roberto Ierusalimschy a8a75fb7ab details 1999-09-13 16:42:02 -03:00
Roberto Ierusalimschy c787dccd9b "const" !!! 1999-08-16 17:52:00 -03:00
Roberto Ierusalimschy 21843f022a writeto, readfrom, and closefile must return an error code when
closing a file.
1999-08-10 10:05:16 -03:00
Roberto Ierusalimschy 4bbe0679a8 variables _INPUT and _OUTPUT should be read as rawglobal. 1999-07-22 16:35:50 -03:00