diff --git a/lauxlib.c b/lauxlib.c index d49ef573..e3a7a577 100644 --- a/lauxlib.c +++ b/lauxlib.c @@ -62,7 +62,7 @@ static int findfield (lua_State *L, int objidx, int level) { else if (findfield(L, objidx, level - 1)) { /* try recursively */ /* stack: lib_name, lib_table, field_name (top) */ lua_pushliteral(L, "."); /* place '.' between the two names */ - lua_replace(L, -3); /* (in the slot ocupied by table) */ + lua_replace(L, -3); /* (in the slot occupied by table) */ lua_concat(L, 3); /* lib_name.field_name */ return 1; } diff --git a/lgc.c b/lgc.c index 8444566c..aa6921bc 100644 --- a/lgc.c +++ b/lgc.c @@ -1250,7 +1250,7 @@ static void setminordebt (global_State *g) { /* ** Does a major collection after last collection was a "bad collection". ** -** When the program is building a big struture, it allocates lots of +** When the program is building a big structure, it allocates lots of ** memory but generates very little garbage. In those scenarios, ** the generational mode just wastes time doing small collections, and ** major collections are frequently what we call a "bad collection", a diff --git a/liolib.c b/liolib.c index 2c0c6a3b..83fbb172 100644 --- a/liolib.c +++ b/liolib.c @@ -338,7 +338,7 @@ static int io_readline (lua_State *L); #define MAXARGLINE 250 /* -** Auxiliar function to create the iteration function for 'lines'. +** Auxiliary function to create the iteration function for 'lines'. ** The iteration function is a closure over 'io_readline', with ** the following upvalues: ** 1) The file being read (first value in the stack) diff --git a/loadlib.c b/loadlib.c index ff73a459..b72dd885 100644 --- a/loadlib.c +++ b/loadlib.c @@ -308,7 +308,7 @@ static void setpath (lua_State *L, const char *fieldname, luaL_addchar(&b, *LUA_PATH_SEP); } luaL_addstring(&b, dft); /* add default */ - if (dftmark < path + len - 2) { /* is there a sufix after ';;'? */ + if (dftmark < path + len - 2) { /* is there a suffix after ';;'? */ luaL_addchar(&b, *LUA_PATH_SEP); luaL_addlstring(&b, dftmark + 2, (path + len - 2) - dftmark); } diff --git a/lopcodes.h b/lopcodes.h index a314dcd1..7bbbb0e5 100644 --- a/lopcodes.h +++ b/lopcodes.h @@ -286,9 +286,9 @@ OP_RETURN,/* A B C return R(A), ... ,R(A+B-2) (see note) */ OP_RETURN0,/* return */ OP_RETURN1,/* A return R(A) */ -OP_FORLOOP,/* A Bx R(A)+=R(A+2); - if R(A) ; + if not to run then pc+=Bx+1; */ OP_TFORPREP,/* A Bx create upvalue for R(A + 3); pc+=Bx */ OP_TFORCALL,/* A C R(A+4), ... ,R(A+3+C) := R(A)(R(A+1), R(A+2)); */ diff --git a/lstate.h b/lstate.h index d3a64f94..2a95dd16 100644 --- a/lstate.h +++ b/lstate.h @@ -74,7 +74,7 @@ ** higher part counts the number of non-yieldable calls in the stack. ** (They are together so that we can change both with one instruction.) ** -** Because calls to external C functions can use of unkown amount +** Because calls to external C functions can use an unknown amount ** of space (e.g., functions using an auxiliary buffer), calls ** to these functions add more than one to the count (see CSTACKCF). ** @@ -185,9 +185,9 @@ typedef struct CallInfo { union { int funcidx; /* called-function index */ int nyield; /* number of values yielded */ - struct { /* info about transfered values (for call/return hooks) */ - unsigned short ftransfer; /* offset of first value transfered */ - unsigned short ntransfer; /* number of values transfered */ + struct { /* info about transferred values (for call/return hooks) */ + unsigned short ftransfer; /* offset of first value transferred */ + unsigned short ntransfer; /* number of values transferred */ } transferinfo; } u2; short nresults; /* expected number of results from this function */ diff --git a/ltablib.c b/ltablib.c index 7e7a1012..d344a47e 100644 --- a/ltablib.c +++ b/ltablib.c @@ -338,7 +338,7 @@ static IdxT choosePivot (IdxT lo, IdxT up, unsigned int rnd) { /* -** QuickSort algorithm (recursive function) +** Quicksort algorithm (recursive function) */ static void auxsort (lua_State *L, IdxT lo, IdxT up, unsigned int rnd) { diff --git a/ltm.c b/ltm.c index c4fd762b..24739444 100644 --- a/ltm.c +++ b/ltm.c @@ -168,8 +168,8 @@ void luaT_trybinTM (lua_State *L, const TValue *p1, const TValue *p2, void luaT_trybinassocTM (lua_State *L, const TValue *p1, const TValue *p2, - StkId res, int inv, TMS event) { - if (inv) + StkId res, int flip, TMS event) { + if (flip) luaT_trybinTM(L, p2, p1, res, event); else luaT_trybinTM(L, p1, p2, res, event); @@ -177,10 +177,10 @@ void luaT_trybinassocTM (lua_State *L, const TValue *p1, const TValue *p2, void luaT_trybiniTM (lua_State *L, const TValue *p1, lua_Integer i2, - int inv, StkId res, TMS event) { + int flip, StkId res, TMS event) { TValue aux; setivalue(&aux, i2); - luaT_trybinassocTM(L, p1, &aux, res, inv, event); + luaT_trybinassocTM(L, p1, &aux, res, flip, event); } @@ -205,14 +205,14 @@ int luaT_callorderTM (lua_State *L, const TValue *p1, const TValue *p2, int luaT_callorderiTM (lua_State *L, const TValue *p1, int v2, - int inv, int isfloat, TMS event) { + int flip, int isfloat, TMS event) { TValue aux; const TValue *p2; if (isfloat) { setfltvalue(&aux, cast_num(v2)); } else setivalue(&aux, v2); - if (inv) { /* arguments were exchanged? */ + if (flip) { /* arguments were exchanged? */ p2 = p1; p1 = &aux; /* correct them */ } else diff --git a/luaconf.h b/luaconf.h index 72018855..8f13743b 100644 --- a/luaconf.h +++ b/luaconf.h @@ -493,7 +493,7 @@ @@ LUA_UNSIGNED is the unsigned version of LUA_INTEGER. ** @@ LUAI_UACINT is the result of a 'default argument promotion' -@@ over a lUA_INTEGER. +@@ over a LUA_INTEGER. @@ LUA_INTEGER_FRMLEN is the length modifier for reading/writing integers. @@ LUA_INTEGER_FMT is the format for writing integers. @@ LUA_MAXINTEGER is the maximum value for a LUA_INTEGER.