no more "lua_Reference"; new return value for "append";

documentation of "exit" (it was not in the manual).
This commit is contained in:
Roberto Ierusalimschy 1996-04-29 15:50:08 -03:00
parent bced00ab9e
commit 4fb77c4308
1 changed files with 17 additions and 22 deletions

View File

@ -1,4 +1,4 @@
% $Id: manual.tex,v 1.15 1996/04/01 14:36:35 roberto Exp roberto $ % $Id: manual.tex,v 1.16 1996/04/22 18:00:37 roberto Exp roberto $
\documentstyle[fullpage,11pt,bnf]{article} \documentstyle[fullpage,11pt,bnf]{article}
@ -34,7 +34,7 @@ Waldemar Celes Filho
\tecgraf\ --- Departamento de Inform\'atica --- PUC-Rio \tecgraf\ --- Departamento de Inform\'atica --- PUC-Rio
} }
\date{\small \verb$Date: 1996/04/01 14:36:35 $} \date{\small \verb$Date: 1996/04/22 18:00:37 $}
\maketitle \maketitle
@ -1079,12 +1079,10 @@ The routines to manipulate references are the following:
\Deffunc{lua_ref}\Deffunc{lua_getref} \Deffunc{lua_ref}\Deffunc{lua_getref}
\Deffunc{lua_pushref}\Deffunc{lua_unref} \Deffunc{lua_pushref}\Deffunc{lua_unref}
\begin{verbatim} \begin{verbatim}
typedef int lua_Reference; int lua_ref (int lock);
lua_Object lua_getref (int ref);
lua_Reference lua_ref (int lock); void lua_pushref (int ref);
lua_Object lua_getref (lua_Reference ref); void lua_unref (int ref);
void lua_pushref (lua_Reference ref);
void lua_unref (lua_Reference ref);
\end{verbatim} \end{verbatim}
The function \verb'lua_ref' creates a reference The function \verb'lua_ref' creates a reference
to the object which is on the top of the stack, to the object which is on the top of the stack,
@ -1122,7 +1120,7 @@ Currently there are three standard libraries:
\begin{itemize} \begin{itemize}
\item string manipulation; \item string manipulation;
\item mathematical functions (sin, cos, etc); \item mathematical functions (sin, cos, etc);
\item input and output. \item input and output (plus some system facilities).
\end{itemize} \end{itemize}
In order to have access to these libraries, In order to have access to these libraries,
the host program must call the functions the host program must call the functions
@ -1382,8 +1380,6 @@ This function opens a file named \verb'filename' and sets it as the
{\em current} output file. {\em current} output file.
Unlike the \verb'writeto' operation, Unlike the \verb'writeto' operation,
this function does not erase any previous content of the file. this function does not erase any previous content of the file.
This function returns 2 if the file already exists,
1 if it creates a new file, and \nil\ on failure.
\subsubsection*{{\tt remove (filename)}}\Deffunc{remove} \subsubsection*{{\tt remove (filename)}}\Deffunc{remove}
@ -1484,15 +1480,11 @@ it returns a reasonable date and time representation.
This function replaces functions \verb'date' and \verb'time' from This function replaces functions \verb'date' and \verb'time' from
previous Lua versions. previous Lua versions.
\subsubsection*{{\tt exit ([code])}}\Deffunc{exit}
% \subsubsection*{{\tt debug ()}} This function calls the C function \verb-exit-,
% This function, when called, repeatedly presents a prompt \verb'lua_debug> ' with an optional \verb-code-,
% in the error output stream (\verb'stderr'), to terminate the program.
% reads a line from the standard input,
% and executes (``dostring'') the line.
% The loop ends when the user types \verb'cont' to the prompt.
% This function then returns and the execution of the program continues.
\section{The Debuger Interface} \label{debugI} \section{The Debuger Interface} \label{debugI}
@ -1850,8 +1842,8 @@ as illustrated in Figure~\ref{Cinher}.
\begin{verbatim} \begin{verbatim}
#include "lua.h" #include "lua.h"
lua_Reference lockedParentName; /* lock index for the string "parent" */ int lockedParentName; /* lock index for the string "parent" */
lua_Reference lockedOldIndex; /* previous fallback function */ int lockedOldIndex; /* previous fallback function */
void callOldFallback (lua_Object table, lua_Object index) void callOldFallback (lua_Object table, lua_Object index)
{ {
@ -2090,10 +2082,13 @@ Here is a list of all these differences.
Functions \verb'date' and \verb'time' (from \verb'iolib') Functions \verb'date' and \verb'time' (from \verb'iolib')
have been superseded by the new version of function \verb'date'. have been superseded by the new version of function \verb'date'.
\item \item
Function \verb'append' (from \verb'iolib') now returns 1 whenever it succeeds,
whether the file is new or not.
\item
Function \verb'int2str' (from \verb'strlib') has been superseded by new Function \verb'int2str' (from \verb'strlib') has been superseded by new
function \verb'format', with parameter \verb'"%c"'. function \verb'format', with parameter \verb'"%c"'.
\item \item
The lock mechanism has been superseded by the reference mechanism. The API lock mechanism has been superseded by the reference mechanism.
However, \verb-lua.h- provides compatibility macros, However, \verb-lua.h- provides compatibility macros,
so there is no need to change programs. so there is no need to change programs.
\item \item