Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Moved lua -> lua-5.1.5. Small fixes in Makefile.

  • Loading branch information...
commit 1f4e565bd82ecec9738fc23e86f1054630dc22c8 1 parent e8e96fa
John MacFarlane authored

Showing 103 changed files with 11,409 additions and 33 deletions. Show diff stats Hide diff stats

  1. +2 2 standalone/Makefile
  2. +34 0 standalone/lua-5.1.5/COPYRIGHT
  3. +183 0 standalone/lua-5.1.5/HISTORY
  4. +99 0 standalone/lua-5.1.5/INSTALL
  5. +128 0 standalone/lua-5.1.5/Makefile
  6. +37 0 standalone/lua-5.1.5/README
  7. +497 0 standalone/lua-5.1.5/doc/contents.html
  8. BIN  standalone/lua-5.1.5/doc/cover.png
  9. BIN  standalone/lua-5.1.5/doc/logo.gif
  10. +163 0 standalone/lua-5.1.5/doc/lua.1
  11. +83 0 standalone/lua-5.1.5/doc/lua.css
  12. +172 0 standalone/lua-5.1.5/doc/lua.html
  13. +136 0 standalone/lua-5.1.5/doc/luac.1
  14. +145 0 standalone/lua-5.1.5/doc/luac.html
  15. +24 0 standalone/lua-5.1.5/doc/manual.css
  16. +8,804 0 standalone/lua-5.1.5/doc/manual.html
  17. +40 0 standalone/lua-5.1.5/doc/readme.html
  18. +44 0 standalone/lua-5.1.5/etc/Makefile
  19. +37 0 standalone/lua-5.1.5/etc/README
  20. +38 0 standalone/lua-5.1.5/etc/all.c
  21. +9 0 standalone/lua-5.1.5/etc/lua.hpp
  22. BIN  standalone/lua-5.1.5/etc/lua.ico
  23. +31 0 standalone/lua-5.1.5/etc/lua.pc
  24. +28 0 standalone/lua-5.1.5/etc/luavs.bat
  25. +39 0 standalone/lua-5.1.5/etc/min.c
  26. +50 0 standalone/lua-5.1.5/etc/noparser.c
  27. +41 0 standalone/lua-5.1.5/etc/strict.lua
  28. +1 1  standalone/{lua → lua-5.1.5/src}/Makefile
  29. 0  standalone/{lua → lua-5.1.5/src}/lapi.c
  30. 0  standalone/{lua → lua-5.1.5/src}/lapi.h
  31. 0  standalone/{lua → lua-5.1.5/src}/lauxlib.c
  32. 0  standalone/{lua → lua-5.1.5/src}/lauxlib.h
  33. +1 1  standalone/{lua → lua-5.1.5/src}/lbaselib.c
  34. +1 9 standalone/{lua → lua-5.1.5/src}/lcode.c
  35. 0  standalone/{lua → lua-5.1.5/src}/lcode.h
  36. +2 1  standalone/{lua → lua-5.1.5/src}/ldblib.c
  37. 0  standalone/{lua → lua-5.1.5/src}/ldebug.c
  38. 0  standalone/{lua → lua-5.1.5/src}/ldebug.h
  39. +2 1  standalone/{lua → lua-5.1.5/src}/ldo.c
  40. 0  standalone/{lua → lua-5.1.5/src}/ldo.h
  41. 0  standalone/{lua → lua-5.1.5/src}/ldump.c
  42. 0  standalone/{lua → lua-5.1.5/src}/lfunc.c
  43. 0  standalone/{lua → lua-5.1.5/src}/lfunc.h
  44. +1 2  standalone/{lua → lua-5.1.5/src}/lgc.c
  45. 0  standalone/{lua → lua-5.1.5/src}/lgc.h
  46. 0  standalone/{lua → lua-5.1.5/src}/linit.c
  47. +5 2 standalone/{lua → lua-5.1.5/src}/liolib.c
  48. +4 2 standalone/{lua → lua-5.1.5/src}/llex.c
  49. 0  standalone/{lua → lua-5.1.5/src}/llex.h
  50. 0  standalone/{lua → lua-5.1.5/src}/llimits.h
  51. 0  standalone/{lua → lua-5.1.5/src}/lmathlib.c
  52. 0  standalone/{lua → lua-5.1.5/src}/lmem.c
  53. 0  standalone/{lua → lua-5.1.5/src}/lmem.h
  54. +2 2 standalone/{lua → lua-5.1.5/src}/loadlib.c
  55. 0  standalone/{lua → lua-5.1.5/src}/lobject.c
  56. 0  standalone/{lua → lua-5.1.5/src}/lobject.h
  57. 0  standalone/{lua → lua-5.1.5/src}/lopcodes.c
  58. 0  standalone/{lua → lua-5.1.5/src}/lopcodes.h
  59. 0  standalone/{lua → lua-5.1.5/src}/loslib.c
  60. +2 2 standalone/{lua → lua-5.1.5/src}/lparser.c
  61. 0  standalone/{lua → lua-5.1.5/src}/lparser.h
  62. 0  standalone/{lua → lua-5.1.5/src}/lstate.c
  63. 0  standalone/{lua → lua-5.1.5/src}/lstate.h
  64. 0  standalone/{lua → lua-5.1.5/src}/lstring.c
  65. 0  standalone/{lua → lua-5.1.5/src}/lstring.h
  66. +4 2 standalone/{lua → lua-5.1.5/src}/lstrlib.c
  67. 0  standalone/{lua → lua-5.1.5/src}/ltable.c
  68. 0  standalone/{lua → lua-5.1.5/src}/ltable.h
  69. 0  standalone/{lua → lua-5.1.5/src}/ltablib.c
  70. 0  standalone/{lua → lua-5.1.5/src}/ltm.c
  71. 0  standalone/{lua → lua-5.1.5/src}/ltm.h
  72. 0  standalone/{lua → lua-5.1.5/src}/lua.c
  73. +4 4 standalone/{lua → lua-5.1.5/src}/lua.h
  74. 0  standalone/{lua → lua-5.1.5/src}/luac.c
  75. 0  standalone/{lua → lua-5.1.5/src}/luaconf.h
  76. 0  standalone/{lua → lua-5.1.5/src}/lualib.h
  77. 0  standalone/{lua → lua-5.1.5/src}/lundump.c
  78. 0  standalone/{lua → lua-5.1.5/src}/lundump.h
  79. +6 2 standalone/{lua → lua-5.1.5/src}/lvm.c
  80. 0  standalone/{lua → lua-5.1.5/src}/lvm.h
  81. 0  standalone/{lua → lua-5.1.5/src}/lzio.c
  82. 0  standalone/{lua → lua-5.1.5/src}/lzio.h
  83. 0  standalone/{lua → lua-5.1.5/src}/print.c
  84. +26 0 standalone/lua-5.1.5/test/README
  85. +27 0 standalone/lua-5.1.5/test/bisect.lua
  86. +16 0 standalone/lua-5.1.5/test/cf.lua
  87. +5 0 standalone/lua-5.1.5/test/echo.lua
  88. +7 0 standalone/lua-5.1.5/test/env.lua
  89. +32 0 standalone/lua-5.1.5/test/factorial.lua
  90. +40 0 standalone/lua-5.1.5/test/fib.lua
  91. +13 0 standalone/lua-5.1.5/test/fibfor.lua
  92. +13 0 standalone/lua-5.1.5/test/globals.lua
  93. +3 0  standalone/lua-5.1.5/test/hello.lua
  94. +111 0 standalone/lua-5.1.5/test/life.lua
  95. +7 0 standalone/lua-5.1.5/test/luac.lua
  96. +7 0 standalone/lua-5.1.5/test/printf.lua
  97. +12 0 standalone/lua-5.1.5/test/readonly.lua
  98. +29 0 standalone/lua-5.1.5/test/sieve.lua
  99. +66 0 standalone/lua-5.1.5/test/sort.lua
  100. +12 0 standalone/lua-5.1.5/test/table.lua
  101. +32 0 standalone/lua-5.1.5/test/trace-calls.lua
  102. +38 0 standalone/lua-5.1.5/test/trace-globals.lua
  103. +14 0 standalone/lua-5.1.5/test/xd.lua
4 standalone/Makefile
@@ -2,7 +2,7 @@ OBJS=lpeg.o slnunico.o
2 2 COPT= -O2 -DNDEBUG
3 3 CWARNS= -Wall -Wextra -pedantic
4 4 CC=gcc $(COPT) $(CWARNS) -I$(LUADIR) -L$(LUADIR)
5   -LUADIR=lua
  5 +LUADIR=lua-5.1.5/src
6 6 PROG ?= ./lunamark
7 7 TESTOPTS ?= --tidy
8 8 NUM ?= 25
@@ -51,5 +51,5 @@ bench: ${testfile}
51 51
52 52 clean:
53 53 make -C $(LUADIR) clean
54   - rm $(lunamarkS) $(OBJS) lunamark main.squished.lua.embed lunamark.1
  54 + rm lunamark $(OBJS) lunamark main.squished.lua main.squished.lua.embed lunamark.1
55 55 rm ${benchtext} ${testfile}
34 standalone/lua-5.1.5/COPYRIGHT
... ... @@ -0,0 +1,34 @@
183 standalone/lua-5.1.5/HISTORY
... ... @@ -0,0 +1,183 @@
  1 +HISTORY for Lua 5.1
  2 +
  3 +* Changes from version 5.0 to 5.1
  4 + -------------------------------
  5 + Language:
  6 + + new module system.
  7 + + new semantics for control variables of fors.
  8 + + new semantics for setn/getn.
  9 + + new syntax/semantics for varargs.
  10 + + new long strings and comments.
  11 + + new `mod' operator (`%')
  12 + + new length operator #t
  13 + + metatables for all types
  14 + API:
  15 + + new functions: lua_createtable, lua_get(set)field, lua_push(to)integer.
  16 + + user supplies memory allocator (lua_open becomes lua_newstate).
  17 + + luaopen_* functions must be called through Lua.
  18 + Implementation:
  19 + + new configuration scheme via luaconf.h.
  20 + + incremental garbage collection.
  21 + + better handling of end-of-line in the lexer.
  22 + + fully reentrant parser (new Lua function `load')
  23 + + better support for 64-bit machines.
  24 + + native loadlib support for Mac OS X.
  25 + + standard distribution in only one library (lualib.a merged into lua.a)
  26 +
  27 +* Changes from version 4.0 to 5.0
  28 + -------------------------------
  29 + Language:
  30 + + lexical scoping.
  31 + + Lua coroutines.
  32 + + standard libraries now packaged in tables.
  33 + + tags replaced by metatables and tag methods replaced by metamethods,
  34 + stored in metatables.
  35 + + proper tail calls.
  36 + + each function can have its own global table, which can be shared.
  37 + + new __newindex metamethod, called when we insert a new key into a table.
  38 + + new block comments: --[[ ... ]].
  39 + + new generic for.
  40 + + new weak tables.
  41 + + new boolean type.
  42 + + new syntax "local function".
  43 + + (f()) returns the first value returned by f.
  44 + + {f()} fills a table with all values returned by f.
  45 + + \n ignored in [[\n .
  46 + + fixed and-or priorities.
  47 + + more general syntax for function definition (e.g. function a.x.y:f()...end).
  48 + + more general syntax for function calls (e.g. (print or write)(9)).
  49 + + new functions (time/date, tmpfile, unpack, require, load*, etc.).
  50 + API:
  51 + + chunks are loaded by using lua_load; new luaL_loadfile and luaL_loadbuffer.
  52 + + introduced lightweight userdata, a simple "void*" without a metatable.
  53 + + new error handling protocol: the core no longer prints error messages;
  54 + all errors are reported to the caller on the stack.
  55 + + new lua_atpanic for host cleanup.
  56 + + new, signal-safe, hook scheme.
  57 + Implementation:
  58 + + new license: MIT.
  59 + + new, faster, register-based virtual machine.
  60 + + support for external multithreading and coroutines.
  61 + + new and consistent error message format.
  62 + + the core no longer needs "stdio.h" for anything (except for a single
  63 + use of sprintf to convert numbers to strings).
  64 + + lua.c now runs the environment variable LUA_INIT, if present. It can
  65 + be "@filename", to run a file, or the chunk itself.
  66 + + support for user extensions in lua.c.
  67 + sample implementation given for command line editing.
  68 + + new dynamic loading library, active by default on several platforms.
  69 + + safe garbage-collector metamethods.
  70 + + precompiled bytecodes checked for integrity (secure binary dostring).
  71 + + strings are fully aligned.
  72 + + position capture in string.find.
  73 + + read('*l') can read lines with embedded zeros.
  74 +
  75 +* Changes from version 3.2 to 4.0
  76 + -------------------------------
  77 + Language:
  78 + + new "break" and "for" statements (both numerical and for tables).
  79 + + uniform treatment of globals: globals are now stored in a Lua table.
  80 + + improved error messages.
  81 + + no more '$debug': full speed *and* full debug information.
  82 + + new read form: read(N) for next N bytes.
  83 + + general read patterns now deprecated.
  84 + (still available with -DCOMPAT_READPATTERNS.)
  85 + + all return values are passed as arguments for the last function
  86 + (old semantics still available with -DLUA_COMPAT_ARGRET)
  87 + + garbage collection tag methods for tables now deprecated.
  88 + + there is now only one tag method for order.
  89 + API:
  90 + + New API: fully re-entrant, simpler, and more efficient.
  91 + + New debug API.
  92 + Implementation:
  93 + + faster than ever: cleaner virtual machine and new hashing algorithm.
  94 + + non-recursive garbage-collector algorithm.
  95 + + reduced memory usage for programs with many strings.
  96 + + improved treatment for memory allocation errors.
  97 + + improved support for 16-bit machines (we hope).
  98 + + code now compiles unmodified as both ANSI C and C++.
  99 + + numbers in bases other than 10 are converted using strtoul.
  100 + + new -f option in Lua to support #! scripts.
  101 + + luac can now combine text and binaries.
  102 +
  103 +* Changes from version 3.1 to 3.2
  104 + -------------------------------
  105 + + redirected all output in Lua's core to _ERRORMESSAGE and _ALERT.
  106 + + increased limit on the number of constants and globals per function
  107 + (from 2^16 to 2^24).
  108 + + debugging info (lua_debug and hooks) moved into lua_state and new API
  109 + functions provided to get and set this info.
  110 + + new debug lib gives full debugging access within Lua.
  111 + + new table functions "foreachi", "sort", "tinsert", "tremove", "getn".
  112 + + new io functions "flush", "seek".
  113 +
  114 +* Changes from version 3.0 to 3.1
  115 + -------------------------------
  116 + + NEW FEATURE: anonymous functions with closures (via "upvalues").
  117 + + new syntax:
  118 + - local variables in chunks.
  119 + - better scope control with DO block END.
  120 + - constructors can now be also written: { record-part; list-part }.
  121 + - more general syntax for function calls and lvalues, e.g.:
  122 + f(x).y=1
  123 + o:f(x,y):g(z)
  124 + f"string" is sugar for f("string")
  125 + + strings may now contain arbitrary binary data (e.g., embedded zeros).
  126 + + major code re-organization and clean-up; reduced module interdependecies.
  127 + + no arbitrary limits on the total number of constants and globals.
  128 + + support for multiple global contexts.
  129 + + better syntax error messages.
  130 + + new traversal functions "foreach" and "foreachvar".
  131 + + the default for numbers is now double.
  132 + changing it to use floats or longs is easy.
  133 + + complete debug information stored in pre-compiled chunks.
  134 + + sample interpreter now prompts user when run interactively, and also
  135 + handles control-C interruptions gracefully.
  136 +
  137 +* Changes from version 2.5 to 3.0
  138 + -------------------------------
  139 + + NEW CONCEPT: "tag methods".
  140 + Tag methods replace fallbacks as the meta-mechanism for extending the
  141 + semantics of Lua. Whereas fallbacks had a global nature, tag methods
  142 + work on objects having the same tag (e.g., groups of tables).
  143 + Existing code that uses fallbacks should work without change.
  144 + + new, general syntax for constructors {[exp] = exp, ... }.
  145 + + support for handling variable number of arguments in functions (varargs).
  146 + + support for conditional compilation ($if ... $else ... $end).
  147 + + cleaner semantics in API simplifies host code.
  148 + + better support for writing libraries (auxlib.h).
  149 + + better type checking and error messages in the standard library.
  150 + + luac can now also undump.
  151 +
  152 +* Changes from version 2.4 to 2.5
  153 + -------------------------------
  154 + + io and string libraries are now based on pattern matching;
  155 + the old libraries are still available for compatibility
  156 + + dofile and dostring can now return values (via return statement)
  157 + + better support for 16- and 64-bit machines
  158 + + expanded documentation, with more examples
  159 +
  160 +* Changes from version 2.2 to 2.4
  161 + -------------------------------
  162 + + external compiler creates portable binary files that can be loaded faster
  163 + + interface for debugging and profiling
  164 + + new "getglobal" fallback
  165 + + new functions for handling references to Lua objects
  166 + + new functions in standard lib
  167 + + only one copy of each string is stored
  168 + + expanded documentation, with more examples
  169 +
  170 +* Changes from version 2.1 to 2.2
  171 + -------------------------------
  172 + + functions now may be declared with any "lvalue" as a name
  173 + + garbage collection of functions
  174 + + support for pipes
  175 +
  176 +* Changes from version 1.1 to 2.1
  177 + -------------------------------
  178 + + object-oriented support
  179 + + fallbacks
  180 + + simplified syntax for tables
  181 + + many internal improvements
  182 +
  183 +(end of HISTORY)
99 standalone/lua-5.1.5/INSTALL
... ... @@ -0,0 +1,99 @@
  1 +INSTALL for Lua 5.1
  2 +
  3 +* Building Lua
  4 + ------------
  5 + Lua is built in the src directory, but the build process can be
  6 + controlled from the top-level Makefile.
  7 +
  8 + Building Lua on Unix systems should be very easy. First do "make" and
  9 + see if your platform is listed. If so, just do "make xxx", where xxx
  10 + is your platform name. The platforms currently supported are:
  11 + aix ansi bsd freebsd generic linux macosx mingw posix solaris
  12 +
  13 + If your platform is not listed, try the closest one or posix, generic,
  14 + ansi, in this order.
  15 +
  16 + See below for customization instructions and for instructions on how
  17 + to build with other Windows compilers.
  18 +
  19 + If you want to check that Lua has been built correctly, do "make test"
  20 + after building Lua. Also, have a look at the example programs in test.
  21 +
  22 +* Installing Lua
  23 + --------------
  24 + Once you have built Lua, you may want to install it in an official
  25 + place in your system. In this case, do "make install". The official
  26 + place and the way to install files are defined in Makefile. You must
  27 + have the right permissions to install files.
  28 +
  29 + If you want to build and install Lua in one step, do "make xxx install",
  30 + where xxx is your platform name.
  31 +
  32 + If you want to install Lua locally, then do "make local". This will
  33 + create directories bin, include, lib, man, and install Lua there as
  34 + follows:
  35 +
  36 + bin: lua luac
  37 + include: lua.h luaconf.h lualib.h lauxlib.h lua.hpp
  38 + lib: liblua.a
  39 + man/man1: lua.1 luac.1
  40 +
  41 + These are the only directories you need for development.
  42 +
  43 + There are man pages for lua and luac, in both nroff and html, and a
  44 + reference manual in html in doc, some sample code in test, and some
  45 + useful stuff in etc. You don't need these directories for development.
  46 +
  47 + If you want to install Lua locally, but in some other directory, do
  48 + "make install INSTALL_TOP=xxx", where xxx is your chosen directory.
  49 +
  50 + See below for instructions for Windows and other systems.
  51 +
  52 +* Customization
  53 + -------------
  54 + Three things can be customized by editing a file:
  55 + - Where and how to install Lua -- edit Makefile.
  56 + - How to build Lua -- edit src/Makefile.
  57 + - Lua features -- edit src/luaconf.h.
  58 +
  59 + You don't actually need to edit the Makefiles because you may set the
  60 + relevant variables when invoking make.
  61 +
  62 + On the other hand, if you need to select some Lua features, you'll need
  63 + to edit src/luaconf.h. The edited file will be the one installed, and
  64 + it will be used by any Lua clients that you build, to ensure consistency.
  65 +
  66 + We strongly recommend that you enable dynamic loading. This is done
  67 + automatically for all platforms listed above that have this feature
  68 + (and also Windows). See src/luaconf.h and also src/Makefile.
  69 +
  70 +* Building Lua on Windows and other systems
  71 + -----------------------------------------
  72 + If you're not using the usual Unix tools, then the instructions for
  73 + building Lua depend on the compiler you use. You'll need to create
  74 + projects (or whatever your compiler uses) for building the library,
  75 + the interpreter, and the compiler, as follows:
  76 +
  77 + library: lapi.c lcode.c ldebug.c ldo.c ldump.c lfunc.c lgc.c llex.c
  78 + lmem.c lobject.c lopcodes.c lparser.c lstate.c lstring.c
  79 + ltable.c ltm.c lundump.c lvm.c lzio.c
  80 + lauxlib.c lbaselib.c ldblib.c liolib.c lmathlib.c loslib.c
  81 + ltablib.c lstrlib.c loadlib.c linit.c
  82 +
  83 + interpreter: library, lua.c
  84 +
  85 + compiler: library, luac.c print.c
  86 +
  87 + If you use Visual Studio .NET, you can use etc/luavs.bat in its
  88 + "Command Prompt".
  89 +
  90 + If all you want is to build the Lua interpreter, you may put all .c files
  91 + in a single project, except for luac.c and print.c. Or just use etc/all.c.
  92 +
  93 + To use Lua as a library in your own programs, you'll need to know how to
  94 + create and use libraries with your compiler.
  95 +
  96 + As mentioned above, you may edit luaconf.h to select some features before
  97 + building Lua.
  98 +
  99 +(end of INSTALL)
128 standalone/lua-5.1.5/Makefile
... ... @@ -0,0 +1,128 @@
  1 +# makefile for installing Lua
  2 +# see INSTALL for installation instructions
  3 +# see src/Makefile and src/luaconf.h for further customization
  4 +
  5 +# == CHANGE THE SETTINGS BELOW TO SUIT YOUR ENVIRONMENT =======================
  6 +
  7 +# Your platform. See PLATS for possible values.
  8 +PLAT= none
  9 +
  10 +# Where to install. The installation starts in the src and doc directories,
  11 +# so take care if INSTALL_TOP is not an absolute path.
  12 +INSTALL_TOP= /usr/local
  13 +INSTALL_BIN= $(INSTALL_TOP)/bin
  14 +INSTALL_INC= $(INSTALL_TOP)/include
  15 +INSTALL_LIB= $(INSTALL_TOP)/lib
  16 +INSTALL_MAN= $(INSTALL_TOP)/man/man1
  17 +#
  18 +# You probably want to make INSTALL_LMOD and INSTALL_CMOD consistent with
  19 +# LUA_ROOT, LUA_LDIR, and LUA_CDIR in luaconf.h (and also with etc/lua.pc).
  20 +INSTALL_LMOD= $(INSTALL_TOP)/share/lua/$V
  21 +INSTALL_CMOD= $(INSTALL_TOP)/lib/lua/$V
  22 +
  23 +# How to install. If your install program does not support "-p", then you
  24 +# may have to run ranlib on the installed liblua.a (do "make ranlib").
  25 +INSTALL= install -p
  26 +INSTALL_EXEC= $(INSTALL) -m 0755
  27 +INSTALL_DATA= $(INSTALL) -m 0644
  28 +#
  29 +# If you don't have install you can use cp instead.
  30 +# INSTALL= cp -p
  31 +# INSTALL_EXEC= $(INSTALL)
  32 +# INSTALL_DATA= $(INSTALL)
  33 +
  34 +# Utilities.
  35 +MKDIR= mkdir -p
  36 +RANLIB= ranlib
  37 +
  38 +# == END OF USER SETTINGS. NO NEED TO CHANGE ANYTHING BELOW THIS LINE =========
  39 +
  40 +# Convenience platforms targets.
  41 +PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris
  42 +
  43 +# What to install.
  44 +TO_BIN= lua luac
  45 +TO_INC= lua.h luaconf.h lualib.h lauxlib.h ../etc/lua.hpp
  46 +TO_LIB= liblua.a
  47 +TO_MAN= lua.1 luac.1
  48 +
  49 +# Lua version and release.
  50 +V= 5.1
  51 +R= 5.1.5
  52 +
  53 +all: $(PLAT)
  54 +
  55 +$(PLATS) clean:
  56 + cd src && $(MAKE) $@
  57 +
  58 +test: dummy
  59 + src/lua test/hello.lua
  60 +
  61 +install: dummy
  62 + cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD)
  63 + cd src && $(INSTALL_EXEC) $(TO_BIN) $(INSTALL_BIN)
  64 + cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC)
  65 + cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB)
  66 + cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN)
  67 +
  68 +ranlib:
  69 + cd src && cd $(INSTALL_LIB) && $(RANLIB) $(TO_LIB)
  70 +
  71 +local:
  72 + $(MAKE) install INSTALL_TOP=..
  73 +
  74 +none:
  75 + @echo "Please do"
  76 + @echo " make PLATFORM"
  77 + @echo "where PLATFORM is one of these:"
  78 + @echo " $(PLATS)"
  79 + @echo "See INSTALL for complete instructions."
  80 +
  81 +# make may get confused with test/ and INSTALL in a case-insensitive OS
  82 +dummy:
  83 +
  84 +# echo config parameters
  85 +echo:
  86 + @echo ""
  87 + @echo "These are the parameters currently set in src/Makefile to build Lua $R:"
  88 + @echo ""
  89 + @cd src && $(MAKE) -s echo
  90 + @echo ""
  91 + @echo "These are the parameters currently set in Makefile to install Lua $R:"
  92 + @echo ""
  93 + @echo "PLAT = $(PLAT)"
  94 + @echo "INSTALL_TOP = $(INSTALL_TOP)"
  95 + @echo "INSTALL_BIN = $(INSTALL_BIN)"
  96 + @echo "INSTALL_INC = $(INSTALL_INC)"
  97 + @echo "INSTALL_LIB = $(INSTALL_LIB)"
  98 + @echo "INSTALL_MAN = $(INSTALL_MAN)"
  99 + @echo "INSTALL_LMOD = $(INSTALL_LMOD)"
  100 + @echo "INSTALL_CMOD = $(INSTALL_CMOD)"
  101 + @echo "INSTALL_EXEC = $(INSTALL_EXEC)"
  102 + @echo "INSTALL_DATA = $(INSTALL_DATA)"
  103 + @echo ""
  104 + @echo "See also src/luaconf.h ."
  105 + @echo ""
  106 +
  107 +# echo private config parameters
  108 +pecho:
  109 + @echo "V = $(V)"
  110 + @echo "R = $(R)"
  111 + @echo "TO_BIN = $(TO_BIN)"
  112 + @echo "TO_INC = $(TO_INC)"
  113 + @echo "TO_LIB = $(TO_LIB)"
  114 + @echo "TO_MAN = $(TO_MAN)"
  115 +
  116 +# echo config parameters as Lua code
  117 +# uncomment the last sed expression if you want nil instead of empty strings
  118 +lecho:
  119 + @echo "-- installation parameters for Lua $R"
  120 + @echo "VERSION = '$V'"
  121 + @echo "RELEASE = '$R'"
  122 + @$(MAKE) echo | grep = | sed -e 's/= /= "/' -e 's/$$/"/' #-e 's/""/nil/'
  123 + @echo "-- EOF"
  124 +
  125 +# list targets that do not create files (but not all makes understand .PHONY)
  126 +.PHONY: all $(PLATS) clean test install local none dummy echo pecho lecho
  127 +
  128 +# (end of Makefile)
37 standalone/lua-5.1.5/README
... ... @@ -0,0 +1,37 @@
  1 +README for Lua 5.1
  2 +
  3 +See INSTALL for installation instructions.
  4 +See HISTORY for a summary of changes since the last released version.
  5 +
  6 +* What is Lua?
  7 + ------------
  8 + Lua is a powerful, light-weight programming language designed for extending
  9 + applications. Lua is also frequently used as a general-purpose, stand-alone
  10 + language. Lua is free software.
  11 +
  12 + For complete information, visit Lua's web site at http://www.lua.org/ .
  13 + For an executive summary, see http://www.lua.org/about.html .
  14 +
  15 + Lua has been used in many different projects around the world.
  16 + For a short list, see http://www.lua.org/uses.html .
  17 +
  18 +* Availability
  19 + ------------
  20 + Lua is freely available for both academic and commercial purposes.
  21 + See COPYRIGHT and http://www.lua.org/license.html for details.
  22 + Lua can be downloaded at http://www.lua.org/download.html .
  23 +
  24 +* Installation
  25 + ------------
  26 + Lua is implemented in pure ANSI C, and compiles unmodified in all known
  27 + platforms that have an ANSI C compiler. In most Unix-like platforms, simply
  28 + do "make" with a suitable target. See INSTALL for detailed instructions.
  29 +
  30 +* Origin
  31 + ------
  32 + Lua is developed at Lua.org, a laboratory of the Department of Computer
  33 + Science of PUC-Rio (the Pontifical Catholic University of Rio de Janeiro
  34 + in Brazil).
  35 + For more information about the authors, see http://www.lua.org/authors.html .
  36 +
  37 +(end of README)
497 standalone/lua-5.1.5/doc/contents.html
... ... @@ -0,0 +1,497 @@
  1 +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  2 +<HTML>
  3 +<HEAD>
  4 +<TITLE>Lua 5.1 Reference Manual - contents</TITLE>
  5 +<LINK REL="stylesheet" TYPE="text/css" HREF="lua.css">
  6 +<META HTTP-EQUIV="content-type" CONTENT="text/html; charset=utf-8">
  7 +<STYLE TYPE="text/css">
  8 +ul {
  9 + list-style-type: none ;
  10 +}
  11 +</STYLE>
  12 +</HEAD>
  13 +
  14 +<BODY>
  15 +
  16 +<HR>
  17 +<H1>
  18 +<A HREF="http://www.lua.org/"><IMG SRC="logo.gif" ALT="" BORDER=0></A>
  19 +Lua 5.1 Reference Manual
  20 +</H1>
  21 +
  22 +<P>
  23 +The reference manual is the official definition of the Lua language.
  24 +For a complete introduction to Lua programming, see the book
  25 +<A HREF="http://www.lua.org/docs.html#pil">Programming in Lua</A>.
  26 +
  27 +<P>
  28 +This manual is also available as a book:
  29 +<BLOCKQUOTE>
  30 +<A HREF="http://www.amazon.com/exec/obidos/ASIN/8590379833/lua-indexmanual-20">
  31 +<IMG SRC="cover.png" ALT="" TITLE="buy from Amazon" BORDER=1 ALIGN="left" HSPACE=12>
  32 +</A>
  33 +<B>Lua 5.1 Reference Manual</B>
  34 +<BR>by R. Ierusalimschy, L. H. de Figueiredo, W. Celes
  35 +<BR>Lua.org, August 2006
  36 +<BR>ISBN 85-903798-3-3
  37 +<BR CLEAR="all">
  38 +</BLOCKQUOTE>
  39 +
  40 +<P>
  41 +<A HREF="http://www.amazon.com/exec/obidos/ASIN/8590379833/lua-indexmanual-20">Buy a copy</A>
  42 +of this book and
  43 +<A HREF="http://www.lua.org/donations.html">help to support</A>
  44 +the Lua project.
  45 +
  46 +<P>
  47 +<A HREF="manual.html">start</A>
  48 +&middot;
  49 +<A HREF="#contents">contents</A>
  50 +&middot;
  51 +<A HREF="#index">index</A>
  52 +&middot;
  53 +<A HREF="http://www.lua.org/manual/">other versions</A>
  54 +<HR>
  55 +<SMALL>
  56 +Copyright &copy; 2006&ndash;2012 Lua.org, PUC-Rio.
  57 +Freely available under the terms of the
  58 +<A HREF="http://www.lua.org/license.html">Lua license</A>.
  59 +</SMALL>
  60 +
  61 +<H2><A NAME="contents">Contents</A></H2>
  62 +<UL style="padding: 0">
  63 +<LI><A HREF="manual.html">1 &ndash; Introduction</A>
  64 +<P>
  65 +<LI><A HREF="manual.html#2">2 &ndash; The Language</A>
  66 +<UL>
  67 +<LI><A HREF="manual.html#2.1">2.1 &ndash; Lexical Conventions</A>
  68 +<LI><A HREF="manual.html#2.2">2.2 &ndash; Values and Types</A>
  69 +<UL>
  70 +<LI><A HREF="manual.html#2.2.1">2.2.1 &ndash; Coercion</A>
  71 +</UL>
  72 +<LI><A HREF="manual.html#2.3">2.3 &ndash; Variables</A>
  73 +<LI><A HREF="manual.html#2.4">2.4 &ndash; Statements</A>
  74 +<UL>
  75 +<LI><A HREF="manual.html#2.4.1">2.4.1 &ndash; Chunks</A>
  76 +<LI><A HREF="manual.html#2.4.2">2.4.2 &ndash; Blocks</A>
  77 +<LI><A HREF="manual.html#2.4.3">2.4.3 &ndash; Assignment</A>
  78 +<LI><A HREF="manual.html#2.4.4">2.4.4 &ndash; Control Structures</A>
  79 +<LI><A HREF="manual.html#2.4.5">2.4.5 &ndash; For Statement</A>
  80 +<LI><A HREF="manual.html#2.4.6">2.4.6 &ndash; Function Calls as Statements</A>
  81 +<LI><A HREF="manual.html#2.4.7">2.4.7 &ndash; Local Declarations</A>
  82 +</UL>
  83 +<LI><A HREF="manual.html#2.5">2.5 &ndash; Expressions</A>
  84 +<UL>
  85 +<LI><A HREF="manual.html#2.5.1">2.5.1 &ndash; Arithmetic Operators</A>
  86 +<LI><A HREF="manual.html#2.5.2">2.5.2 &ndash; Relational Operators</A>
  87 +<LI><A HREF="manual.html#2.5.3">2.5.3 &ndash; Logical Operators</A>
  88 +<LI><A HREF="manual.html#2.5.4">2.5.4 &ndash; Concatenation</A>
  89 +<LI><A HREF="manual.html#2.5.5">2.5.5 &ndash; The Length Operator</A>
  90 +<LI><A HREF="manual.html#2.5.6">2.5.6 &ndash; Precedence</A>
  91 +<LI><A HREF="manual.html#2.5.7">2.5.7 &ndash; Table Constructors</A>
  92 +<LI><A HREF="manual.html#2.5.8">2.5.8 &ndash; Function Calls</A>
  93 +<LI><A HREF="manual.html#2.5.9">2.5.9 &ndash; Function Definitions</A>
  94 +</UL>
  95 +<LI><A HREF="manual.html#2.6">2.6 &ndash; Visibility Rules</A>
  96 +<LI><A HREF="manual.html#2.7">2.7 &ndash; Error Handling</A>
  97 +<LI><A HREF="manual.html#2.8">2.8 &ndash; Metatables</A>
  98 +<LI><A HREF="manual.html#2.9">2.9 &ndash; Environments</A>
  99 +<LI><A HREF="manual.html#2.10">2.10 &ndash; Garbage Collection</A>
  100 +<UL>
  101 +<LI><A HREF="manual.html#2.10.1">2.10.1 &ndash; Garbage-Collection Metamethods</A>
  102 +<LI><A HREF="manual.html#2.10.2">2.10.2 &ndash; Weak Tables</A>
  103 +</UL>
  104 +<LI><A HREF="manual.html#2.11">2.11 &ndash; Coroutines</A>
  105 +</UL>
  106 +<P>
  107 +<LI><A HREF="manual.html#3">3 &ndash; The Application Program Interface</A>
  108 +<UL>
  109 +<LI><A HREF="manual.html#3.1">3.1 &ndash; The Stack</A>
  110 +<LI><A HREF="manual.html#3.2">3.2 &ndash; Stack Size</A>
  111 +<LI><A HREF="manual.html#3.3">3.3 &ndash; Pseudo-Indices</A>
  112 +<LI><A HREF="manual.html#3.4">3.4 &ndash; C Closures</A>
  113 +<LI><A HREF="manual.html#3.5">3.5 &ndash; Registry</A>
  114 +<LI><A HREF="manual.html#3.6">3.6 &ndash; Error Handling in C</A>
  115 +<LI><A HREF="manual.html#3.7">3.7 &ndash; Functions and Types</A>
  116 +<LI><A HREF="manual.html#3.8">3.8 &ndash; The Debug Interface</A>
  117 +</UL>
  118 +<P>
  119 +<LI><A HREF="manual.html#4">4 &ndash; The Auxiliary Library</A>
  120 +<UL>
  121 +<LI><A HREF="manual.html#4.1">4.1 &ndash; Functions and Types</A>
  122 +</UL>
  123 +<P>
  124 +<LI><A HREF="manual.html#5">5 &ndash; Standard Libraries</A>
  125 +<UL>
  126 +<LI><A HREF="manual.html#5.1">5.1 &ndash; Basic Functions</A>
  127 +<LI><A HREF="manual.html#5.2">5.2 &ndash; Coroutine Manipulation</A>
  128 +<LI><A HREF="manual.html#5.3">5.3 &ndash; Modules</A>
  129 +<LI><A HREF="manual.html#5.4">5.4 &ndash; String Manipulation</A>
  130 +<UL>
  131 +<LI><A HREF="manual.html#5.4.1">5.4.1 &ndash; Patterns</A>
  132 +</UL>
  133 +<LI><A HREF="manual.html#5.5">5.5 &ndash; Table Manipulation</A>
  134 +<LI><A HREF="manual.html#5.6">5.6 &ndash; Mathematical Functions</A>
  135 +<LI><A HREF="manual.html#5.7">5.7 &ndash; Input and Output Facilities</A>
  136 +<LI><A HREF="manual.html#5.8">5.8 &ndash; Operating System Facilities</A>
  137 +<LI><A HREF="manual.html#5.9">5.9 &ndash; The Debug Library</A>
  138 +</UL>
  139 +<P>
  140 +<LI><A HREF="manual.html#6">6 &ndash; Lua Stand-alone</A>
  141 +<P>
  142 +<LI><A HREF="manual.html#7">7 &ndash; Incompatibilities with the Previous Version</A>
  143 +<UL>
  144 +<LI><A HREF="manual.html#7.1">7.1 &ndash; Changes in the Language</A>
  145 +<LI><A HREF="manual.html#7.2">7.2 &ndash; Changes in the Libraries</A>
  146 +<LI><A HREF="manual.html#7.3">7.3 &ndash; Changes in the API</A>
  147 +</UL>
  148 +<P>
  149 +<LI><A HREF="manual.html#8">8 &ndash; The Complete Syntax of Lua</A>
  150 +</UL>
  151 +
  152 +<H2><A NAME="index">Index</A></H2>
  153 +<TABLE WIDTH="100%">
  154 +<TR VALIGN="top">
  155 +<TD>
  156 +<H3><A NAME="functions">Lua functions</A></H3>
  157 +<A HREF="manual.html#pdf-_G">_G</A><BR>
  158 +<A HREF="manual.html#pdf-_VERSION">_VERSION</A><BR>
  159 +<P>
  160 +
  161 +<A HREF="manual.html#pdf-assert">assert</A><BR>
  162 +<A HREF="manual.html#pdf-collectgarbage">collectgarbage</A><BR>
  163 +<A HREF="manual.html#pdf-dofile">dofile</A><BR>
  164 +<A HREF="manual.html#pdf-error">error</A><BR>
  165 +<A HREF="manual.html#pdf-getfenv">getfenv</A><BR>
  166 +<A HREF="manual.html#pdf-getmetatable">getmetatable</A><BR>
  167 +<A HREF="manual.html#pdf-ipairs">ipairs</A><BR>
  168 +<A HREF="manual.html#pdf-load">load</A><BR>
  169 +<A HREF="manual.html#pdf-loadfile">loadfile</A><BR>
  170 +<A HREF="manual.html#pdf-loadstring">loadstring</A><BR>
  171 +<A HREF="manual.html#pdf-module">module</A><BR>
  172 +<A HREF="manual.html#pdf-next">next</A><BR>
  173 +<A HREF="manual.html#pdf-pairs">pairs</A><BR>
  174 +<A HREF="manual.html#pdf-pcall">pcall</A><BR>
  175 +<A HREF="manual.html#pdf-print">print</A><BR>
  176 +<A HREF="manual.html#pdf-rawequal">rawequal</A><BR>
  177 +<A HREF="manual.html#pdf-rawget">rawget</A><BR>
  178 +<A HREF="manual.html#pdf-rawset">rawset</A><BR>
  179 +<A HREF="manual.html#pdf-require">require</A><BR>
  180 +<A HREF="manual.html#pdf-select">select</A><BR>
  181 +<A HREF="manual.html#pdf-setfenv">setfenv</A><BR>
  182 +<A HREF="manual.html#pdf-setmetatable">setmetatable</A><BR>
  183 +<A HREF="manual.html#pdf-tonumber">tonumber</A><BR>
  184 +<A HREF="manual.html#pdf-tostring">tostring</A><BR>
  185 +<A HREF="manual.html#pdf-type">type</A><BR>
  186 +<A HREF="manual.html#pdf-unpack">unpack</A><BR>
  187 +<A HREF="manual.html#pdf-xpcall">xpcall</A><BR>
  188 +<P>
  189 +
  190 +<A HREF="manual.html#pdf-coroutine.create">coroutine.create</A><BR>
  191 +<A HREF="manual.html#pdf-coroutine.resume">coroutine.resume</A><BR>
  192 +<A HREF="manual.html#pdf-coroutine.running">coroutine.running</A><BR>
  193 +<A HREF="manual.html#pdf-coroutine.status">coroutine.status</A><BR>
  194 +<A HREF="manual.html#pdf-coroutine.wrap">coroutine.wrap</A><BR>
  195 +<A HREF="manual.html#pdf-coroutine.yield">coroutine.yield</A><BR>
  196 +<P>
  197 +
  198 +<A HREF="manual.html#pdf-debug.debug">debug.debug</A><BR>
  199 +<A HREF="manual.html#pdf-debug.getfenv">debug.getfenv</A><BR>
  200 +<A HREF="manual.html#pdf-debug.gethook">debug.gethook</A><BR>
  201 +<A HREF="manual.html#pdf-debug.getinfo">debug.getinfo</A><BR>
  202 +<A HREF="manual.html#pdf-debug.getlocal">debug.getlocal</A><BR>
  203 +<A HREF="manual.html#pdf-debug.getmetatable">debug.getmetatable</A><BR>
  204 +<A HREF="manual.html#pdf-debug.getregistry">debug.getregistry</A><BR>
  205 +<A HREF="manual.html#pdf-debug.getupvalue">debug.getupvalue</A><BR>
  206 +<A HREF="manual.html#pdf-debug.setfenv">debug.setfenv</A><BR>
  207 +<A HREF="manual.html#pdf-debug.sethook">debug.sethook</A><BR>
  208 +<A HREF="manual.html#pdf-debug.setlocal">debug.setlocal</A><BR>
  209 +<A HREF="manual.html#pdf-debug.setmetatable">debug.setmetatable</A><BR>
  210 +<A HREF="manual.html#pdf-debug.setupvalue">debug.setupvalue</A><BR>
  211 +<A HREF="manual.html#pdf-debug.traceback">debug.traceback</A><BR>
  212 +
  213 +</TD>
  214 +<TD>
  215 +<H3>&nbsp;</H3>
  216 +<A HREF="manual.html#pdf-file:close">file:close</A><BR>
  217 +<A HREF="manual.html#pdf-file:flush">file:flush</A><BR>
  218 +<A HREF="manual.html#pdf-file:lines">file:lines</A><BR>
  219 +<A HREF="manual.html#pdf-file:read">file:read</A><BR>
  220 +<A HREF="manual.html#pdf-file:seek">file:seek</A><BR>
  221 +<A HREF="manual.html#pdf-file:setvbuf">file:setvbuf</A><BR>
  222 +<A HREF="manual.html#pdf-file:write">file:write</A><BR>
  223 +<P>
  224 +
  225 +<A HREF="manual.html#pdf-io.close">io.close</A><BR>
  226 +<A HREF="manual.html#pdf-io.flush">io.flush</A><BR>
  227 +<A HREF="manual.html#pdf-io.input">io.input</A><BR>
  228 +<A HREF="manual.html#pdf-io.lines">io.lines</A><BR>
  229 +<A HREF="manual.html#pdf-io.open">io.open</A><BR>
  230 +<A HREF="manual.html#pdf-io.output">io.output</A><BR>
  231 +<A HREF="manual.html#pdf-io.popen">io.popen</A><BR>
  232 +<A HREF="manual.html#pdf-io.read">io.read</A><BR>
  233 +<A HREF="manual.html#pdf-io.stderr">io.stderr</A><BR>
  234 +<A HREF="manual.html#pdf-io.stdin">io.stdin</A><BR>
  235 +<A HREF="manual.html#pdf-io.stdout">io.stdout</A><BR>
  236 +<A HREF="manual.html#pdf-io.tmpfile">io.tmpfile</A><BR>
  237 +<A HREF="manual.html#pdf-io.type">io.type</A><BR>
  238 +<A HREF="manual.html#pdf-io.write">io.write</A><BR>
  239 +<P>
  240 +
  241 +<A HREF="manual.html#pdf-math.abs">math.abs</A><BR>
  242 +<A HREF="manual.html#pdf-math.acos">math.acos</A><BR>
  243 +<A HREF="manual.html#pdf-math.asin">math.asin</A><BR>
  244 +<A HREF="manual.html#pdf-math.atan">math.atan</A><BR>
  245 +<A HREF="manual.html#pdf-math.atan2">math.atan2</A><BR>
  246 +<A HREF="manual.html#pdf-math.ceil">math.ceil</A><BR>
  247 +<A HREF="manual.html#pdf-math.cos">math.cos</A><BR>
  248 +<A HREF="manual.html#pdf-math.cosh">math.cosh</A><BR>
  249 +<A HREF="manual.html#pdf-math.deg">math.deg</A><BR>
  250 +<A HREF="manual.html#pdf-math.exp">math.exp</A><BR>
  251 +<A HREF="manual.html#pdf-math.floor">math.floor</A><BR>
  252 +<A HREF="manual.html#pdf-math.fmod">math.fmod</A><BR>
  253 +<A HREF="manual.html#pdf-math.frexp">math.frexp</A><BR>
  254 +<A HREF="manual.html#pdf-math.huge">math.huge</A><BR>
  255 +<A HREF="manual.html#pdf-math.ldexp">math.ldexp</A><BR>
  256 +<A HREF="manual.html#pdf-math.log">math.log</A><BR>
  257 +<A HREF="manual.html#pdf-math.log10">math.log10</A><BR>
  258 +<A HREF="manual.html#pdf-math.max">math.max</A><BR>
  259 +<A HREF="manual.html#pdf-math.min">math.min</A><BR>
  260 +<A HREF="manual.html#pdf-math.modf">math.modf</A><BR>
  261 +<A HREF="manual.html#pdf-math.pi">math.pi</A><BR>
  262 +<A HREF="manual.html#pdf-math.pow">math.pow</A><BR>
  263 +<A HREF="manual.html#pdf-math.rad">math.rad</A><BR>
  264 +<A HREF="manual.html#pdf-math.random">math.random</A><BR>
  265 +<A HREF="manual.html#pdf-math.randomseed">math.randomseed</A><BR>
  266 +<A HREF="manual.html#pdf-math.sin">math.sin</A><BR>
  267 +<A HREF="manual.html#pdf-math.sinh">math.sinh</A><BR>
  268 +<A HREF="manual.html#pdf-math.sqrt">math.sqrt</A><BR>
  269 +<A HREF="manual.html#pdf-math.tan">math.tan</A><BR>
  270 +<A HREF="manual.html#pdf-math.tanh">math.tanh</A><BR>
  271 +<P>
  272 +
  273 +<A HREF="manual.html#pdf-os.clock">os.clock</A><BR>
  274 +<A HREF="manual.html#pdf-os.date">os.date</A><BR>
  275 +<A HREF="manual.html#pdf-os.difftime">os.difftime</A><BR>
  276 +<A HREF="manual.html#pdf-os.execute">os.execute</A><BR>
  277 +<A HREF="manual.html#pdf-os.exit">os.exit</A><BR>
  278 +<A HREF="manual.html#pdf-os.getenv">os.getenv</A><BR>
  279 +<A HREF="manual.html#pdf-os.remove">os.remove</A><BR>
  280 +<A HREF="manual.html#pdf-os.rename">os.rename</A><BR>
  281 +<A HREF="manual.html#pdf-os.setlocale">os.setlocale</A><BR>
  282 +<A HREF="manual.html#pdf-os.time">os.time</A><BR>
  283 +<A HREF="manual.html#pdf-os.tmpname">os.tmpname</A><BR>
  284 +<P>
  285 +
  286 +<A HREF="manual.html#pdf-package.cpath">package.cpath</A><BR>
  287 +<A HREF="manual.html#pdf-package.loaded">package.loaded</A><BR>
  288 +<A HREF="manual.html#pdf-package.loaders">package.loaders</A><BR>
  289 +<A HREF="manual.html#pdf-package.loadlib">package.loadlib</A><BR>
  290 +<A HREF="manual.html#pdf-package.path">package.path</A><BR>
  291 +<A HREF="manual.html#pdf-package.preload">package.preload</A><BR>
  292 +<A HREF="manual.html#pdf-package.seeall">package.seeall</A><BR>
  293 +<P>
  294 +
  295 +<A HREF="manual.html#pdf-string.byte">string.byte</A><BR>
  296 +<A HREF="manual.html#pdf-string.char">string.char</A><BR>
  297 +<A HREF="manual.html#pdf-string.dump">string.dump</A><BR>
  298 +<A HREF="manual.html#pdf-string.find">string.find</A><BR>
  299 +<A HREF="manual.html#pdf-string.format">string.format</A><BR>
  300 +<A HREF="manual.html#pdf-string.gmatch">string.gmatch</A><BR>
  301 +<A HREF="manual.html#pdf-string.gsub">string.gsub</A><BR>
  302 +<A HREF="manual.html#pdf-string.len">string.len</A><BR>
  303 +<A HREF="manual.html#pdf-string.lower">string.lower</A><BR>
  304 +<A HREF="manual.html#pdf-string.match">string.match</A><BR>
  305 +<A HREF="manual.html#pdf-string.rep">string.rep</A><BR>
  306 +<A HREF="manual.html#pdf-string.reverse">string.reverse</A><BR>
  307 +<A HREF="manual.html#pdf-string.sub">string.sub</A><BR>
  308 +<A HREF="manual.html#pdf-string.upper">string.upper</A><BR>
  309 +<P>
  310 +
  311 +<A HREF="manual.html#pdf-table.concat">table.concat</A><BR>
  312 +<A HREF="manual.html#pdf-table.insert">table.insert</A><BR>
  313 +<A HREF="manual.html#pdf-table.maxn">table.maxn</A><BR>
  314 +<A HREF="manual.html#pdf-table.remove">table.remove</A><BR>
  315 +<A HREF="manual.html#pdf-table.sort">table.sort</A><BR>
  316 +
  317 +</TD>
  318 +<TD>
  319 +<H3>C API</H3>
  320 +<A HREF="manual.html#lua_Alloc">lua_Alloc</A><BR>
  321 +<A HREF="manual.html#lua_CFunction">lua_CFunction</A><BR>
  322 +<A HREF="manual.html#lua_Debug">lua_Debug</A><BR>
  323 +<A HREF="manual.html#lua_Hook">lua_Hook</A><BR>
  324 +<A HREF="manual.html#lua_Integer">lua_Integer</A><BR>
  325 +<A HREF="manual.html#lua_Number">lua_Number</A><BR>
  326 +<A HREF="manual.html#lua_Reader">lua_Reader</A><BR>
  327 +<A HREF="manual.html#lua_State">lua_State</A><BR>
  328 +<A HREF="manual.html#lua_Writer">lua_Writer</A><BR>
  329 +<P>
  330 +
  331 +<A HREF="manual.html#lua_atpanic">lua_atpanic</A><BR>
  332 +<A HREF="manual.html#lua_call">lua_call</A><BR>
  333 +<A HREF="manual.html#lua_checkstack">lua_checkstack</A><BR>
  334 +<A HREF="manual.html#lua_close">lua_close</A><BR>
  335 +<A HREF="manual.html#lua_concat">lua_concat</A><BR>
  336 +<A HREF="manual.html#lua_cpcall">lua_cpcall</A><BR>
  337 +<A HREF="manual.html#lua_createtable">lua_createtable</A><BR>
  338 +<A HREF="manual.html#lua_dump">lua_dump</A><BR>
  339 +<A HREF="manual.html#lua_equal">lua_equal</A><BR>
  340 +<A HREF="manual.html#lua_error">lua_error</A><BR>
  341 +<A HREF="manual.html#lua_gc">lua_gc</A><BR>
  342 +<A HREF="manual.html#lua_getallocf">lua_getallocf</A><BR>
  343 +<A HREF="manual.html#lua_getfenv">lua_getfenv</A><BR>
  344 +<A HREF="manual.html#lua_getfield">lua_getfield</A><BR>
  345 +<A HREF="manual.html#lua_getglobal">lua_getglobal</A><BR>
  346 +<A HREF="manual.html#lua_gethook">lua_gethook</A><BR>
  347 +<A HREF="manual.html#lua_gethookcount">lua_gethookcount</A><BR>
  348 +<A HREF="manual.html#lua_gethookmask">lua_gethookmask</A><BR>
  349 +<A HREF="manual.html#lua_getinfo">lua_getinfo</A><BR>
  350 +<A HREF="manual.html#lua_getlocal">lua_getlocal</A><BR>
  351 +<A HREF="manual.html#lua_getmetatable">lua_getmetatable</A><BR>
  352 +<A HREF="manual.html#lua_getstack">lua_getstack</A><BR>
  353 +<A HREF="manual.html#lua_gettable">lua_gettable</A><BR>
  354 +<A HREF="manual.html#lua_gettop">lua_gettop</A><BR>
  355 +<A HREF="manual.html#lua_getupvalue">lua_getupvalue</A><BR>
  356 +<A HREF="manual.html#lua_insert">lua_insert</A><BR>
  357 +<A HREF="manual.html#lua_isboolean">lua_isboolean</A><BR>
  358 +<A HREF="manual.html#lua_iscfunction">lua_iscfunction</A><BR>
  359 +<A HREF="manual.html#lua_isfunction">lua_isfunction</A><BR>
  360 +<A HREF="manual.html#lua_islightuserdata">lua_islightuserdata</A><BR>
  361 +<A HREF="manual.html#lua_isnil">lua_isnil</A><BR>
  362 +<A HREF="manual.html#lua_isnone">lua_isnone</A><BR>
  363 +<A HREF="manual.html#lua_isnoneornil">lua_isnoneornil</A><BR>
  364 +<A HREF="manual.html#lua_isnumber">lua_isnumber</A><BR>
  365 +<A HREF="manual.html#lua_isstring">lua_isstring</A><BR>
  366 +<A HREF="manual.html#lua_istable">lua_istable</A><BR>
  367 +<A HREF="manual.html#lua_isthread">lua_isthread</A><BR>
  368 +<A HREF="manual.html#lua_isuserdata">lua_isuserdata</A><BR>
  369 +<A HREF="manual.html#lua_lessthan">lua_lessthan</A><BR>
  370 +<A HREF="manual.html#lua_load">lua_load</A><BR>
  371 +<A HREF="manual.html#lua_newstate">lua_newstate</A><BR>
  372 +<A HREF="manual.html#lua_newtable">lua_newtable</A><BR>
  373 +<A HREF="manual.html#lua_newthread">lua_newthread</A><BR>
  374 +<A HREF="manual.html#lua_newuserdata">lua_newuserdata</A><BR>
  375 +<A HREF="manual.html#lua_next">lua_next</A><BR>
  376 +<A HREF="manual.html#lua_objlen">lua_objlen</A><BR>
  377 +<A HREF="manual.html#lua_pcall">lua_pcall</A><BR>
  378 +<A HREF="manual.html#lua_pop">lua_pop</A><BR>
  379 +<A HREF="manual.html#lua_pushboolean">lua_pushboolean</A><BR>
  380 +<A HREF="manual.html#lua_pushcclosure">lua_pushcclosure</A><BR>
  381 +<A HREF="manual.html#lua_pushcfunction">lua_pushcfunction</A><BR>
  382 +<A HREF="manual.html#lua_pushfstring">lua_pushfstring</A><BR>
  383 +<A HREF="manual.html#lua_pushinteger">lua_pushinteger</A><BR>
  384 +<A HREF="manual.html#lua_pushlightuserdata">lua_pushlightuserdata</A><BR>
  385 +<A HREF="manual.html#lua_pushliteral">lua_pushliteral</A><BR>
  386 +<A HREF="manual.html#lua_pushlstring">lua_pushlstring</A><BR>
  387 +<A HREF="manual.html#lua_pushnil">lua_pushnil</A><BR>
  388 +<A HREF="manual.html#lua_pushnumber">lua_pushnumber</A><BR>
  389 +<A HREF="manual.html#lua_pushstring">lua_pushstring</A><BR>
  390 +<A HREF="manual.html#lua_pushthread">lua_pushthread</A><BR>
  391 +<A HREF="manual.html#lua_pushvalue">lua_pushvalue</A><BR>
  392 +<A HREF="manual.html#lua_pushvfstring">lua_pushvfstring</A><BR>
  393 +<A HREF="manual.html#lua_rawequal">lua_rawequal</A><BR>
  394 +<A HREF="manual.html#lua_rawget">lua_rawget</A><BR>
  395 +<A HREF="manual.html#lua_rawgeti">lua_rawgeti</A><BR>
  396 +<A HREF="manual.html#lua_rawset">lua_rawset</A><BR>
  397 +<A HREF="manual.html#lua_rawseti">lua_rawseti</A><BR>
  398 +<A HREF="manual.html#lua_register">lua_register</A><BR>
  399 +<A HREF="manual.html#lua_remove">lua_remove</A><BR>
  400 +<A HREF="manual.html#lua_replace">lua_replace</A><BR>
  401 +<A HREF="manual.html#lua_resume">lua_resume</A><BR>
  402 +<A HREF="manual.html#lua_setallocf">lua_setallocf</A><BR>
  403 +<A HREF="manual.html#lua_setfenv">lua_setfenv</A><BR>
  404 +<A HREF="manual.html#lua_setfield">lua_setfield</A><BR>
  405 +<A HREF="manual.html#lua_setglobal">lua_setglobal</A><BR>
  406 +<A HREF="manual.html#lua_sethook">lua_sethook</A><BR>
  407 +<A HREF="manual.html#lua_setlocal">lua_setlocal</A><BR>
  408 +<A HREF="manual.html#lua_setmetatable">lua_setmetatable</A><BR>
  409 +<A HREF="manual.html#lua_settable">lua_settable</A><BR>
  410 +<A HREF="manual.html#lua_settop">lua_settop</A><BR>
  411 +<A HREF="manual.html#lua_setupvalue">lua_setupvalue</A><BR>
  412 +<A HREF="manual.html#lua_status">lua_status</A><BR>
  413 +<A HREF="manual.html#lua_toboolean">lua_toboolean</A><BR>
  414 +<A HREF="manual.html#lua_tocfunction">lua_tocfunction</A><BR>
  415 +<A HREF="manual.html#lua_tointeger">lua_tointeger</A><BR>
  416 +<A HREF="manual.html#lua_tolstring">lua_tolstring</A><BR>
  417 +<A HREF="manual.html#lua_tonumber">lua_tonumber</A><BR>
  418 +<A HREF="manual.html#lua_topointer">lua_topointer</A><BR>
  419 +<A HREF="manual.html#lua_tostring">lua_tostring</A><BR>
  420 +<A HREF="manual.html#lua_tothread">lua_tothread</A><BR>
  421 +<A HREF="manual.html#lua_touserdata">lua_touserdata</A><BR>
  422 +<A HREF="manual.html#lua_type">lua_type</A><BR>
  423 +<A HREF="manual.html#lua_typename">lua_typename</A><BR>
  424 +<A HREF="manual.html#lua_upvalueindex">lua_upvalueindex</A><BR>
  425 +<A HREF="manual.html#lua_xmove">lua_xmove</A><BR>
  426 +<A HREF="manual.html#lua_yield">lua_yield</A><BR>
  427 +
  428 +</TD>
  429 +<TD>
  430 +<H3>auxiliary library</H3>
  431 +<A HREF="manual.html#luaL_Buffer">luaL_Buffer</A><BR>
  432 +<A HREF="manual.html#luaL_Reg">luaL_Reg</A><BR>
  433 +<P>
  434 +
  435 +<A HREF="manual.html#luaL_addchar">luaL_addchar</A><BR>
  436 +<A HREF="manual.html#luaL_addlstring">luaL_addlstring</A><BR>
  437 +<A HREF="manual.html#luaL_addsize">luaL_addsize</A><BR>
  438 +<A HREF="manual.html#luaL_addstring">luaL_addstring</A><BR>
  439 +<A HREF="manual.html#luaL_addvalue">luaL_addvalue</A><BR>
  440 +<A HREF="manual.html#luaL_argcheck">luaL_argcheck</A><BR>
  441 +<A HREF="manual.html#luaL_argerror">luaL_argerror</A><BR>
  442 +<A HREF="manual.html#luaL_buffinit">luaL_buffinit</A><BR>
  443 +<A HREF="manual.html#luaL_callmeta">luaL_callmeta</A><BR>
  444 +<A HREF="manual.html#luaL_checkany">luaL_checkany</A><BR>
  445 +<A HREF="manual.html#luaL_checkint">luaL_checkint</A><BR>
  446 +<A HREF="manual.html#luaL_checkinteger">luaL_checkinteger</A><BR>
  447 +<A HREF="manual.html#luaL_checklong">luaL_checklong</A><BR>
  448 +<A HREF="manual.html#luaL_checklstring">luaL_checklstring</A><BR>
  449 +<A HREF="manual.html#luaL_checknumber">luaL_checknumber</A><BR>
  450 +<A HREF="manual.html#luaL_checkoption">luaL_checkoption</A><BR>
  451 +<A HREF="manual.html#luaL_checkstack">luaL_checkstack</A><BR>
  452 +<A HREF="manual.html#luaL_checkstring">luaL_checkstring</A><BR>
  453 +<A HREF="manual.html#luaL_checktype">luaL_checktype</A><BR>
  454 +<A HREF="manual.html#luaL_checkudata">luaL_checkudata</A><BR>
  455 +<A HREF="manual.html#luaL_dofile">luaL_dofile</A><BR>
  456 +<A HREF="manual.html#luaL_dostring">luaL_dostring</A><BR>
  457 +<A HREF="manual.html#luaL_error">luaL_error</A><BR>
  458 +<A HREF="manual.html#luaL_getmetafield">luaL_getmetafield</A><BR>
  459 +<A HREF="manual.html#luaL_getmetatable">luaL_getmetatable</A><BR>
  460 +<A HREF="manual.html#luaL_gsub">luaL_gsub</A><BR>
  461 +<A HREF="manual.html#luaL_loadbuffer">luaL_loadbuffer</A><BR>
  462 +<A HREF="manual.html#luaL_loadfile">luaL_loadfile</A><BR>
  463 +<A HREF="manual.html#luaL_loadstring">luaL_loadstring</A><BR>
  464 +<A HREF="manual.html#luaL_newmetatable">luaL_newmetatable</A><BR>
  465 +<A HREF="manual.html#luaL_newstate">luaL_newstate</A><BR>
  466 +<A HREF="manual.html#luaL_openlibs">luaL_openlibs</A><BR>
  467 +<A HREF="manual.html#luaL_optint">luaL_optint</A><BR>
  468 +<A HREF="manual.html#luaL_optinteger">luaL_optinteger</A><BR>
  469 +<A HREF="manual.html#luaL_optlong">luaL_optlong</A><BR>
  470 +<A HREF="manual.html#luaL_optlstring">luaL_optlstring</A><BR>
  471 +<A HREF="manual.html#luaL_optnumber">luaL_optnumber</A><BR>
  472 +<A HREF="manual.html#luaL_optstring">luaL_optstring</A><BR>
  473 +<A HREF="manual.html#luaL_prepbuffer">luaL_prepbuffer</A><BR>
  474 +<A HREF="manual.html#luaL_pushresult">luaL_pushresult</A><BR>
  475 +<A HREF="manual.html#luaL_ref">luaL_ref</A><BR>
  476 +<A HREF="manual.html#luaL_register">luaL_register</A><BR>
  477 +<A HREF="manual.html#luaL_typename">luaL_typename</A><BR>
  478 +<A HREF="manual.html#luaL_typerror">luaL_typerror</A><BR>
  479 +<A HREF="manual.html#luaL_unref">luaL_unref</A><BR>
  480 +<A HREF="manual.html#luaL_where">luaL_where</A><BR>
  481 +
  482 +</TD>
  483 +</TR>
  484 +</TABLE>
  485 +<P>
  486 +
  487 +<HR>
  488 +<SMALL CLASS="footer">
  489 +Last update:
  490 +Mon Feb 13 18:53:32 BRST 2012
  491 +</SMALL>
  492 +<!--
  493 +Last change: revised for Lua 5.1.5
  494 +-->
  495 +
  496 +</BODY>
  497 +</HTML>
BIN  standalone/lua-5.1.5/doc/cover.png
BIN  standalone/lua-5.1.5/doc/logo.gif
163 standalone/lua-5.1.5/doc/lua.1
... ... @@ -0,0 +1,163 @@
  1 +.\" $Id: lua.man,v 1.11 2006/01/06 16:03:34 lhf Exp $
  2 +.TH LUA 1 "$Date: 2006/01/06 16:03:34 $"
  3 +.SH NAME
  4 +lua \- Lua interpreter
  5 +.SH SYNOPSIS
  6 +.B lua
  7 +[
  8 +.I options
  9 +]
  10 +[
  11 +.I script
  12 +[
  13 +.I args
  14 +]
  15 +]
  16 +.SH DESCRIPTION
  17 +.B lua
  18 +is the stand-alone Lua interpreter.
  19 +It loads and executes Lua programs,
  20 +either in textual source form or
  21 +in precompiled binary form.
  22 +(Precompiled binaries are output by
  23 +.BR luac ,
  24 +the Lua compiler.)
  25 +.B lua
  26 +can be used as a batch interpreter and also interactively.
  27 +.LP
  28 +The given
  29 +.I options
  30 +(see below)
  31 +are executed and then
  32 +the Lua program in file
  33 +.I script
  34 +is loaded and executed.
  35 +The given
  36 +.I args
  37 +are available to
  38 +.I script
  39 +as strings in a global table named
  40 +.BR arg .
  41 +If these arguments contain spaces or other characters special to the shell,
  42 +then they should be quoted
  43 +(but note that the quotes will be removed by the shell).
  44 +The arguments in
  45 +.B arg
  46 +start at 0,
  47 +which contains the string
  48 +.RI ' script '.
  49 +The index of the last argument is stored in
  50 +.BR arg.n .
  51 +The arguments given in the command line before
  52 +.IR script ,
  53 +including the name of the interpreter,
  54 +are available in negative indices in
  55 +.BR arg .
  56 +.LP
  57 +At the very start,
  58 +before even handling the command line,
  59 +.B lua
  60 +executes the contents of the environment variable
  61 +.BR LUA_INIT ,
  62 +if it is defined.
  63 +If the value of
  64 +.B LUA_INIT
  65 +is of the form
  66 +.RI '@ filename ',
  67 +then
  68 +.I filename
  69 +is executed.
  70 +Otherwise, the string is assumed to be a Lua statement and is executed.
  71 +.LP
  72 +Options start with
  73 +.B '\-'
  74 +and are described below.
  75 +You can use
  76 +.B "'\--'"
  77 +to signal the end of options.
  78 +.LP
  79 +If no arguments are given,
  80 +then
  81 +.B "\-v \-i"
  82