mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Remove trailing whitespace (#13505)
This commit is contained in:
parent
95a9f4ab7c
commit
180ec92ef9
44 changed files with 81 additions and 81 deletions
|
@ -7,28 +7,28 @@
|
|||
// //////////////////////////////////////////////////////////////////////
|
||||
|
||||
/*
|
||||
The JsonCpp library's source code, including accompanying documentation,
|
||||
The JsonCpp library's source code, including accompanying documentation,
|
||||
tests and demonstration applications, are licensed under the following
|
||||
conditions...
|
||||
|
||||
Baptiste Lepilleur and The JsonCpp Authors explicitly disclaim copyright in all
|
||||
jurisdictions which recognize such a disclaimer. In such jurisdictions,
|
||||
Baptiste Lepilleur and The JsonCpp Authors explicitly disclaim copyright in all
|
||||
jurisdictions which recognize such a disclaimer. In such jurisdictions,
|
||||
this software is released into the Public Domain.
|
||||
|
||||
In jurisdictions which do not recognize Public Domain property (e.g. Germany as of
|
||||
2010), this software is Copyright (c) 2007-2010 by Baptiste Lepilleur and
|
||||
The JsonCpp Authors, and is released under the terms of the MIT License (see below).
|
||||
|
||||
In jurisdictions which recognize Public Domain property, the user of this
|
||||
software may choose to accept it either as 1) Public Domain, 2) under the
|
||||
conditions of the MIT License (see below), or 3) under the terms of dual
|
||||
In jurisdictions which recognize Public Domain property, the user of this
|
||||
software may choose to accept it either as 1) Public Domain, 2) under the
|
||||
conditions of the MIT License (see below), or 3) under the terms of dual
|
||||
Public Domain/MIT License conditions described here, as they choose.
|
||||
|
||||
The MIT License is about as close to Public Domain as a license can get, and is
|
||||
described in clear, concise terms at:
|
||||
|
||||
http://en.wikipedia.org/wiki/MIT_License
|
||||
|
||||
|
||||
The full text of the MIT License follows:
|
||||
|
||||
========================================================================
|
||||
|
|
|
@ -6,28 +6,28 @@
|
|||
// //////////////////////////////////////////////////////////////////////
|
||||
|
||||
/*
|
||||
The JsonCpp library's source code, including accompanying documentation,
|
||||
The JsonCpp library's source code, including accompanying documentation,
|
||||
tests and demonstration applications, are licensed under the following
|
||||
conditions...
|
||||
|
||||
Baptiste Lepilleur and The JsonCpp Authors explicitly disclaim copyright in all
|
||||
jurisdictions which recognize such a disclaimer. In such jurisdictions,
|
||||
Baptiste Lepilleur and The JsonCpp Authors explicitly disclaim copyright in all
|
||||
jurisdictions which recognize such a disclaimer. In such jurisdictions,
|
||||
this software is released into the Public Domain.
|
||||
|
||||
In jurisdictions which do not recognize Public Domain property (e.g. Germany as of
|
||||
2010), this software is Copyright (c) 2007-2010 by Baptiste Lepilleur and
|
||||
The JsonCpp Authors, and is released under the terms of the MIT License (see below).
|
||||
|
||||
In jurisdictions which recognize Public Domain property, the user of this
|
||||
software may choose to accept it either as 1) Public Domain, 2) under the
|
||||
conditions of the MIT License (see below), or 3) under the terms of dual
|
||||
In jurisdictions which recognize Public Domain property, the user of this
|
||||
software may choose to accept it either as 1) Public Domain, 2) under the
|
||||
conditions of the MIT License (see below), or 3) under the terms of dual
|
||||
Public Domain/MIT License conditions described here, as they choose.
|
||||
|
||||
The MIT License is about as close to Public Domain as a license can get, and is
|
||||
described in clear, concise terms at:
|
||||
|
||||
http://en.wikipedia.org/wiki/MIT_License
|
||||
|
||||
|
||||
The full text of the MIT License follows:
|
||||
|
||||
========================================================================
|
||||
|
|
|
@ -6,28 +6,28 @@
|
|||
// //////////////////////////////////////////////////////////////////////
|
||||
|
||||
/*
|
||||
The JsonCpp library's source code, including accompanying documentation,
|
||||
The JsonCpp library's source code, including accompanying documentation,
|
||||
tests and demonstration applications, are licensed under the following
|
||||
conditions...
|
||||
|
||||
Baptiste Lepilleur and The JsonCpp Authors explicitly disclaim copyright in all
|
||||
jurisdictions which recognize such a disclaimer. In such jurisdictions,
|
||||
Baptiste Lepilleur and The JsonCpp Authors explicitly disclaim copyright in all
|
||||
jurisdictions which recognize such a disclaimer. In such jurisdictions,
|
||||
this software is released into the Public Domain.
|
||||
|
||||
In jurisdictions which do not recognize Public Domain property (e.g. Germany as of
|
||||
2010), this software is Copyright (c) 2007-2010 by Baptiste Lepilleur and
|
||||
The JsonCpp Authors, and is released under the terms of the MIT License (see below).
|
||||
|
||||
In jurisdictions which recognize Public Domain property, the user of this
|
||||
software may choose to accept it either as 1) Public Domain, 2) under the
|
||||
conditions of the MIT License (see below), or 3) under the terms of dual
|
||||
In jurisdictions which recognize Public Domain property, the user of this
|
||||
software may choose to accept it either as 1) Public Domain, 2) under the
|
||||
conditions of the MIT License (see below), or 3) under the terms of dual
|
||||
Public Domain/MIT License conditions described here, as they choose.
|
||||
|
||||
The MIT License is about as close to Public Domain as a license can get, and is
|
||||
described in clear, concise terms at:
|
||||
|
||||
http://en.wikipedia.org/wiki/MIT_License
|
||||
|
||||
|
||||
The full text of the MIT License follows:
|
||||
|
||||
========================================================================
|
||||
|
|
|
@ -223,7 +223,7 @@ LUA_API void lua_replace (lua_State *L, int idx) {
|
|||
api_checkvalidindex(L, o);
|
||||
if (idx == LUA_ENVIRONINDEX) {
|
||||
Closure *func = curr_func(L);
|
||||
api_check(L, ttistable(L->top - 1));
|
||||
api_check(L, ttistable(L->top - 1));
|
||||
func->c.env = hvalue(L->top - 1);
|
||||
luaC_barrier(L, func, L->top - 1);
|
||||
}
|
||||
|
@ -783,7 +783,7 @@ LUA_API int lua_setfenv (lua_State *L, int idx) {
|
|||
|
||||
#define checkresults(L,na,nr) \
|
||||
api_check(L, (nr) == LUA_MULTRET || (L->ci->top - L->top >= (nr) - (na)))
|
||||
|
||||
|
||||
|
||||
LUA_API void lua_call (lua_State *L, int nargs, int nresults) {
|
||||
StkId func;
|
||||
|
|
|
@ -139,7 +139,7 @@ static int db_getinfo (lua_State *L) {
|
|||
treatstackoption(L, L1, "func");
|
||||
return 1; /* return table */
|
||||
}
|
||||
|
||||
|
||||
|
||||
static int db_getlocal (lua_State *L) {
|
||||
int arg;
|
||||
|
|
|
@ -184,7 +184,7 @@ static void collectvalidlines (lua_State *L, Closure *f) {
|
|||
int i;
|
||||
for (i=0; i<f->l.p->sizelineinfo; i++)
|
||||
setbvalue(luaH_setnum(L, t, lineinfo[i]), 1);
|
||||
sethvalue(L, L->top, t);
|
||||
sethvalue(L, L->top, t);
|
||||
}
|
||||
incr_top(L);
|
||||
}
|
||||
|
|
|
@ -370,7 +370,7 @@ int luaD_poscall (lua_State *L, StkId firstResult) {
|
|||
** The arguments are on the stack, right after the function.
|
||||
** When returns, all the results are on the stack, starting at the original
|
||||
** function position.
|
||||
*/
|
||||
*/
|
||||
void luaD_call (lua_State *L, StkId func, int nResults) {
|
||||
if (++L->nCcalls >= LUAI_MAXCCALLS) {
|
||||
if (L->nCcalls == LUAI_MAXCCALLS)
|
||||
|
|
|
@ -315,7 +315,7 @@ static l_mem propagatemark (global_State *g) {
|
|||
traverseproto(g, p);
|
||||
return sizeof(Proto) + sizeof(Instruction) * p->sizecode +
|
||||
sizeof(Proto *) * p->sizep +
|
||||
sizeof(TValue) * p->sizek +
|
||||
sizeof(TValue) * p->sizek +
|
||||
sizeof(int) * p->sizelineinfo +
|
||||
sizeof(LocVar) * p->sizelocvars +
|
||||
sizeof(TString *) * p->sizeupvalues;
|
||||
|
@ -701,7 +701,7 @@ void luaC_linkupval (lua_State *L, UpVal *uv) {
|
|||
GCObject *o = obj2gco(uv);
|
||||
o->gch.next = g->rootgc; /* link upvalue into `rootgc' list */
|
||||
g->rootgc = o;
|
||||
if (isgray(o)) {
|
||||
if (isgray(o)) {
|
||||
if (g->gcstate == GCSpropagate) {
|
||||
gray2black(o); /* closed upvalues need barrier */
|
||||
luaC_barrier(L, uv, uv->v);
|
||||
|
|
|
@ -107,7 +107,7 @@ typedef lu_int32 Instruction;
|
|||
|
||||
|
||||
#ifndef lua_lock
|
||||
#define lua_lock(L) ((void) 0)
|
||||
#define lua_lock(L) ((void) 0)
|
||||
#define lua_unlock(L) ((void) 0)
|
||||
#endif
|
||||
|
||||
|
@ -118,7 +118,7 @@ typedef lu_int32 Instruction;
|
|||
|
||||
/*
|
||||
** macro to control inclusion of some hard tests on stack reallocation
|
||||
*/
|
||||
*/
|
||||
#ifndef HARDSTACKTESTS
|
||||
#define condhardstacktests(x) ((void)0)
|
||||
#else
|
||||
|
|
|
@ -502,7 +502,7 @@ static int ll_require (lua_State *L) {
|
|||
** 'module' function
|
||||
** =======================================================
|
||||
*/
|
||||
|
||||
|
||||
|
||||
static void setfenv (lua_State *L) {
|
||||
lua_Debug ar;
|
||||
|
@ -632,7 +632,7 @@ LUALIB_API int luaopen_package (lua_State *L) {
|
|||
lua_setfield(L, -2, "__gc");
|
||||
/* create `package' table */
|
||||
luaL_register(L, LUA_LOADLIBNAME, pk_funcs);
|
||||
#if defined(LUA_COMPAT_LOADLIB)
|
||||
#if defined(LUA_COMPAT_LOADLIB)
|
||||
lua_getfield(L, -1, "loadlib");
|
||||
lua_setfield(L, LUA_GLOBALSINDEX, "loadlib");
|
||||
#endif
|
||||
|
|
|
@ -337,7 +337,7 @@ typedef struct Node {
|
|||
|
||||
typedef struct Table {
|
||||
CommonHeader;
|
||||
lu_byte flags; /* 1<<p means tagmethod(p) is not present */
|
||||
lu_byte flags; /* 1<<p means tagmethod(p) is not present */
|
||||
lu_byte lsizenode; /* log2 of size of `node' array */
|
||||
struct Table *metatable;
|
||||
TValue *array; /* array part */
|
||||
|
|
|
@ -186,8 +186,8 @@ OP_EQ,/* A B C if ((RK(B) == RK(C)) ~= A) then pc++ */
|
|||
OP_LT,/* A B C if ((RK(B) < RK(C)) ~= A) then pc++ */
|
||||
OP_LE,/* A B C if ((RK(B) <= RK(C)) ~= A) then pc++ */
|
||||
|
||||
OP_TEST,/* A C if not (R(A) <=> C) then pc++ */
|
||||
OP_TESTSET,/* A B C if (R(B) <=> C) then R(A) := R(B) else pc++ */
|
||||
OP_TEST,/* A C if not (R(A) <=> C) then pc++ */
|
||||
OP_TESTSET,/* A B C if (R(B) <=> C) then R(A) := R(B) else pc++ */
|
||||
|
||||
OP_CALL,/* A B C R(A), ... ,R(A+C-2) := R(A)(R(A+1), ... ,R(A+B-1)) */
|
||||
OP_TAILCALL,/* A B C return R(A)(R(A+1), ... ,R(A+B-1)) */
|
||||
|
@ -197,8 +197,8 @@ OP_FORLOOP,/* A sBx R(A)+=R(A+2);
|
|||
if R(A) <?= R(A+1) then { pc+=sBx; R(A+3)=R(A) }*/
|
||||
OP_FORPREP,/* A sBx R(A)-=R(A+2); pc+=sBx */
|
||||
|
||||
OP_TFORLOOP,/* A C R(A+3), ... ,R(A+2+C) := R(A)(R(A+1), R(A+2));
|
||||
if R(A+3) ~= nil then R(A+2)=R(A+3) else pc++ */
|
||||
OP_TFORLOOP,/* A C R(A+3), ... ,R(A+2+C) := R(A)(R(A+1), R(A+2));
|
||||
if R(A+3) ~= nil then R(A+2)=R(A+3) else pc++ */
|
||||
OP_SETLIST,/* A B C R(A)[(C-1)*FPF+i] := R(A+i), 1 <= i <= B */
|
||||
|
||||
OP_CLOSE,/* A close all variables in the stack up to (>=) R(A)*/
|
||||
|
@ -240,7 +240,7 @@ OP_VARARG/* A B R(A), R(A+1), ..., R(A+B-1) = vararg */
|
|||
** bits 4-5: B arg mode
|
||||
** bit 6: instruction set register A
|
||||
** bit 7: operator is a test
|
||||
*/
|
||||
*/
|
||||
|
||||
enum OpArgMask {
|
||||
OpArgN, /* argument is not used */
|
||||
|
|
|
@ -36,7 +36,7 @@ typedef struct LG {
|
|||
lua_State l;
|
||||
global_State g;
|
||||
} LG;
|
||||
|
||||
|
||||
|
||||
|
||||
static void stack_init (lua_State *L1, lua_State *L) {
|
||||
|
|
|
@ -636,7 +636,7 @@ static void add_value (MatchState *ms, luaL_Buffer *b, const char *s,
|
|||
lua_pushlstring(L, s, e - s); /* keep original text */
|
||||
}
|
||||
else if (!lua_isstring(L, -1))
|
||||
luaL_error(L, "invalid replacement value (a %s)", luaL_typename(L, -1));
|
||||
luaL_error(L, "invalid replacement value (a %s)", luaL_typename(L, -1));
|
||||
luaL_addvalue(b); /* add result to accumulator */
|
||||
}
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
|
||||
|
||||
#define hashpow2(t,n) (gnode(t, lmod((n), sizenode(t))))
|
||||
|
||||
|
||||
#define hashstr(t,str) hashpow2(t, (str)->tsv.hash)
|
||||
#define hashboolean(t,p) hashpow2(t, p)
|
||||
|
||||
|
@ -302,7 +302,7 @@ static void resize (lua_State *L, Table *t, int nasize, int nhsize) {
|
|||
if (nasize > oldasize) /* array part must grow? */
|
||||
setarrayvector(L, t, nasize);
|
||||
/* create new hash part with appropriate size */
|
||||
setnodevector(L, t, nhsize);
|
||||
setnodevector(L, t, nhsize);
|
||||
if (nasize < oldasize) { /* array part must shrink? */
|
||||
t->sizearray = nasize;
|
||||
/* re-insert elements from vanishing slice */
|
||||
|
@ -390,11 +390,11 @@ static Node *getfreepos (Table *t) {
|
|||
|
||||
|
||||
/*
|
||||
** inserts a new key into a hash table; first, check whether key's main
|
||||
** position is free. If not, check whether colliding node is in its main
|
||||
** position or not: if it is not, move colliding node to an empty place and
|
||||
** put new key in its main position; otherwise (colliding node is in its main
|
||||
** position), new key goes to an empty position.
|
||||
** inserts a new key into a hash table; first, check whether key's main
|
||||
** position is free. If not, check whether colliding node is in its main
|
||||
** position or not: if it is not, move colliding node to an empty place and
|
||||
** put new key in its main position; otherwise (colliding node is in its main
|
||||
** position), new key goes to an empty position.
|
||||
*/
|
||||
static TValue *newkey (lua_State *L, Table *t, const TValue *key) {
|
||||
Node *mp = mainposition(t, key);
|
||||
|
|
|
@ -242,14 +242,14 @@ static int handle_script (lua_State *L, char **argv, int n) {
|
|||
int narg = getargs(L, argv, n); /* collect arguments */
|
||||
lua_setglobal(L, "arg");
|
||||
fname = argv[n];
|
||||
if (strcmp(fname, "-") == 0 && strcmp(argv[n-1], "--") != 0)
|
||||
if (strcmp(fname, "-") == 0 && strcmp(argv[n-1], "--") != 0)
|
||||
fname = NULL; /* stdin */
|
||||
status = luaL_loadfile(L, fname);
|
||||
lua_insert(L, -(narg+1));
|
||||
if (status == 0)
|
||||
status = docall(L, narg, 0);
|
||||
else
|
||||
lua_pop(L, narg);
|
||||
lua_pop(L, narg);
|
||||
return report(L, status);
|
||||
}
|
||||
|
||||
|
|
|
@ -250,7 +250,7 @@ LUA_API void lua_setallocf (lua_State *L, lua_Alloc f, void *ud);
|
|||
|
||||
|
||||
|
||||
/*
|
||||
/*
|
||||
** ===============================================================
|
||||
** some useful macros
|
||||
** ===============================================================
|
||||
|
|
|
@ -41,7 +41,7 @@ LUALIB_API int (luaopen_package) (lua_State *L);
|
|||
|
||||
|
||||
/* open all previous libraries */
|
||||
LUALIB_API void (luaL_openlibs) (lua_State *L);
|
||||
LUALIB_API void (luaL_openlibs) (lua_State *L);
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -125,7 +125,7 @@ void luaV_gettable (lua_State *L, const TValue *t, TValue *key, StkId val) {
|
|||
callTMres(L, val, tm, t, key);
|
||||
return;
|
||||
}
|
||||
t = tm; /* else repeat with `tm' */
|
||||
t = tm; /* else repeat with `tm' */
|
||||
}
|
||||
luaG_runerror(L, "loop in gettable");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue