]> git.lizzy.rs Git - metalua.git/blobdiff - doc/rings/us/manual.html
removed deprecated doc, fixes on the build (hircus contrib + readline support)
[metalua.git] / doc / rings / us / manual.html
diff --git a/doc/rings/us/manual.html b/doc/rings/us/manual.html
deleted file mode 100644 (file)
index 2190cdf..0000000
+++ /dev/null
@@ -1,251 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html>
-<head>
-    <title>Rings: Multiple Lua States</title>
-    <link rel="stylesheet" href="http://www.keplerproject.org/doc.css" type="text/css"/>
-       <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-</head>
-
-<body>
-<div id="container">
-
-<div id="product">
-       <div id="product_logo"><a href="http://www.keplerproject.org">
-               <img alt="Rings logo" src="rings.png"/>
-       </a></div>
-       <div id="product_name"><big><strong>Rings</strong></big></div>
-       <div id="product_description">Multiple Lua States</div>
-</div> <!-- id="product" -->
-
-<div id="main">
-
-<div id="navigation">
-<h1>Rings</h1>
-       <ul>
-               <li><a href="index.html">Home</a>
-                       <ul>
-                               <li><a href="index.html#overview">Overview</a></li>
-                               <li><a href="index.html#status">Status</a></li>
-                               <li><a href="index.html#download">Download</a></li>
-                               <li><a href="index.html#history">History</a></li>
-                               <li><a href="index.html#credits">Credits</a></li>
-                               <li><a href="index.html#contact">Contact us</a></li>
-                       </ul>
-               </li>
-               <li><strong>Manual</strong>
-                       <ul>
-                               <li><a href="manual.html#introduction">Introduction</a></li>
-                               <li><a href="manual.html#building">Building</a></li>
-                               <li><a href="manual.html#installation">Installation</a></li>
-                               <li><a href="manual.html#reference">Reference</a>
-                    <ul>
-                        <li><a href="manual.html#master_functions">Master functions</a></li>
-                        <li><a href="manual.html#slave_functions">Slave functions</a></li>
-                        <li><a href="manual.html#stable">Stable</a></li>
-                           </ul>
-                </li>
-                               <li><a href="manual.html#examples">Examples</a></li>
-                       </ul>
-               </li>
-        <li><a href="http://luaforge.net/projects/rings/">Project</a>
-            <ul>
-                <li><a href="http://luaforge.net/tracker/?group_id=147">Bug Tracker</a></li>
-                <li><a href="http://luaforge.net/scm/?group_id=147">CVS</a></li>
-            </ul>
-        </li>
-               <li><a href="license.html">License</a></li>
-       </ul>
-</div> <!-- id="navigation" -->
-
-<div id="content">
-
-<h2><a name="introduction"></a>Introduction</h2>
-
-<p>Rings is a library which provides a way to create new Lua states from within
-Lua. It also offers a simple way to communicate between the creator (master) and
-the created (slave) states.</p>
-
-<p>Rings is free software and uses the same <a href="license.html">license</a>
-as Lua 5.1.</p>
-
-<p>Rings also offers <a href="manual.html#stable">Stable</a>,
-a very simple API to manage a shared table at the master state.</p>
-
-
-<h2><a name="building"></a>Building</h2>
-
-<p>
-Rings version 1.1.0 is for Lua 5.1 only. In order to build it
-the language library and header files for the desired Lua version must be
-installed properly.
-</p>
-<p>
-Rings comprises a single C source file.
-The distribution provides a
-<code>Makefile</code>
-prepared to compile the library and install it.
-The file
-<code>config</code>
-should be edited to suit the particularities of the target platform
-before running
-<code>make</code>.
-This file has some definitions like paths to the external libraries,
-compiler options and the like.
-One important definition is the Lua version,
-which is not obtained from the installed software.
-</p>
-
-<h2><a name="installation"></a>Installation</h2>
-
-<p>
-The compiled binary file should be copied to a directory in your
-<a href="http://www.lua.org/manual/5.1/manual.html#pdf-package.cpath">C
-path</a>.
-</p>
-
-<p>
-Windows users can use the precompiled versions of Rings available at
-<a href="http://luaforge.net/projects/rings/files">LuaForge</a></p>
-
-<p>
-The file <code>stable.lua</code> should be copied to a directory in your
-<a href="http://www.lua.org/manual/5.1/manual.html#pdf-package.path">Lua
-path</a>.
-</p>
-
-
-<h2><a name="reference"></a>Reference</h2>
-
-<h3><a name="master_functions"></a>Master functions</h3>
-
-<p>Rings offers a single function which creates a new Lua state and returns
-an object representing it. The state which creates other states is called
-the master and the created ones are called slaves.
-The master can execute code in any of its slaves but each slave only has
-direct access to its master (or its own slaves).</p>
-
-<p>All standard Lua libraries are opened automatically in a new state;
-other libraries have to be loaded explicitly.</p>
-
-<p>The object representing a slave state has a method (<code>dostring</code>)
-which can execute Lua code in the corresponding state.
-This method can receive arguments (only numbers, strings, booleans and userdata,
-which are converted to lightuserdata) and always returns a boolean indicating
-whether the code executed correctly or not, followed by eventual return values
-or an error message.</p>
-
-<dl>
-    <dt><strong><a name="rings_new"></a>rings.new ()</strong></dt>
-    <dd>Returns a newly created Lua state.</dd>
-
-    <dt><strong><a name="rings_close"></a><em>state</em>:close ()</strong></dt>
-    <dd>Closes the state.</dd>
-
-    <dt><strong><a name="rings_dostring"></a><em>state</em>:dostring (string, ...)</strong></dt>
-    <dd>Executes a string in the slave state.
-        The arguments could be accessed exactly as in a
-        <a href="http://www.lua.org/manual/5.1/manual.html#2.5.9">vararg
-        function</a>:
-        in Lua 5.0, they are stored into the <code>arg</code> table;
-        in Lua 5.1, the expression <code>...</code> represents all arguments.
-        Valid types of arguments and return values are:
-        number, string, boolean, nil and userdata (which are converted
-        to lightuserdata).
-        <br />
-        Returns a boolean indicating the status of the operation,
-        followed by the returned values or an error message in case of error.
-    </dd>
-</dl>
-
-<h3><a name="slave_functions"></a>Slave function</h3>
-
-<p>The following function is registered in the newly created slave state.</p>
-
-<dl>
-    
-    <dt><strong><a name="rings_remotedostring"></a>remotedostring (string, ...)</strong></dt>
-    <dd>Executes a string in the master state.
-        Behaves exactly as the method <a href="#rings_dostring">dostring</a>
-        except that it acts in the master state.
-    </dd>
-</dl>
-
-<h3><a name="stable"></a>Stable</h3>
-
-<p>Stable is a simple API which provides a way for a slave state to store
-and retrieve data to and from its master state.
-This library is not opened automatically in a slave state.</p>
-
-<dl>
-    
-    <dt><strong><a name="stable_get"></a>stable.get (key)</strong></dt>
-    <dd>Returns the value of a given <em>key</em>.</dd>
-
-    <dt><strong><a name="stable_set"></a>stable.set (key, value)</strong></dt>
-    <dd>Stores a <em>value</em> associated to a <em>key</em>.
-        Returns nothing.</dd>
-
-</dl>
-
-
-<h2><a name="examples"></a>Examples</h2>
-
-<p>The following sample shows how to execute code in another state passing
-arguments and returning values:</p>
-
-<pre class="example">
-require"rings"
-S = rings.new ()
-
-data = { 12, 13, 14, }
-print (S:dostring ([[
-aux = {}
-for i, v in ipairs (arg) do
-       table.insert (aux, 1, v)
-end
-return unpack (aux)]], unpack (data))) -- true, 14, 13, 12
-
-S:close ()
-</pre>
-
-<p>The following example uses Stable to store a value in the master state:</p>
-
-<pre class="example">
-require"rings"
-
-local init_cmd = [[
-require"stable"]]
-
-local count_cmd = [[
-count = stable.get"shared_counter" or 0
-stable.set ("shared_counter", count + 1)
-return count
-]]
-
-S = rings.new () -- new state
-assert(S:dostring (init_cmd))
-print (S:dostring (count_cmd)) -- true, 0
-print (S:dostring (count_cmd)) -- true, 1
-S:close ()
-
-S = rings.new () -- another new state
-assert (S:dostring (init_cmd))
-print (S:dostring (count_cmd)) -- true, 2
-S:close ()
-</pre>
-
-</div> <!-- id="content" -->
-
-</div> <!-- id="main" -->
-
-<div id="about">
-       <p><a href="http://validator.w3.org/check?uri=referer">
-    <img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
-       <p><small>$Id: manual.html,v 1.14 2007/06/11 23:36:37 carregal Exp $</small></p>
-</div> <!-- id="about" -->
-
-</div> <!-- id="container" -->
-
-</body>
-</html>