diff options
author | Lua Team <team@lua.org> | 2015-02-26 12:00:00 +0000 |
---|---|---|
committer | repogen <> | 2015-02-26 12:00:00 +0000 |
commit | 4fd8751bd02b0618b975504491e2221ced98c8d4 (patch) | |
tree | ce972c3b21c96d9e7dfa59a4745e4fa0e6a18168 /doc | |
parent | 357e7cdc32cd4224b03748e4f284857e47f70a68 (diff) | |
download | lua-github-5.2.x.tar.gz |
Diffstat (limited to 'doc')
-rw-r--r-- | doc/contents.html | 103 | ||||
-rw-r--r-- | doc/lua.css | 14 | ||||
-rw-r--r-- | doc/manual.html | 27 | ||||
-rw-r--r-- | doc/readme.html | 32 |
4 files changed, 133 insertions, 43 deletions
diff --git a/doc/contents.html b/doc/contents.html index 0ce297da..9d5202fa 100644 --- a/doc/contents.html +++ b/doc/contents.html @@ -7,7 +7,6 @@ <STYLE TYPE="text/css"> ul { list-style-type: none ; - list-style-position: outside ; } </STYLE> </HEAD> @@ -33,7 +32,7 @@ For a complete introduction to Lua programming, see the book <A HREF="#index">index</A> <HR> <SMALL> -Copyright © 2011–2013 Lua.org, PUC-Rio. +Copyright © 2011–2015 Lua.org, PUC-Rio. Freely available under the terms of the <A HREF="http://www.lua.org/license.html">Lua license</A>. </SMALL> @@ -139,10 +138,10 @@ Freely available under the terms of the <TD> <H3><A NAME="functions">Lua functions</A></H3> <P> +<A HREF="manual.html#6.1">basic</A><BR> <A HREF="manual.html#pdf-_G">_G</A><BR> <A HREF="manual.html#pdf-_VERSION">_VERSION</A><BR> -<P> <A HREF="manual.html#pdf-assert">assert</A><BR> <A HREF="manual.html#pdf-collectgarbage">collectgarbage</A><BR> <A HREF="manual.html#pdf-dofile">dofile</A><BR> @@ -168,6 +167,7 @@ Freely available under the terms of the <A HREF="manual.html#pdf-xpcall">xpcall</A><BR> <P> +<A HREF="manual.html#6.7">bit32</A><BR> <A HREF="manual.html#pdf-bit32.arshift">bit32.arshift</A><BR> <A HREF="manual.html#pdf-bit32.band">bit32.band</A><BR> <A HREF="manual.html#pdf-bit32.bnot">bit32.bnot</A><BR> @@ -182,6 +182,7 @@ Freely available under the terms of the <A HREF="manual.html#pdf-bit32.rshift">bit32.rshift</A><BR> <P> +<A HREF="manual.html#6.2">coroutine</A><BR> <A HREF="manual.html#pdf-coroutine.create">coroutine.create</A><BR> <A HREF="manual.html#pdf-coroutine.resume">coroutine.resume</A><BR> <A HREF="manual.html#pdf-coroutine.running">coroutine.running</A><BR> @@ -190,6 +191,7 @@ Freely available under the terms of the <A HREF="manual.html#pdf-coroutine.yield">coroutine.yield</A><BR> <P> +<A HREF="manual.html#6.10">debug</A><BR> <A HREF="manual.html#pdf-debug.debug">debug.debug</A><BR> <A HREF="manual.html#pdf-debug.getuservalue">debug.getuservalue</A><BR> <A HREF="manual.html#pdf-debug.gethook">debug.gethook</A><BR> @@ -208,15 +210,7 @@ Freely available under the terms of the <A HREF="manual.html#pdf-debug.upvaluejoin">debug.upvaluejoin</A><BR> <P> -<A HREF="manual.html#pdf-file:close">file:close</A><BR> -<A HREF="manual.html#pdf-file:flush">file:flush</A><BR> -<A HREF="manual.html#pdf-file:lines">file:lines</A><BR> -<A HREF="manual.html#pdf-file:read">file:read</A><BR> -<A HREF="manual.html#pdf-file:seek">file:seek</A><BR> -<A HREF="manual.html#pdf-file:setvbuf">file:setvbuf</A><BR> -<A HREF="manual.html#pdf-file:write">file:write</A><BR> - -<P> +<A HREF="manual.html#6.8">io</A><BR> <A HREF="manual.html#pdf-io.close">io.close</A><BR> <A HREF="manual.html#pdf-io.flush">io.flush</A><BR> <A HREF="manual.html#pdf-io.input">io.input</A><BR> @@ -231,11 +225,19 @@ Freely available under the terms of the <A HREF="manual.html#pdf-io.tmpfile">io.tmpfile</A><BR> <A HREF="manual.html#pdf-io.type">io.type</A><BR> <A HREF="manual.html#pdf-io.write">io.write</A><BR> +<A HREF="manual.html#pdf-file:close">file:close</A><BR> +<A HREF="manual.html#pdf-file:flush">file:flush</A><BR> +<A HREF="manual.html#pdf-file:lines">file:lines</A><BR> +<A HREF="manual.html#pdf-file:read">file:read</A><BR> +<A HREF="manual.html#pdf-file:seek">file:seek</A><BR> +<A HREF="manual.html#pdf-file:setvbuf">file:setvbuf</A><BR> +<A HREF="manual.html#pdf-file:write">file:write</A><BR> </TD> <TD> <H3> </H3> <P> +<A HREF="manual.html#6.6">math</A><BR> <A HREF="manual.html#pdf-math.abs">math.abs</A><BR> <A HREF="manual.html#pdf-math.acos">math.acos</A><BR> <A HREF="manual.html#pdf-math.asin">math.asin</A><BR> @@ -267,6 +269,7 @@ Freely available under the terms of the <A HREF="manual.html#pdf-math.tanh">math.tanh</A><BR> <P> +<A HREF="manual.html#6.9">os</A><BR> <A HREF="manual.html#pdf-os.clock">os.clock</A><BR> <A HREF="manual.html#pdf-os.date">os.date</A><BR> <A HREF="manual.html#pdf-os.difftime">os.difftime</A><BR> @@ -280,6 +283,7 @@ Freely available under the terms of the <A HREF="manual.html#pdf-os.tmpname">os.tmpname</A><BR> <P> +<A HREF="manual.html#6.3">package</A><BR> <A HREF="manual.html#pdf-package.config">package.config</A><BR> <A HREF="manual.html#pdf-package.cpath">package.cpath</A><BR> <A HREF="manual.html#pdf-package.loaded">package.loaded</A><BR> @@ -290,6 +294,7 @@ Freely available under the terms of the <A HREF="manual.html#pdf-package.searchpath">package.searchpath</A><BR> <P> +<A HREF="manual.html#6.4">string</A><BR> <A HREF="manual.html#pdf-string.byte">string.byte</A><BR> <A HREF="manual.html#pdf-string.char">string.char</A><BR> <A HREF="manual.html#pdf-string.dump">string.dump</A><BR> @@ -306,6 +311,7 @@ Freely available under the terms of the <A HREF="manual.html#pdf-string.upper">string.upper</A><BR> <P> +<A HREF="manual.html#6.5">table</A><BR> <A HREF="manual.html#pdf-table.concat">table.concat</A><BR> <A HREF="manual.html#pdf-table.insert">table.insert</A><BR> <A HREF="manual.html#pdf-table.pack">table.pack</A><BR> @@ -313,6 +319,14 @@ Freely available under the terms of the <A HREF="manual.html#pdf-table.sort">table.sort</A><BR> <A HREF="manual.html#pdf-table.unpack">table.unpack</A><BR> +<H3><A NAME="env">environment<BR>variables</A></H3> +<A HREF="manual.html#pdf-LUA_CPATH">LUA_CPATH</A><BR> +<A HREF="manual.html#pdf-LUA_CPATH_5_2">LUA_CPATH_5_2</A><BR> +<A HREF="manual.html#pdf-LUA_INIT">LUA_INIT</A><BR> +<A HREF="manual.html#pdf-LUA_INIT_5_2">LUA_INIT_5_2</A><BR> +<A HREF="manual.html#pdf-LUA_PATH">LUA_PATH</A><BR> +<A HREF="manual.html#pdf-LUA_PATH_5_2">LUA_PATH_5_2</A><BR> + </TD> <TD> <H3>C API</H3> @@ -516,6 +530,67 @@ Freely available under the terms of the <A HREF="manual.html#luaL_unref">luaL_unref</A><BR> <A HREF="manual.html#luaL_where">luaL_where</A><BR> +<H3><A NAME="library">standard library</A></H3> +<P> +<A HREF="manual.html#pdf-luaopen_base">luaopen_base</A><BR> +<A HREF="manual.html#pdf-luaopen_bit32">luaopen_bit32</A><BR> +<A HREF="manual.html#pdf-luaopen_coroutine">luaopen_coroutine</A><BR> +<A HREF="manual.html#pdf-luaopen_debug">luaopen_debug</A><BR> +<A HREF="manual.html#pdf-luaopen_io">luaopen_io</A><BR> +<A HREF="manual.html#pdf-luaopen_math">luaopen_math</A><BR> +<A HREF="manual.html#pdf-luaopen_os">luaopen_os</A><BR> +<A HREF="manual.html#pdf-luaopen_package">luaopen_package</A><BR> +<A HREF="manual.html#pdf-luaopen_string">luaopen_string</A><BR> +<A HREF="manual.html#pdf-luaopen_table">luaopen_table</A><BR> + +<H3><A NAME="constants">constants</A></H3> +<A HREF="manual.html#pdf-LUA_ERRERR">LUA_ERRERR</A><BR> +<A HREF="manual.html#pdf-LUA_ERRFILE">LUA_ERRFILE</A><BR> +<A HREF="manual.html#pdf-LUA_ERRGCMM">LUA_ERRGCMM</A><BR> +<A HREF="manual.html#pdf-LUA_ERRMEM">LUA_ERRMEM</A><BR> +<A HREF="manual.html#pdf-LUA_ERRRUN">LUA_ERRRUN</A><BR> +<A HREF="manual.html#pdf-LUA_ERRSYNTAX">LUA_ERRSYNTAX</A><BR> +<A HREF="manual.html#pdf-LUA_HOOKCALL">LUA_HOOKCALL</A><BR> +<A HREF="manual.html#pdf-LUA_HOOKCOUNT">LUA_HOOKCOUNT</A><BR> +<A HREF="manual.html#pdf-LUA_HOOKLINE">LUA_HOOKLINE</A><BR> +<A HREF="manual.html#pdf-LUA_HOOKRET">LUA_HOOKRET</A><BR> +<A HREF="manual.html#pdf-LUA_HOOKTAILCALL">LUA_HOOKTAILCALL</A><BR> +<A HREF="manual.html#pdf-LUA_MASKCALL">LUA_MASKCALL</A><BR> +<A HREF="manual.html#pdf-LUA_MASKCOUNT">LUA_MASKCOUNT</A><BR> +<A HREF="manual.html#pdf-LUA_MASKLINE">LUA_MASKLINE</A><BR> +<A HREF="manual.html#pdf-LUA_MASKRET">LUA_MASKRET</A><BR> +<A HREF="manual.html#pdf-LUA_MINSTACK">LUA_MINSTACK</A><BR> +<A HREF="manual.html#pdf-LUA_MULTRET">LUA_MULTRET</A><BR> +<A HREF="manual.html#pdf-LUA_NOREF">LUA_NOREF</A><BR> +<A HREF="manual.html#pdf-LUA_OK">LUA_OK</A><BR> +<A HREF="manual.html#pdf-LUA_OPADD">LUA_OPADD</A><BR> +<A HREF="manual.html#pdf-LUA_OPDIV">LUA_OPDIV</A><BR> +<A HREF="manual.html#pdf-LUA_OPEQ">LUA_OPEQ</A><BR> +<A HREF="manual.html#pdf-LUA_OPLE">LUA_OPLE</A><BR> +<A HREF="manual.html#pdf-LUA_OPLT">LUA_OPLT</A><BR> +<A HREF="manual.html#pdf-LUA_OPMOD">LUA_OPMOD</A><BR> +<A HREF="manual.html#pdf-LUA_OPMUL">LUA_OPMUL</A><BR> +<A HREF="manual.html#pdf-LUA_OPPOW">LUA_OPPOW</A><BR> +<A HREF="manual.html#pdf-LUA_OPSUB">LUA_OPSUB</A><BR> +<A HREF="manual.html#pdf-LUA_OPUNM">LUA_OPUNM</A><BR> +<A HREF="manual.html#pdf-LUA_REFNIL">LUA_REFNIL</A><BR> +<A HREF="manual.html#pdf-LUA_REGISTRYINDEX">LUA_REGISTRYINDEX</A><BR> +<A HREF="manual.html#pdf-LUA_RIDX_GLOBALS">LUA_RIDX_GLOBALS</A><BR> +<A HREF="manual.html#pdf-LUA_RIDX_MAINTHREAD">LUA_RIDX_MAINTHREAD</A><BR> +<A HREF="manual.html#pdf-LUA_TBOOLEAN">LUA_TBOOLEAN</A><BR> +<A HREF="manual.html#pdf-LUA_TFUNCTION">LUA_TFUNCTION</A><BR> +<A HREF="manual.html#pdf-LUA_TLIGHTUSERDATA">LUA_TLIGHTUSERDATA</A><BR> +<A HREF="manual.html#pdf-LUA_TNIL">LUA_TNIL</A><BR> +<A HREF="manual.html#pdf-LUA_TNONE">LUA_TNONE</A><BR> +<A HREF="manual.html#pdf-LUA_TNUMBER">LUA_TNUMBER</A><BR> +<A HREF="manual.html#pdf-LUA_TSTRING">LUA_TSTRING</A><BR> +<A HREF="manual.html#pdf-LUA_TTABLE">LUA_TTABLE</A><BR> +<A HREF="manual.html#pdf-LUA_TTHREAD">LUA_TTHREAD</A><BR> +<A HREF="manual.html#pdf-LUA_TUSERDATA">LUA_TUSERDATA</A><BR> +<A HREF="manual.html#pdf-LUA_USE_APICHECK">LUA_USE_APICHECK</A><BR> +<A HREF="manual.html#pdf-LUA_YIELD">LUA_YIELD</A><BR> +<A HREF="manual.html#pdf-LUAL_BUFFERSIZE">LUAL_BUFFERSIZE</A><BR> + </TD> </TR> </TABLE> @@ -523,10 +598,10 @@ Freely available under the terms of the <HR> <SMALL CLASS="footer"> Last update: -Tue Mar 12 11:22:18 BRT 2013 +Mon Feb 23 22:24:36 BRT 2015 </SMALL> <!-- -Last change: revised for Lua 5.2.2 +Last change: revised for Lua 5.2.4 --> </BODY> diff --git a/doc/lua.css b/doc/lua.css index 3d2443ac..5dc9a8b9 100644 --- a/doc/lua.css +++ b/doc/lua.css @@ -11,6 +11,7 @@ body { background-color: #FFFFFF ; font-family: Helvetica, Arial, sans-serif ; text-align: justify ; + line-height: 1.25 ; } h1, h2, h3, h4 { @@ -53,12 +54,17 @@ a:visited { a:link:hover, a:visited:hover { color: #000080 ; background-color: #D0D0FF ; + border-radius: 4px ; } a:link:active, a:visited:active { color: #FF0000 ; } +h1 a img { + vertical-align: text-bottom ; +} + hr { border: 0 ; height: 1px ; @@ -86,11 +92,15 @@ table hr { input[type=text] { border: solid #a0a0a0 2px ; border-radius: 2em ; - -moz-border-radius: 2em ; background-image: url('images/search.png') ; - background-repeat: no-repeat; + background-repeat: no-repeat ; background-position: 4px center ; padding-left: 20px ; height: 2em ; } +pre.session { + background-color: #F8F8F8 ; + padding: 1em ; + border-radius: 8px ; +} diff --git a/doc/manual.html b/doc/manual.html index 85365363..0a95e9e0 100644 --- a/doc/manual.html +++ b/doc/manual.html @@ -19,7 +19,7 @@ Lua 5.2 Reference Manual by Roberto Ierusalimschy, Luiz Henrique de Figueiredo, Waldemar Celes <p> <small> -Copyright © 2011–2013 Lua.org, PUC-Rio. +Copyright © 2011–2015 Lua.org, PUC-Rio. Freely available under the terms of the <a href="http://www.lua.org/license.html">Lua license</a>. </small> @@ -33,7 +33,7 @@ Freely available under the terms of the <!-- ====================================================================== --> <p> -<!-- $Id: manual.of,v 1.103 2013/03/14 18:51:56 roberto Exp $ --> +<!-- $Id: manual.of,v 1.104 2013/06/01 00:13:11 roberto Exp $ --> @@ -2088,7 +2088,7 @@ the length of a table <code>t</code> is only defined if the table is a <em>sequence</em>, that is, the set of its positive numeric keys is equal to <em>{1..n}</em> -for some integer <em>n</em>. +for some non-negative integer <em>n</em>. In that case, <em>n</em> is its length. Note that a table like @@ -4065,7 +4065,7 @@ Note that <code>f</code> is used twice. <p> Pushes onto the stack a formatted string and returns a pointer to this string. -It is similar to the ANSI C function <code>sprintf</code>, +It is similar to the ISO C function <code>sprintf</code>, but has some important differences: <ul> @@ -7906,7 +7906,7 @@ after the two indices. <p> Returns a formatted version of its variable number of arguments following the description given in its first argument (which must be a string). -The format string follows the same rules as the ANSI C function <code>sprintf</code>. +The format string follows the same rules as the ISO C function <code>sprintf</code>. The only differences are that the options/modifiers <code>*</code>, <code>h</code>, <code>L</code>, <code>l</code>, <code>n</code>, and <code>p</code> are not supported @@ -9486,7 +9486,7 @@ if the information is not available. <p> If <code>format</code> is not "<code>*t</code>", then <code>date</code> returns the date as a string, -formatted according to the same rules as the ANSI C function <code>strftime</code>. +formatted according to the same rules as the ISO C function <code>strftime</code>. <p> @@ -9521,7 +9521,7 @@ this value is exactly <code>t2</code><em>-</em><code>t1</code>. <p> -This function is equivalent to the ANSI C function <code>system</code>. +This function is equivalent to the ISO C function <code>system</code>. It passes <code>command</code> to be executed by an operating system shell. Its first result is <b>true</b> if the command terminated successfully, @@ -9556,7 +9556,7 @@ When called without a <code>command</code>, <p> -Calls the ANSI C function <code>exit</code> to terminate the host program. +Calls the ISO C function <code>exit</code> to terminate the host program. If <code>code</code> is <b>true</b>, the returned status is <code>EXIT_SUCCESS</code>; if <code>code</code> is <b>false</b>, @@ -9893,7 +9893,7 @@ returns <b>nil</b>. Sets the given function as a hook. The string <code>mask</code> and the number <code>count</code> describe when the hook will be called. -The string mask may have the following characters, +The string mask may have any combination of the following characters, with the given meaning: <ul> @@ -9901,8 +9901,9 @@ with the given meaning: <li><b>'<code>r</code>': </b> the hook is called every time Lua returns from a function;</li> <li><b>'<code>l</code>': </b> the hook is called every time Lua enters a new line of code.</li> </ul><p> -With a <code>count</code> different from zero, -the hook is called after every <code>count</code> instructions. +Moreover, +with a <code>count</code> different from zero, +the hook is called also after every <code>count</code> instructions. <p> @@ -10497,10 +10498,10 @@ Here is the complete syntax of Lua in extended BNF. <HR> <SMALL CLASS="footer"> Last update: -Thu Mar 21 12:58:59 BRT 2013 +Mon Feb 23 22:24:44 BRT 2015 </SMALL> <!-- -Last change: revised for Lua 5.2.2 +Last change: revised for Lua 5.2.4 --> </body></html> diff --git a/doc/readme.html b/doc/readme.html index 8acec874..a4ee9919 100644 --- a/doc/readme.html +++ b/doc/readme.html @@ -98,8 +98,8 @@ If you don't have the time or the inclination to compile Lua yourself, get a binary from <A HREF="http://lua-users.org/wiki/LuaBinaries">LuaBinaries</A>. Try also -<A HREF="http://luaforwindows.luaforge.net/">Lua for Windows</A>, -an easy-to-use distribution of Lua that includes many useful libraries. +<A HREF="http://luadist.org/">LuaDist</A>, +a multi-platform distribution of Lua that includes batteries. <H3>Building Lua</H3> @@ -110,8 +110,8 @@ Here are the details. <OL> <LI> Open a terminal window and move to -the top-level directory, which is named <TT>lua-5.2.3</TT>. -The Makefile there controls both the build process and the installation process. +the top-level directory, which is named <TT>lua-5.2.x</TT>. +The <TT>Makefile</TT> there controls both the build process and the installation process. <P> <LI> Do "<KBD>make</KBD>" and see if your platform is listed. @@ -136,11 +136,12 @@ and liblua.a (the library). <P> <LI> To check that Lua has been built correctly, do "<KBD>make test</KBD>" - after building Lua. This will run the interpreter and print its version string. + after building Lua. This will run the interpreter and print its version. </OL> <P> If you're running Linux and get compilation errors, -make sure you have installed the <TT>readline</TT> development package. +make sure you have installed the <TT>readline</TT> development package +(which is probably named <TT>libreadline-dev</TT> or <TT>readline-devel</TT>). If you get link errors after that, then try "<KBD>make linux MYLIBS=-ltermcap</KBD>". @@ -148,7 +149,7 @@ then try "<KBD>make linux MYLIBS=-ltermcap</KBD>". <P> Once you have built Lua, you may want to install it in an official place in your system. In this case, do "<KBD>make install</KBD>". The official - place and the way to install files are defined in the Makefile. You'll + place and the way to install files are defined in the <TT>Makefile</TT>. You'll probably need the right permissions to install files. <P> @@ -158,11 +159,13 @@ then try "<KBD>make linux MYLIBS=-ltermcap</KBD>". <P> To install Lua locally, do "<KBD>make local</KBD>". This will create a directory <TT>install</TT> with subdirectories - <TT>bin</TT>, <TT>include</TT>, <TT>lib</TT>, <TT>man</TT>, + <TT>bin</TT>, <TT>include</TT>, <TT>lib</TT>, <TT>man</TT>, <TT>share</TT>, and install Lua as listed below. To install Lua locally, but in some other directory, do "<KBD>make install INSTALL_TOP=xxx</KBD>", where xxx is your chosen directory. + The installation starts in the <TT>src</TT> and <TT>doc</TT> directories, + so take care if <TT>INSTALL_TOP</TT> is not an absolute path. <DL CLASS="display"> <DT> @@ -186,8 +189,8 @@ then try "<KBD>make linux MYLIBS=-ltermcap</KBD>". <P> These are the only directories you need for development. If you only want to run Lua programs, - you only need the files in bin and man. - The files in include and lib are needed for + you only need the files in <TT>bin</TT> and <TT>man</TT>. + The files in <TT>include</TT> and <TT>lib</TT> are needed for embedding Lua in C or C++ programs. <H3><A NAME="customization">Customization</A></H3> @@ -203,7 +206,7 @@ then try "<KBD>make linux MYLIBS=-ltermcap</KBD>". You don't actually need to edit the Makefiles because you may set the relevant variables in the command line when invoking make. Nevertheless, it's probably best to edit and save the Makefiles to - record the changes you need. + record the changes you've made. <P> On the other hand, if you need to customize some Lua features, you'll need @@ -254,6 +257,7 @@ compiler: be linked statically into the host program and its symbols exported for dynamic linking; <TT>src/Makefile</TT> does this for the Lua interpreter. For Windows, we recommend that the Lua library be a DLL. + In all cases, the compiler luac should be linked statically. <P> As mentioned above, you may edit <TT>src/luaconf.h</TT> to customize @@ -375,7 +379,7 @@ For details, see <A HREF="http://www.lua.org/license.html">this</A>. <BLOCKQUOTE STYLE="padding-bottom: 0em"> -Copyright © 1994–2013 Lua.org, PUC-Rio. +Copyright © 1994–2015 Lua.org, PUC-Rio. <P> Permission is hereby granted, free of charge, to any person obtaining a copy @@ -403,10 +407,10 @@ THE SOFTWARE. <HR> <SMALL CLASS="footer"> Last update: -Sat Nov 9 22:39:16 BRST 2013 +Mon Feb 23 22:25:08 BRT 2015 </SMALL> <!-- -Last change: revised for Lua 5.2.3 +Last change: revised for Lua 5.2.4 --> </BODY> |