Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/mit/lua/dist Import the (unaltered) Lua 5.1.4 sourc...



details:   https://anonhg.NetBSD.org/src/rev/582beadb4e17
branches:  trunk
changeset: 758285:582beadb4e17
user:      mbalmer <mbalmer%NetBSD.org@localhost>
date:      Sun Oct 31 11:16:48 2010 +0000

description:
Import the (unaltered) Lua 5.1.4 source distribution.

diffstat:

 external/mit/lua/dist/COPYRIGHT              |    34 +
 external/mit/lua/dist/HISTORY                |   183 +
 external/mit/lua/dist/INSTALL                |    99 +
 external/mit/lua/dist/Makefile               |   128 +
 external/mit/lua/dist/README                 |    37 +
 external/mit/lua/dist/doc/contents.html      |   499 +
 external/mit/lua/dist/doc/lua.1              |   165 +
 external/mit/lua/dist/doc/lua.css            |    41 +
 external/mit/lua/dist/doc/lua.html           |   172 +
 external/mit/lua/dist/doc/luac.1             |   138 +
 external/mit/lua/dist/doc/luac.html          |   145 +
 external/mit/lua/dist/doc/manual.css         |    13 +
 external/mit/lua/dist/doc/manual.html        |  8801 ++++++++++++++++++++++++++
 external/mit/lua/dist/doc/readme.html        |    40 +
 external/mit/lua/dist/etc/Makefile           |    44 +
 external/mit/lua/dist/etc/README             |    37 +
 external/mit/lua/dist/etc/all.c              |    38 +
 external/mit/lua/dist/etc/lua.hpp            |     9 +
 external/mit/lua/dist/etc/lua.pc             |    31 +
 external/mit/lua/dist/etc/luavs.bat          |    28 +
 external/mit/lua/dist/etc/min.c              |    39 +
 external/mit/lua/dist/etc/noparser.c         |    50 +
 external/mit/lua/dist/etc/strict.lua         |    41 +
 external/mit/lua/dist/src/Makefile           |   182 +
 external/mit/lua/dist/src/lapi.c             |  1089 +++
 external/mit/lua/dist/src/lapi.h             |    18 +
 external/mit/lua/dist/src/lauxlib.c          |   654 +
 external/mit/lua/dist/src/lauxlib.h          |   176 +
 external/mit/lua/dist/src/lbaselib.c         |   655 +
 external/mit/lua/dist/src/lcode.c            |   841 ++
 external/mit/lua/dist/src/lcode.h            |    78 +
 external/mit/lua/dist/src/ldblib.c           |   399 +
 external/mit/lua/dist/src/ldebug.c           |   640 +
 external/mit/lua/dist/src/ldebug.h           |    35 +
 external/mit/lua/dist/src/ldo.c              |   520 +
 external/mit/lua/dist/src/ldo.h              |    59 +
 external/mit/lua/dist/src/ldump.c            |   166 +
 external/mit/lua/dist/src/lfunc.c            |   176 +
 external/mit/lua/dist/src/lfunc.h            |    36 +
 external/mit/lua/dist/src/lgc.c              |   713 ++
 external/mit/lua/dist/src/lgc.h              |   112 +
 external/mit/lua/dist/src/linit.c            |    40 +
 external/mit/lua/dist/src/liolib.c           |   555 +
 external/mit/lua/dist/src/llex.c             |   463 +
 external/mit/lua/dist/src/llex.h             |    83 +
 external/mit/lua/dist/src/llimits.h          |   130 +
 external/mit/lua/dist/src/lmathlib.c         |   265 +
 external/mit/lua/dist/src/lmem.c             |    88 +
 external/mit/lua/dist/src/lmem.h             |    51 +
 external/mit/lua/dist/src/loadlib.c          |   668 +
 external/mit/lua/dist/src/lobject.c          |   216 +
 external/mit/lua/dist/src/lobject.h          |   383 +
 external/mit/lua/dist/src/lopcodes.c         |   104 +
 external/mit/lua/dist/src/lopcodes.h         |   270 +
 external/mit/lua/dist/src/loslib.c           |   245 +
 external/mit/lua/dist/src/lparser.c          |  1341 +++
 external/mit/lua/dist/src/lparser.h          |    84 +
 external/mit/lua/dist/src/lstate.c           |   216 +
 external/mit/lua/dist/src/lstate.h           |   171 +
 external/mit/lua/dist/src/lstring.c          |   113 +
 external/mit/lua/dist/src/lstring.h          |    33 +
 external/mit/lua/dist/src/lstrlib.c          |   871 ++
 external/mit/lua/dist/src/ltable.c           |   590 +
 external/mit/lua/dist/src/ltable.h           |    42 +
 external/mit/lua/dist/src/ltablib.c          |   289 +
 external/mit/lua/dist/src/ltm.c              |    77 +
 external/mit/lua/dist/src/ltm.h              |    56 +
 external/mit/lua/dist/src/lua.c              |   394 +
 external/mit/lua/dist/src/lua.h              |   390 +
 external/mit/lua/dist/src/luac.c             |   202 +
 external/mit/lua/dist/src/luaconf.h          |   765 ++
 external/mit/lua/dist/src/lualib.h           |    55 +
 external/mit/lua/dist/src/lundump.c          |   229 +
 external/mit/lua/dist/src/lundump.h          |    38 +
 external/mit/lua/dist/src/lvm.c              |   765 ++
 external/mit/lua/dist/src/lvm.h              |    38 +
 external/mit/lua/dist/src/lzio.c             |    84 +
 external/mit/lua/dist/src/lzio.h             |    69 +
 external/mit/lua/dist/src/print.c            |   229 +
 external/mit/lua/dist/test/README            |    26 +
 external/mit/lua/dist/test/bisect.lua        |    27 +
 external/mit/lua/dist/test/cf.lua            |    16 +
 external/mit/lua/dist/test/echo.lua          |     5 +
 external/mit/lua/dist/test/env.lua           |     7 +
 external/mit/lua/dist/test/factorial.lua     |    32 +
 external/mit/lua/dist/test/fib.lua           |    40 +
 external/mit/lua/dist/test/fibfor.lua        |    13 +
 external/mit/lua/dist/test/globals.lua       |    13 +
 external/mit/lua/dist/test/hello.lua         |     3 +
 external/mit/lua/dist/test/life.lua          |   111 +
 external/mit/lua/dist/test/luac.lua          |     7 +
 external/mit/lua/dist/test/printf.lua        |     7 +
 external/mit/lua/dist/test/readonly.lua      |    12 +
 external/mit/lua/dist/test/sieve.lua         |    29 +
 external/mit/lua/dist/test/sort.lua          |    66 +
 external/mit/lua/dist/test/table.lua         |    12 +
 external/mit/lua/dist/test/trace-calls.lua   |    32 +
 external/mit/lua/dist/test/trace-globals.lua |    38 +
 external/mit/lua/dist/test/xd.lua            |    14 +
 99 files changed, 28573 insertions(+), 0 deletions(-)

diffs (truncated from 28969 to 300 lines):

diff -r b4050b0e7e76 -r 582beadb4e17 external/mit/lua/dist/COPYRIGHT
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/mit/lua/dist/COPYRIGHT   Sun Oct 31 11:16:48 2010 +0000
@@ -0,0 +1,34 @@
+Lua License
+-----------
+
+Lua is licensed under the terms of the MIT license reproduced below.
+This means that Lua is free software and can be used for both academic
+and commercial purposes at absolutely no cost.
+
+For details and rationale, see http://www.lua.org/license.html .
+
+===============================================================================
+
+Copyright (C) 1994-2008 Lua.org, PUC-Rio.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+===============================================================================
+
+(end of COPYRIGHT)
diff -r b4050b0e7e76 -r 582beadb4e17 external/mit/lua/dist/HISTORY
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/mit/lua/dist/HISTORY     Sun Oct 31 11:16:48 2010 +0000
@@ -0,0 +1,183 @@
+HISTORY for Lua 5.1
+
+* Changes from version 5.0 to 5.1
+  -------------------------------
+  Language:
+  + new module system.
+  + new semantics for control variables of fors.
+  + new semantics for setn/getn.
+  + new syntax/semantics for varargs.
+  + new long strings and comments.
+  + new `mod' operator (`%')
+  + new length operator #t
+  + metatables for all types
+  API:
+  + new functions: lua_createtable, lua_get(set)field, lua_push(to)integer.
+  + user supplies memory allocator (lua_open becomes lua_newstate).
+  + luaopen_* functions must be called through Lua.
+  Implementation:
+  + new configuration scheme via luaconf.h.
+  + incremental garbage collection.
+  + better handling of end-of-line in the lexer.
+  + fully reentrant parser (new Lua function `load')
+  + better support for 64-bit machines.
+  + native loadlib support for Mac OS X.
+  + standard distribution in only one library (lualib.a merged into lua.a)
+
+* Changes from version 4.0 to 5.0
+  -------------------------------
+  Language:
+  + lexical scoping.
+  + Lua coroutines.
+  + standard libraries now packaged in tables.
+  + tags replaced by metatables and tag methods replaced by metamethods,
+    stored in metatables.
+  + proper tail calls.
+  + each function can have its own global table, which can be shared.
+  + new __newindex metamethod, called when we insert a new key into a table.
+  + new block comments: --[[ ... ]].
+  + new generic for.
+  + new weak tables.
+  + new boolean type.
+  + new syntax "local function".
+  + (f()) returns the first value returned by f.
+  + {f()} fills a table with all values returned by f.
+  + \n ignored in [[\n .
+  + fixed and-or priorities.
+  + more general syntax for function definition (e.g. function a.x.y:f()...end).
+  + more general syntax for function calls (e.g. (print or write)(9)).
+  + new functions (time/date, tmpfile, unpack, require, load*, etc.).
+  API:
+  + chunks are loaded by using lua_load; new luaL_loadfile and luaL_loadbuffer.
+  + introduced lightweight userdata, a simple "void*" without a metatable.
+  + new error handling protocol: the core no longer prints error messages;
+    all errors are reported to the caller on the stack.
+  + new lua_atpanic for host cleanup.
+  + new, signal-safe, hook scheme.
+  Implementation:
+  + new license: MIT.
+  + new, faster, register-based virtual machine.
+  + support for external multithreading and coroutines.
+  + new and consistent error message format.
+  + the core no longer needs "stdio.h" for anything (except for a single
+    use of sprintf to convert numbers to strings).
+  + lua.c now runs the environment variable LUA_INIT, if present. It can
+    be "@filename", to run a file, or the chunk itself.
+  + support for user extensions in lua.c.
+    sample implementation given for command line editing.
+  + new dynamic loading library, active by default on several platforms.
+  + safe garbage-collector metamethods.
+  + precompiled bytecodes checked for integrity (secure binary dostring).
+  + strings are fully aligned.
+  + position capture in string.find.
+  + read('*l') can read lines with embedded zeros.
+
+* Changes from version 3.2 to 4.0
+  -------------------------------
+  Language:
+  + new "break" and "for" statements (both numerical and for tables).
+  + uniform treatment of globals: globals are now stored in a Lua table.
+  + improved error messages.
+  + no more '$debug': full speed *and* full debug information.
+  + new read form: read(N) for next N bytes.
+  + general read patterns now deprecated.
+    (still available with -DCOMPAT_READPATTERNS.)
+  + all return values are passed as arguments for the last function
+    (old semantics still available with -DLUA_COMPAT_ARGRET)
+  + garbage collection tag methods for tables now deprecated.
+  + there is now only one tag method for order.
+  API:
+  + New API: fully re-entrant, simpler, and more efficient.
+  + New debug API.
+  Implementation:
+  + faster than ever: cleaner virtual machine and new hashing algorithm.
+  + non-recursive garbage-collector algorithm.
+  + reduced memory usage for programs with many strings.
+  + improved treatment for memory allocation errors.
+  + improved support for 16-bit machines (we hope).
+  + code now compiles unmodified as both ANSI C and C++.
+  + numbers in bases other than 10 are converted using strtoul.
+  + new -f option in Lua to support #! scripts.
+  + luac can now combine text and binaries.
+
+* Changes from version 3.1 to 3.2
+  -------------------------------
+  + redirected all output in Lua's core to _ERRORMESSAGE and _ALERT.
+  + increased limit on the number of constants and globals per function
+    (from 2^16 to 2^24).
+  + debugging info (lua_debug and hooks) moved into lua_state and new API
+    functions provided to get and set this info.
+  + new debug lib gives full debugging access within Lua.
+  + new table functions "foreachi", "sort", "tinsert", "tremove", "getn".
+  + new io functions "flush", "seek".
+
+* Changes from version 3.0 to 3.1
+  -------------------------------
+  + NEW FEATURE: anonymous functions with closures (via "upvalues").
+  + new syntax:
+    - local variables in chunks.
+    - better scope control with DO block END.
+    - constructors can now be also written: { record-part; list-part }.
+    - more general syntax for function calls and lvalues, e.g.:
+      f(x).y=1
+      o:f(x,y):g(z)
+      f"string" is sugar for f("string")
+  + strings may now contain arbitrary binary data (e.g., embedded zeros).
+  + major code re-organization and clean-up; reduced module interdependecies.
+  + no arbitrary limits on the total number of constants and globals.
+  + support for multiple global contexts.
+  + better syntax error messages.
+  + new traversal functions "foreach" and "foreachvar".
+  + the default for numbers is now double.
+    changing it to use floats or longs is easy.
+  + complete debug information stored in pre-compiled chunks.
+  + sample interpreter now prompts user when run interactively, and also
+    handles control-C interruptions gracefully.
+
+* Changes from version 2.5 to 3.0
+  -------------------------------
+  + NEW CONCEPT: "tag methods".
+    Tag methods replace fallbacks as the meta-mechanism for extending the
+    semantics of Lua. Whereas fallbacks had a global nature, tag methods
+    work on objects having the same tag (e.g., groups of tables).
+    Existing code that uses fallbacks should work without change.
+  + new, general syntax for constructors {[exp] = exp, ... }.
+  + support for handling variable number of arguments in functions (varargs).
+  + support for conditional compilation ($if ... $else ... $end).
+  + cleaner semantics in API simplifies host code.
+  + better support for writing libraries (auxlib.h).
+  + better type checking and error messages in the standard library.
+  + luac can now also undump.
+
+* Changes from version 2.4 to 2.5
+  -------------------------------
+  + io and string libraries are now based on pattern matching;
+    the old libraries are still available for compatibility
+  + dofile and dostring can now return values (via return statement)
+  + better support for 16- and 64-bit machines
+  + expanded documentation, with more examples
+
+* Changes from version 2.2 to 2.4
+  -------------------------------
+  + external compiler creates portable binary files that can be loaded faster
+  + interface for debugging and profiling
+  + new "getglobal" fallback
+  + new functions for handling references to Lua objects
+  + new functions in standard lib
+  + only one copy of each string is stored
+  + expanded documentation, with more examples
+
+* Changes from version 2.1 to 2.2
+  -------------------------------
+  + functions now may be declared with any "lvalue" as a name
+  + garbage collection of functions
+  + support for pipes
+
+* Changes from version 1.1 to 2.1
+  -------------------------------
+  + object-oriented support
+  + fallbacks
+  + simplified syntax for tables
+  + many internal improvements
+
+(end of HISTORY)
diff -r b4050b0e7e76 -r 582beadb4e17 external/mit/lua/dist/INSTALL
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/mit/lua/dist/INSTALL     Sun Oct 31 11:16:48 2010 +0000
@@ -0,0 +1,99 @@
+INSTALL for Lua 5.1
+
+* Building Lua
+  ------------
+  Lua is built in the src directory, but the build process can be
+  controlled from the top-level Makefile.
+
+  Building Lua on Unix systems should be very easy. First do "make" and
+  see if your platform is listed. If so, just do "make xxx", where xxx
+  is your platform name. The platforms currently supported are:
+    aix ansi bsd freebsd generic linux macosx mingw posix solaris
+
+  If your platform is not listed, try the closest one or posix, generic,
+  ansi, in this order.
+
+  See below for customization instructions and for instructions on how
+  to build with other Windows compilers.
+
+  If you want to check that Lua has been built correctly, do "make test"
+  after building Lua. Also, have a look at the example programs in test.
+
+* Installing Lua
+  --------------
+  Once you have built Lua, you may want to install it in an official
+  place in your system. In this case, do "make install". The official
+  place and the way to install files are defined in Makefile. You must
+  have the right permissions to install files.
+
+  If you want to build and install Lua in one step, do "make xxx install",
+  where xxx is your platform name.
+
+  If you want to install Lua locally, then do "make local". This will
+  create directories bin, include, lib, man, and install Lua there as
+  follows:
+
+    bin:       lua luac
+    include:   lua.h luaconf.h lualib.h lauxlib.h lua.hpp
+    lib:       liblua.a
+    man/man1:  lua.1 luac.1
+
+  These are the only directories you need for development.
+
+  There are man pages for lua and luac, in both nroff and html, and a
+  reference manual in html in doc, some sample code in test, and some
+  useful stuff in etc. You don't need these directories for development.
+
+  If you want to install Lua locally, but in some other directory, do
+  "make install INSTALL_TOP=xxx", where xxx is your chosen directory.
+
+  See below for instructions for Windows and other systems.
+
+* Customization
+  -------------
+  Three things can be customized by editing a file:
+    - Where and how to install Lua -- edit Makefile.
+    - How to build Lua -- edit src/Makefile.
+    - Lua features -- edit src/luaconf.h.
+
+  You don't actually need to edit the Makefiles because you may set the
+  relevant variables when invoking make.
+
+  On the other hand, if you need to select some Lua features, you'll need
+  to edit src/luaconf.h. The edited file will be the one installed, and
+  it will be used by any Lua clients that you build, to ensure consistency.
+
+  We strongly recommend that you enable dynamic loading. This is done
+  automatically for all platforms listed above that have this feature
+  (and also Windows). See src/luaconf.h and also src/Makefile.
+
+* Building Lua on Windows and other systems
+  -----------------------------------------



Home | Main Index | Thread Index | Old Index