mirror of
https://github.com/lua/lua.git
synced 2025-01-14 05:43:00 +08:00
details
This commit is contained in:
parent
b82ff713e3
commit
bf6d2ccf92
7
lapi.c
7
lapi.c
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: lapi.c,v 1.34 1999/02/04 17:47:59 roberto Exp roberto $
|
** $Id: lapi.c,v 1.35 1999/02/08 17:07:59 roberto Exp roberto $
|
||||||
** Lua API
|
** Lua API
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@ -467,11 +467,6 @@ int lua_setdebug (int debug) {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/* Hooks */
|
|
||||||
lua_CHFunction lua_callhook = NULL;
|
|
||||||
lua_LHFunction lua_linehook = NULL;
|
|
||||||
|
|
||||||
|
|
||||||
lua_Function lua_stackedfunction (int level)
|
lua_Function lua_stackedfunction (int level)
|
||||||
{
|
{
|
||||||
StkId i;
|
StkId i;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: lbuiltin.c,v 1.49 1999/02/04 19:12:35 roberto Exp roberto $
|
** $Id: lbuiltin.c,v 1.50 1999/02/08 16:29:35 roberto Exp roberto $
|
||||||
** Built-in functions
|
** Built-in functions
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
** {======================================================
|
** {======================================================
|
||||||
** Auxliliar functions
|
** Auxiliary functions
|
||||||
** =======================================================
|
** =======================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
4
ldo.c
4
ldo.c
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: ldo.c,v 1.30 1999/01/15 11:38:33 roberto Exp roberto $
|
** $Id: ldo.c,v 1.31 1999/02/04 17:47:59 roberto Exp roberto $
|
||||||
** Stack and Call structure of Lua
|
** Stack and Call structure of Lua
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@ -136,7 +136,7 @@ static StkId callC (lua_CFunction f, StkId base)
|
|||||||
if (L->callhook)
|
if (L->callhook)
|
||||||
luaD_callHook(base, NULL, 0);
|
luaD_callHook(base, NULL, 0);
|
||||||
(*f)(); /* do the actual call */
|
(*f)(); /* do the actual call */
|
||||||
if (L->callhook) /* func may have changed lua_callhook */
|
if (L->callhook) /* func may have changed callhook */
|
||||||
luaD_callHook(base, NULL, 1);
|
luaD_callHook(base, NULL, 1);
|
||||||
firstResult = CS->base;
|
firstResult = CS->base;
|
||||||
*CS = oldCLS;
|
*CS = oldCLS;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: lobject.c,v 1.15 1999/01/04 13:37:07 roberto Exp roberto $
|
** $Id: lobject.c,v 1.16 1999/01/13 19:08:37 roberto Exp roberto $
|
||||||
** Some generic functions over Lua objects
|
** Some generic functions over Lua objects
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@ -112,7 +112,7 @@ double luaO_str2d (char *s) { /* LUA_NUMBER */
|
|||||||
s++;
|
s++;
|
||||||
sig = -1;
|
sig = -1;
|
||||||
}
|
}
|
||||||
if (!isdigit((unsigned char)*s)) return -1; /* no digit in expoent part? */
|
if (!isdigit((unsigned char)*s)) return -1; /* no digit in the exponent? */
|
||||||
do {
|
do {
|
||||||
e = 10*e + (*(s++)-'0');
|
e = 10*e + (*(s++)-'0');
|
||||||
} while (isdigit((unsigned char)*s));
|
} while (isdigit((unsigned char)*s));
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: lstrlib.c,v 1.24 1999/02/04 19:29:51 roberto Exp roberto $
|
** $Id: lstrlib.c,v 1.25 1999/02/05 11:22:58 roberto Exp roberto $
|
||||||
** Standard library for strings and pattern-matching
|
** Standard library for strings and pattern-matching
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@ -471,7 +471,7 @@ static void str_format (void) {
|
|||||||
else { /* format item */
|
else { /* format item */
|
||||||
struct Capture cap;
|
struct Capture cap;
|
||||||
char form[MAX_FORMAT]; /* to store the format ('%...') */
|
char form[MAX_FORMAT]; /* to store the format ('%...') */
|
||||||
char *buff; /* to store the formated item */
|
char *buff; /* to store the formatted item */
|
||||||
char *initf = strfrmt;
|
char *initf = strfrmt;
|
||||||
form[0] = '%';
|
form[0] = '%';
|
||||||
if (isdigit((unsigned char)*initf) && *(initf+1) == '$') {
|
if (isdigit((unsigned char)*initf) && *(initf+1) == '$') {
|
||||||
@ -505,7 +505,7 @@ static void str_format (void) {
|
|||||||
long l;
|
long l;
|
||||||
char *s = luaL_check_lstr(arg, &l);
|
char *s = luaL_check_lstr(arg, &l);
|
||||||
if (cap.capture[1].len == 0 && l >= 100) {
|
if (cap.capture[1].len == 0 && l >= 100) {
|
||||||
/* no precision and string is too big to be formated;
|
/* no precision and string is too big to be formatted;
|
||||||
keep original string */
|
keep original string */
|
||||||
addnchar(s, l);
|
addnchar(s, l);
|
||||||
continue; /* skip the "addsize" at the end */
|
continue; /* skip the "addsize" at the end */
|
||||||
|
16
manual.tex
16
manual.tex
@ -1,4 +1,4 @@
|
|||||||
% $Id: manual.tex,v 1.21 1998/11/20 15:41:43 roberto Exp roberto $
|
% $Id: manual.tex,v 1.22 1999/02/05 12:15:07 roberto Exp roberto $
|
||||||
|
|
||||||
\documentclass[11pt]{article}
|
\documentclass[11pt]{article}
|
||||||
\usepackage{fullpage,bnf}
|
\usepackage{fullpage,bnf}
|
||||||
@ -41,7 +41,7 @@ Waldemar Celes
|
|||||||
\tecgraf\ --- Computer Science Department --- PUC-Rio
|
\tecgraf\ --- Computer Science Department --- PUC-Rio
|
||||||
}
|
}
|
||||||
|
|
||||||
%\date{\small \verb$Date: 1998/11/20 15:41:43 $}
|
%\date{\small \verb$Date: 1999/02/05 12:15:07 $}
|
||||||
|
|
||||||
\maketitle
|
\maketitle
|
||||||
|
|
||||||
@ -91,7 +91,7 @@ a intera\c{c}\~ao entre programas Lua e programas C hospedeiros.
|
|||||||
\begin{quotation}
|
\begin{quotation}
|
||||||
\noindent
|
\noindent
|
||||||
\footnotesize
|
\footnotesize
|
||||||
Copyright \copyright\ 1994--1998 TeCGraf, PUC-Rio. All rights reserved.
|
Copyright \copyright\ 1994--1999 TeCGraf, PUC-Rio. All rights reserved.
|
||||||
|
|
||||||
\noindent
|
\noindent
|
||||||
Permission is hereby granted, without written agreement and without license
|
Permission is hereby granted, without written agreement and without license
|
||||||
@ -697,10 +697,11 @@ An absent else-part is equivalent to \verb|else nil|.
|
|||||||
|
|
||||||
\subsubsection{Assignment Expressions}
|
\subsubsection{Assignment Expressions}
|
||||||
\begin{Produc}
|
\begin{Produc}
|
||||||
\produc{exp}{\ter{(} var \ter{=} exp1 \ter{)}}
|
\produc{exp}{\ter{(} varlist1 \ter{=} explist1 \ter{)}}
|
||||||
\end{Produc}%
|
\end{Produc}%
|
||||||
An \Index{assignment expression} executes a regular assignment,
|
An \Index{assignment expression} executes a multiple assignment,
|
||||||
and results in the final value of its right hand expression.
|
and results in the final value of its first right hand expression
|
||||||
|
(that is, the value assigned to the first variable in the variable list).
|
||||||
|
|
||||||
\subsubsection{Table Constructors} \label{tableconstructor}
|
\subsubsection{Table Constructors} \label{tableconstructor}
|
||||||
Table \Index{constructors} are expressions that create tables;
|
Table \Index{constructors} are expressions that create tables;
|
||||||
@ -2752,7 +2753,8 @@ plus a string describing the error.
|
|||||||
|
|
||||||
\subsubsection*{\ff \T{seek (filehandle [, whence] [, offset])}}\Deffunc{seek}
|
\subsubsection*{\ff \T{seek (filehandle [, whence] [, offset])}}\Deffunc{seek}
|
||||||
|
|
||||||
Sets the file position, measured in bytes from the beginning of the file,
|
Sets and gets the file position,
|
||||||
|
measured in bytes from the beginning of the file,
|
||||||
to the position given by \verb|offset| plus a base
|
to the position given by \verb|offset| plus a base
|
||||||
specified by the string \verb|whence|, as follows:
|
specified by the string \verb|whence|, as follows:
|
||||||
\begin{description}
|
\begin{description}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user