aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lapi.c4
-rw-r--r--lbaselib.c4
-rw-r--r--ldo.c4
-rw-r--r--lgc.c4
-rw-r--r--liolib.c18
-rw-r--r--lmathlib.c6
-rw-r--r--lobject.c6
-rw-r--r--lua.c6
-rw-r--r--lvm.c4
9 files changed, 28 insertions, 28 deletions
diff --git a/lapi.c b/lapi.c
index 214ac283..ec239962 100644
--- a/lapi.c
+++ b/lapi.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lapi.c,v 2.221 2014/06/26 17:25:11 roberto Exp roberto $ 2** $Id: lapi.c,v 2.222 2014/06/26 18:28:24 roberto Exp roberto $
3** Lua API 3** Lua API
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -183,7 +183,7 @@ LUA_API void lua_settop (lua_State *L, int idx) {
183 183
184/* 184/*
185** Reverse the stack segment from 'from' to 'to' 185** Reverse the stack segment from 'from' to 'to'
186** (auxiliar to 'lua_rotate') 186** (auxiliary to 'lua_rotate')
187*/ 187*/
188static void reverse (lua_State *L, StkId from, StkId to) { 188static void reverse (lua_State *L, StkId from, StkId to) {
189 for (; from < to; from++, to--) { 189 for (; from < to; from++, to--) {
diff --git a/lbaselib.c b/lbaselib.c
index 8d635aa3..a6e01e9d 100644
--- a/lbaselib.c
+++ b/lbaselib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lbaselib.c,v 1.288 2014/06/02 03:06:26 roberto Exp roberto $ 2** $Id: lbaselib.c,v 1.289 2014/06/10 17:41:38 roberto Exp roberto $
3** Basic library 3** Basic library
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -387,7 +387,7 @@ static int luaB_select (lua_State *L) {
387 387
388/* 388/*
389** Continuation function for 'pcall' and 'xpcall'. Both functions 389** Continuation function for 'pcall' and 'xpcall'. Both functions
390** already pushed a 'true' before doing the call, so in case of sucess 390** already pushed a 'true' before doing the call, so in case of success
391** 'finishpcall' only has to return everything in the stack minus 391** 'finishpcall' only has to return everything in the stack minus
392** 'extra' values (where 'extra' is exactly the number of items to be 392** 'extra' values (where 'extra' is exactly the number of items to be
393** ignored). 393** ignored).
diff --git a/ldo.c b/ldo.c
index d23ba47d..4d859048 100644
--- a/ldo.c
+++ b/ldo.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ldo.c,v 2.122 2014/06/12 19:07:30 roberto Exp roberto $ 2** $Id: ldo.c,v 2.123 2014/06/19 18:27:20 roberto Exp roberto $
3** Stack and Call structure of Lua 3** Stack and Call structure of Lua
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -516,7 +516,7 @@ static l_noret resume_error (lua_State *L, const char *msg, StkId firstArg) {
516/* 516/*
517** Do the work for 'lua_resume' in protected mode. Most of the work 517** Do the work for 'lua_resume' in protected mode. Most of the work
518** depends on the status of the coroutine: initial state, suspended 518** depends on the status of the coroutine: initial state, suspended
519** inside a hook, or regulary suspended (optionally with a continuation 519** inside a hook, or regularly suspended (optionally with a continuation
520** function), plus erroneous cases: non-suspended coroutine or dead 520** function), plus erroneous cases: non-suspended coroutine or dead
521** coroutine. 521** coroutine.
522*/ 522*/
diff --git a/lgc.c b/lgc.c
index e2195c0d..495eb4ac 100644
--- a/lgc.c
+++ b/lgc.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lgc.c,v 2.182 2014/04/04 17:01:04 roberto Exp roberto $ 2** $Id: lgc.c,v 2.183 2014/05/25 19:08:32 roberto Exp roberto $
3** Garbage Collector 3** Garbage Collector
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -899,7 +899,7 @@ void luaC_checkfinalizer (lua_State *L, GCObject *o, Table *mt) {
899 GCObject **p; 899 GCObject **p;
900 if (issweepphase(g)) { 900 if (issweepphase(g)) {
901 makewhite(g, o); /* "sweep" object 'o' */ 901 makewhite(g, o); /* "sweep" object 'o' */
902 if (g->sweepgc == &o->gch.next) /* shoud not remove 'sweepgc' object */ 902 if (g->sweepgc == &o->gch.next) /* should not remove 'sweepgc' object */
903 g->sweepgc = sweeptolive(L, g->sweepgc, NULL); /* change 'sweepgc' */ 903 g->sweepgc = sweeptolive(L, g->sweepgc, NULL); /* change 'sweepgc' */
904 } 904 }
905 /* search for pointer pointing to 'o' */ 905 /* search for pointer pointing to 'o' */
diff --git a/liolib.c b/liolib.c
index ef78da5b..b7f4c55a 100644
--- a/liolib.c
+++ b/liolib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: liolib.c,v 2.125 2014/05/21 15:24:21 roberto Exp roberto $ 2** $Id: liolib.c,v 2.126 2014/06/02 03:00:51 roberto Exp roberto $
3** Standard I/O (and system) library 3** Standard I/O (and system) library
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -402,11 +402,11 @@ static int test2 (RN *rn, const char *set) {
402 402
403 403
404/* 404/*
405** Read a sequence of (hexa)digits 405** Read a sequence of (hex)digits
406*/ 406*/
407static int readdigits (RN *rn, int hexa) { 407static int readdigits (RN *rn, int hex) {
408 int count = 0; 408 int count = 0;
409 while ((hexa ? isxdigit(rn->c) : isdigit(rn->c)) && nextc(rn)) 409 while ((hex ? isxdigit(rn->c) : isdigit(rn->c)) && nextc(rn))
410 count++; 410 count++;
411 return count; 411 return count;
412} 412}
@@ -426,7 +426,7 @@ static int readdigits (RN *rn, int hexa) {
426static int read_number (lua_State *L, FILE *f) { 426static int read_number (lua_State *L, FILE *f) {
427 RN rn; 427 RN rn;
428 int count = 0; 428 int count = 0;
429 int hexa = 0; 429 int hex = 0;
430 char decp[2] = "."; 430 char decp[2] = ".";
431 rn.f = f; rn.n = 0; 431 rn.f = f; rn.n = 0;
432 decp[0] = getlocaledecpoint(); /* get decimal point from locale */ 432 decp[0] = getlocaledecpoint(); /* get decimal point from locale */
@@ -434,13 +434,13 @@ static int read_number (lua_State *L, FILE *f) {
434 do { rn.c = l_getc(rn.f); } while (isspace(rn.c)); /* skip spaces */ 434 do { rn.c = l_getc(rn.f); } while (isspace(rn.c)); /* skip spaces */
435 test2(&rn, "-+"); /* optional signal */ 435 test2(&rn, "-+"); /* optional signal */
436 if (test2(&rn, "0")) { 436 if (test2(&rn, "0")) {
437 if (test2(&rn, "xX")) hexa = 1; /* numeral is hexadecimal */ 437 if (test2(&rn, "xX")) hex = 1; /* numeral is hexadecimal */
438 else count = 1; /* count initial '0' as a valid digit */ 438 else count = 1; /* count initial '0' as a valid digit */
439 } 439 }
440 count += readdigits(&rn, hexa); /* integral part */ 440 count += readdigits(&rn, hex); /* integral part */
441 if (test2(&rn, decp)) /* decimal point? */ 441 if (test2(&rn, decp)) /* decimal point? */
442 count += readdigits(&rn, hexa); /* fractionary part */ 442 count += readdigits(&rn, hex); /* fractional part */
443 if (count > 0 && test2(&rn, (hexa ? "pP" : "eE"))) { /* exponent mark? */ 443 if (count > 0 && test2(&rn, (hex ? "pP" : "eE"))) { /* exponent mark? */
444 test2(&rn, "-+"); /* exponent signal */ 444 test2(&rn, "-+"); /* exponent signal */
445 readdigits(&rn, 0); /* exponent digits */ 445 readdigits(&rn, 0); /* exponent digits */
446 } 446 }
diff --git a/lmathlib.c b/lmathlib.c
index 1e5c3ede..bdbb0aa1 100644
--- a/lmathlib.c
+++ b/lmathlib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lmathlib.c,v 1.103 2014/06/18 12:35:53 roberto Exp roberto $ 2** $Id: lmathlib.c,v 1.104 2014/06/26 18:38:28 roberto Exp roberto $
3** Standard mathematical library 3** Standard mathematical library
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -145,14 +145,14 @@ static int math_fmod (lua_State *L) {
145static int math_modf (lua_State *L) { 145static int math_modf (lua_State *L) {
146 if (lua_isinteger(L ,1)) { 146 if (lua_isinteger(L ,1)) {
147 lua_settop(L, 1); /* number is its own integer part */ 147 lua_settop(L, 1); /* number is its own integer part */
148 lua_pushnumber(L, 0); /* no fractionary part */ 148 lua_pushnumber(L, 0); /* no fractional part */
149 } 149 }
150 else { 150 else {
151 lua_Number n = luaL_checknumber(L, 1); 151 lua_Number n = luaL_checknumber(L, 1);
152 /* integer part (rounds toward zero) */ 152 /* integer part (rounds toward zero) */
153 lua_Number ip = (n < 0) ? l_mathop(ceil)(n) : l_mathop(floor)(n); 153 lua_Number ip = (n < 0) ? l_mathop(ceil)(n) : l_mathop(floor)(n);
154 pushnumint(L, ip); 154 pushnumint(L, ip);
155 /* fractionary part (test needed for inf/-inf) */ 155 /* fractional part (test needed for inf/-inf) */
156 lua_pushnumber(L, (n == ip) ? 0.0 : (n - ip)); 156 lua_pushnumber(L, (n == ip) ? 0.0 : (n - ip));
157 } 157 }
158 return 2; 158 return 2;
diff --git a/lobject.c b/lobject.c
index 93acc9ae..cd049075 100644
--- a/lobject.c
+++ b/lobject.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lobject.c,v 2.85 2014/05/12 21:22:05 roberto Exp roberto $ 2** $Id: lobject.c,v 2.86 2014/05/12 21:44:17 roberto Exp roberto $
3** Some generic functions over Lua objects 3** Some generic functions over Lua objects
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -256,7 +256,7 @@ static const char *l_str2d (const char *s, lua_Number *result) {
256 char *endptr; 256 char *endptr;
257 if (strpbrk(s, "nN")) /* reject 'inf' and 'nan' */ 257 if (strpbrk(s, "nN")) /* reject 'inf' and 'nan' */
258 return NULL; 258 return NULL;
259 else if (strpbrk(s, "xX")) /* hexa? */ 259 else if (strpbrk(s, "xX")) /* hex? */
260 *result = lua_strx2number(s, &endptr); 260 *result = lua_strx2number(s, &endptr);
261 else 261 else
262 *result = lua_str2number(s, &endptr); 262 *result = lua_str2number(s, &endptr);
@@ -273,7 +273,7 @@ static const char *l_str2int (const char *s, lua_Integer *result) {
273 while (lisspace(cast_uchar(*s))) s++; /* skip initial spaces */ 273 while (lisspace(cast_uchar(*s))) s++; /* skip initial spaces */
274 neg = isneg(&s); 274 neg = isneg(&s);
275 if (s[0] == '0' && 275 if (s[0] == '0' &&
276 (s[1] == 'x' || s[1] == 'X')) { /* hexa? */ 276 (s[1] == 'x' || s[1] == 'X')) { /* hex? */
277 s += 2; /* skip '0x' */ 277 s += 2; /* skip '0x' */
278 for (; lisxdigit(cast_uchar(*s)); s++) { 278 for (; lisxdigit(cast_uchar(*s)); s++) {
279 a = a * 16 + luaO_hexavalue(cast_uchar(*s)); 279 a = a * 16 + luaO_hexavalue(cast_uchar(*s));
diff --git a/lua.c b/lua.c
index e2dc836f..d994925b 100644
--- a/lua.c
+++ b/lua.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lua.c,v 1.211 2014/06/05 20:42:06 roberto Exp roberto $ 2** $Id: lua.c,v 1.212 2014/06/26 17:08:52 roberto Exp roberto $
3** Lua stand-alone interpreter 3** Lua stand-alone interpreter
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -115,7 +115,7 @@ static void lstop (lua_State *L, lua_Debug *ar) {
115 115
116/* 116/*
117** Function to be called at a C signal. Because a C signal cannot 117** Function to be called at a C signal. Because a C signal cannot
118** just change a Lua state (as there is no proper syncronization), 118** just change a Lua state (as there is no proper synchronization),
119** this function only sets a hook that, when called, will stop the 119** this function only sets a hook that, when called, will stop the
120** interpreter. 120** interpreter.
121*/ 121*/
@@ -284,7 +284,7 @@ static const char *get_prompt (lua_State *L, int firstline) {
284/* 284/*
285** Check whether 'status' signals a syntax error and the error 285** Check whether 'status' signals a syntax error and the error
286** message at the top of the stack ends with the above mark for 286** message at the top of the stack ends with the above mark for
287** incoplete statements. 287** incomplete statements.
288*/ 288*/
289static int incomplete (lua_State *L, int status) { 289static int incomplete (lua_State *L, int status) {
290 if (status == LUA_ERRSYNTAX) { 290 if (status == LUA_ERRSYNTAX) {
diff --git a/lvm.c b/lvm.c
index e86008c7..8f13f448 100644
--- a/lvm.c
+++ b/lvm.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lvm.c,v 2.215 2014/06/10 18:53:18 roberto Exp roberto $ 2** $Id: lvm.c,v 2.216 2014/06/19 18:27:20 roberto Exp roberto $
3** Lua virtual machine 3** Lua virtual machine
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -239,7 +239,7 @@ void luaV_settable (lua_State *L, const TValue *t, TValue *key, StkId val) {
239 luaT_callTM(L, tm, t, key, val, 0); 239 luaT_callTM(L, tm, t, key, val, 0);
240 return; 240 return;
241 } 241 }
242 t = tm; /* else repeat assginment over 'tm' */ 242 t = tm; /* else repeat assignment over 'tm' */
243 } 243 }
244 luaG_runerror(L, "settable chain too long; possible loop"); 244 luaG_runerror(L, "settable chain too long; possible loop");
245} 245}