mirror of
https://github.com/lua/lua
synced 2024-12-24 19:36:50 +03:00
detail (cleaning trailing spaces)
This commit is contained in:
parent
7106c491dd
commit
c4ea0c3b29
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: lbaselib.c,v 1.257 2010/12/27 18:00:38 roberto Exp roberto $
|
** $Id: lbaselib.c,v 1.258 2011/01/07 12:41:48 roberto Exp roberto $
|
||||||
** Basic library
|
** Basic library
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@ -135,7 +135,7 @@ static int luaB_rawequal (lua_State *L) {
|
|||||||
|
|
||||||
static int luaB_rawlen (lua_State *L) {
|
static int luaB_rawlen (lua_State *L) {
|
||||||
int t = lua_type(L, 1);
|
int t = lua_type(L, 1);
|
||||||
luaL_argcheck(L, t == LUA_TTABLE || t == LUA_TSTRING, 1,
|
luaL_argcheck(L, t == LUA_TTABLE || t == LUA_TSTRING, 1,
|
||||||
"table or string expected");
|
"table or string expected");
|
||||||
lua_pushinteger(L, lua_rawlen(L, 1));
|
lua_pushinteger(L, lua_rawlen(L, 1));
|
||||||
return 1;
|
return 1;
|
||||||
|
4
ldblib.c
4
ldblib.c
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: ldblib.c,v 1.127 2010/12/20 17:24:15 roberto Exp roberto $
|
** $Id: ldblib.c,v 1.128 2011/01/10 15:51:19 roberto Exp roberto $
|
||||||
** Interface from Lua to its debug API
|
** Interface from Lua to its debug API
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@ -253,7 +253,7 @@ static int db_upvaluejoin (lua_State *L) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#define gethooktable(L) luaL_findtable(L, LUA_REGISTRYINDEX, HOOKKEY);
|
#define gethooktable(L) luaL_findtable(L, LUA_REGISTRYINDEX, HOOKKEY);
|
||||||
|
|
||||||
|
|
||||||
static void hookf (lua_State *L, lua_Debug *ar) {
|
static void hookf (lua_State *L, lua_Debug *ar) {
|
||||||
|
6
ldebug.c
6
ldebug.c
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: ldebug.c,v 2.74 2010/10/11 20:24:42 roberto Exp roberto $
|
** $Id: ldebug.c,v 2.75 2010/11/30 17:17:51 roberto Exp roberto $
|
||||||
** Debug Interface
|
** Debug Interface
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@ -325,7 +325,7 @@ static const char *getobjname (lua_State *L, CallInfo *ci, int reg,
|
|||||||
if (reg == a) {
|
if (reg == a) {
|
||||||
int k = GETARG_C(i); /* key index */
|
int k = GETARG_C(i); /* key index */
|
||||||
int t = GETARG_B(i);
|
int t = GETARG_B(i);
|
||||||
const char *vn = (op == OP_GETTABLE) /* name of indexed variable */
|
const char *vn = (op == OP_GETTABLE) /* name of indexed variable */
|
||||||
? luaF_getlocalname(p, t + 1, pc)
|
? luaF_getlocalname(p, t + 1, pc)
|
||||||
: getstr(p->upvalues[t].name);
|
: getstr(p->upvalues[t].name);
|
||||||
kname(p, k, a, what, name);
|
kname(p, k, a, what, name);
|
||||||
@ -468,7 +468,7 @@ void luaG_typeerror (lua_State *L, const TValue *o, const char *op) {
|
|||||||
const char *kind = NULL;
|
const char *kind = NULL;
|
||||||
if (isLua(ci)) {
|
if (isLua(ci)) {
|
||||||
kind = getupvalname(ci, o, &name); /* check whether 'o' is an upvalue */
|
kind = getupvalname(ci, o, &name); /* check whether 'o' is an upvalue */
|
||||||
if (!kind && isinstack(ci, o)) /* no? try a register */
|
if (!kind && isinstack(ci, o)) /* no? try a register */
|
||||||
kind = getobjname(L, ci, cast_int(o - ci->u.l.base), &name);
|
kind = getobjname(L, ci, cast_int(o - ci->u.l.base), &name);
|
||||||
}
|
}
|
||||||
if (kind)
|
if (kind)
|
||||||
|
4
lgc.h
4
lgc.h
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: lgc.h,v 2.48 2010/12/20 18:17:46 roberto Exp roberto $
|
** $Id: lgc.h,v 2.49 2010/12/29 18:00:23 roberto Exp roberto $
|
||||||
** Garbage Collector
|
** Garbage Collector
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@ -106,7 +106,7 @@
|
|||||||
|
|
||||||
#define luaC_condGC(L,c) \
|
#define luaC_condGC(L,c) \
|
||||||
{if (G(L)->GCdebt > 0) {c;}; condchangemem(L);}
|
{if (G(L)->GCdebt > 0) {c;}; condchangemem(L);}
|
||||||
#define luaC_checkGC(L) luaC_condGC(L, luaC_step(L);)
|
#define luaC_checkGC(L) luaC_condGC(L, luaC_step(L);)
|
||||||
|
|
||||||
|
|
||||||
#define luaC_barrier(L,p,v) { if (valiswhite(v) && isblack(obj2gco(p))) \
|
#define luaC_barrier(L,p,v) { if (valiswhite(v) && isblack(obj2gco(p))) \
|
||||||
|
8
linit.c
8
linit.c
@ -1,16 +1,16 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: linit.c,v 1.29 2010/10/25 14:32:36 roberto Exp roberto $
|
** $Id: linit.c,v 1.30 2010/11/12 15:48:30 roberto Exp roberto $
|
||||||
** Initialization of libraries for lua.c and other clients
|
** Initialization of libraries for lua.c and other clients
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** If you embed Lua in your program and need to open the standard
|
** If you embed Lua in your program and need to open the standard
|
||||||
** libraries, call luaL_openlibs in your program. If you need a
|
** libraries, call luaL_openlibs in your program. If you need a
|
||||||
** different set of libraries, copy this file to your project and edit
|
** different set of libraries, copy this file to your project and edit
|
||||||
** it to suit your needs.
|
** it to suit your needs.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#define linit_c
|
#define linit_c
|
||||||
|
4
liolib.c
4
liolib.c
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: liolib.c,v 2.94 2010/11/09 16:57:49 roberto Exp roberto $
|
** $Id: liolib.c,v 2.95 2010/11/10 18:05:36 roberto Exp roberto $
|
||||||
** Standard I/O (and system) library
|
** Standard I/O (and system) library
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@ -517,7 +517,7 @@ static int io_write (lua_State *L) {
|
|||||||
|
|
||||||
|
|
||||||
static int f_write (lua_State *L) {
|
static int f_write (lua_State *L) {
|
||||||
FILE * f = tofile(L);
|
FILE * f = tofile(L);
|
||||||
lua_pushvalue(L, 1); /* push file at the stack top (to be returned) */
|
lua_pushvalue(L, 1); /* push file at the stack top (to be returned) */
|
||||||
return g_write(L, f, 2);
|
return g_write(L, f, 2);
|
||||||
}
|
}
|
||||||
|
6
llex.c
6
llex.c
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: llex.c,v 2.42 2010/12/06 21:08:36 roberto Exp roberto $
|
** $Id: llex.c,v 2.43 2010/12/10 14:53:15 roberto Exp roberto $
|
||||||
** Lexical Analyzer
|
** Lexical Analyzer
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@ -127,7 +127,7 @@ TString *luaX_newstring (LexState *ls, const char *str, size_t l) {
|
|||||||
TValue *o; /* entry for `str' */
|
TValue *o; /* entry for `str' */
|
||||||
TString *ts = luaS_newlstr(L, str, l); /* create new string */
|
TString *ts = luaS_newlstr(L, str, l); /* create new string */
|
||||||
setsvalue2s(L, L->top++, ts); /* temporarily anchor it in stack */
|
setsvalue2s(L, L->top++, ts); /* temporarily anchor it in stack */
|
||||||
o = luaH_setstr(L, ls->fs->h, ts);
|
o = luaH_setstr(L, ls->fs->h, ts);
|
||||||
if (ttisnil(o)) {
|
if (ttisnil(o)) {
|
||||||
setbvalue(o, 1); /* t[string] = true */
|
setbvalue(o, 1); /* t[string] = true */
|
||||||
luaC_checkGC(L);
|
luaC_checkGC(L);
|
||||||
@ -185,7 +185,7 @@ static int check_next (LexState *ls, const char *set) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** change all characters 'from' in buffer to 'to'
|
** change all characters 'from' in buffer to 'to'
|
||||||
*/
|
*/
|
||||||
static void buffreplace (LexState *ls, char from, char to) {
|
static void buffreplace (LexState *ls, char from, char to) {
|
||||||
|
4
loslib.c
4
loslib.c
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: loslib.c,v 1.31 2010/07/02 12:01:53 roberto Exp roberto $
|
** $Id: loslib.c,v 1.32 2010/10/05 12:18:03 roberto Exp roberto $
|
||||||
** Standard Operating System library
|
** Standard Operating System library
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@ -182,7 +182,7 @@ static const char *checkoption (lua_State *L, const char *conv, char *buff) {
|
|||||||
return conv; /* to avoid warnings */
|
return conv; /* to avoid warnings */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int os_date (lua_State *L) {
|
static int os_date (lua_State *L) {
|
||||||
const char *s = luaL_optstring(L, 1, "%c");
|
const char *s = luaL_optstring(L, 1, "%c");
|
||||||
time_t t = luaL_opt(L, (time_t)luaL_checknumber, 2, time(NULL));
|
time_t t = luaL_opt(L, (time_t)luaL_checknumber, 2, time(NULL));
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: lparser.c,v 2.93 2010/12/15 19:13:29 roberto Exp roberto $
|
** $Id: lparser.c,v 2.94 2010/12/17 12:03:41 roberto Exp roberto $
|
||||||
** Lua Parser
|
** Lua Parser
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@ -587,7 +587,7 @@ static void field (LexState *ls, struct ConsControl *cc) {
|
|||||||
|
|
||||||
|
|
||||||
static void constructor (LexState *ls, expdesc *t) {
|
static void constructor (LexState *ls, expdesc *t) {
|
||||||
/* constructor -> '{' [ field { sep field } [sep] ] '}'
|
/* constructor -> '{' [ field { sep field } [sep] ] '}'
|
||||||
sep -> ',' | ';' */
|
sep -> ',' | ';' */
|
||||||
FuncState *fs = ls->fs;
|
FuncState *fs = ls->fs;
|
||||||
int line = ls->linenumber;
|
int line = ls->linenumber;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: lstrlib.c,v 1.161 2010/12/20 17:25:36 roberto Exp roberto $
|
** $Id: lstrlib.c,v 1.162 2011/01/12 20:36:01 roberto Exp roberto $
|
||||||
** Standard library for string operations and pattern-matching
|
** Standard library for string operations and pattern-matching
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@ -524,7 +524,7 @@ static int nospecials (const char *p, size_t l) {
|
|||||||
size_t upto = 0;
|
size_t upto = 0;
|
||||||
do {
|
do {
|
||||||
if (strpbrk(p + upto, SPECIALS))
|
if (strpbrk(p + upto, SPECIALS))
|
||||||
return 0; /* pattern has a special character */
|
return 0; /* pattern has a special character */
|
||||||
upto += strlen(p + upto) + 1; /* may have more after \0 */
|
upto += strlen(p + upto) + 1; /* may have more after \0 */
|
||||||
} while (upto <= l);
|
} while (upto <= l);
|
||||||
return 1; /* no special chars found */
|
return 1; /* no special chars found */
|
||||||
|
Loading…
Reference in New Issue
Block a user