Skip to content

Commit b9dcf99

Browse files
committed
detail (typos in comments)
1 parent a77d263 commit b9dcf99

9 files changed

Lines changed: 28 additions & 28 deletions

File tree

lapi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
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 $
33
** Lua API
44
** See Copyright Notice in lua.h
55
*/
@@ -183,7 +183,7 @@ LUA_API void lua_settop (lua_State *L, int idx) {
183183

184184
/*
185185
** Reverse the stack segment from 'from' to 'to'
186-
** (auxiliar to 'lua_rotate')
186+
** (auxiliary to 'lua_rotate')
187187
*/
188188
static void reverse (lua_State *L, StkId from, StkId to) {
189189
for (; from < to; from++, to--) {

lbaselib.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
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 $
33
** Basic library
44
** See Copyright Notice in lua.h
55
*/
@@ -387,7 +387,7 @@ static int luaB_select (lua_State *L) {
387387

388388
/*
389389
** 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
391391
** 'finishpcall' only has to return everything in the stack minus
392392
** 'extra' values (where 'extra' is exactly the number of items to be
393393
** ignored).

ldo.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
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 $
33
** Stack and Call structure of Lua
44
** See Copyright Notice in lua.h
55
*/
@@ -516,7 +516,7 @@ static l_noret resume_error (lua_State *L, const char *msg, StkId firstArg) {
516516
/*
517517
** Do the work for 'lua_resume' in protected mode. Most of the work
518518
** 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
520520
** function), plus erroneous cases: non-suspended coroutine or dead
521521
** coroutine.
522522
*/

lgc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
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 $
33
** Garbage Collector
44
** See Copyright Notice in lua.h
55
*/
@@ -899,7 +899,7 @@ void luaC_checkfinalizer (lua_State *L, GCObject *o, Table *mt) {
899899
GCObject **p;
900900
if (issweepphase(g)) {
901901
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 */
903903
g->sweepgc = sweeptolive(L, g->sweepgc, NULL); /* change 'sweepgc' */
904904
}
905905
/* search for pointer pointing to 'o' */

liolib.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
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 $
33
** Standard I/O (and system) library
44
** See Copyright Notice in lua.h
55
*/
@@ -402,11 +402,11 @@ static int test2 (RN *rn, const char *set) {
402402

403403

404404
/*
405-
** Read a sequence of (hexa)digits
405+
** Read a sequence of (hex)digits
406406
*/
407-
static int readdigits (RN *rn, int hexa) {
407+
static int readdigits (RN *rn, int hex) {
408408
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))
410410
count++;
411411
return count;
412412
}
@@ -426,21 +426,21 @@ static int readdigits (RN *rn, int hexa) {
426426
static int read_number (lua_State *L, FILE *f) {
427427
RN rn;
428428
int count = 0;
429-
int hexa = 0;
429+
int hex = 0;
430430
char decp[2] = ".";
431431
rn.f = f; rn.n = 0;
432432
decp[0] = getlocaledecpoint(); /* get decimal point from locale */
433433
l_lockfile(rn.f);
434434
do { rn.c = l_getc(rn.f); } while (isspace(rn.c)); /* skip spaces */
435435
test2(&rn, "-+"); /* optional signal */
436436
if (test2(&rn, "0")) {
437-
if (test2(&rn, "xX")) hexa = 1; /* numeral is hexadecimal */
437+
if (test2(&rn, "xX")) hex = 1; /* numeral is hexadecimal */
438438
else count = 1; /* count initial '0' as a valid digit */
439439
}
440-
count += readdigits(&rn, hexa); /* integral part */
440+
count += readdigits(&rn, hex); /* integral part */
441441
if (test2(&rn, decp)) /* decimal point? */
442-
count += readdigits(&rn, hexa); /* fractionary part */
443-
if (count > 0 && test2(&rn, (hexa ? "pP" : "eE"))) { /* exponent mark? */
442+
count += readdigits(&rn, hex); /* fractional part */
443+
if (count > 0 && test2(&rn, (hex ? "pP" : "eE"))) { /* exponent mark? */
444444
test2(&rn, "-+"); /* exponent signal */
445445
readdigits(&rn, 0); /* exponent digits */
446446
}

lmathlib.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
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 $
33
** Standard mathematical library
44
** See Copyright Notice in lua.h
55
*/
@@ -145,14 +145,14 @@ static int math_fmod (lua_State *L) {
145145
static int math_modf (lua_State *L) {
146146
if (lua_isinteger(L ,1)) {
147147
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 */
149149
}
150150
else {
151151
lua_Number n = luaL_checknumber(L, 1);
152152
/* integer part (rounds toward zero) */
153153
lua_Number ip = (n < 0) ? l_mathop(ceil)(n) : l_mathop(floor)(n);
154154
pushnumint(L, ip);
155-
/* fractionary part (test needed for inf/-inf) */
155+
/* fractional part (test needed for inf/-inf) */
156156
lua_pushnumber(L, (n == ip) ? 0.0 : (n - ip));
157157
}
158158
return 2;

lobject.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
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 $
33
** Some generic functions over Lua objects
44
** See Copyright Notice in lua.h
55
*/
@@ -256,7 +256,7 @@ static const char *l_str2d (const char *s, lua_Number *result) {
256256
char *endptr;
257257
if (strpbrk(s, "nN")) /* reject 'inf' and 'nan' */
258258
return NULL;
259-
else if (strpbrk(s, "xX")) /* hexa? */
259+
else if (strpbrk(s, "xX")) /* hex? */
260260
*result = lua_strx2number(s, &endptr);
261261
else
262262
*result = lua_str2number(s, &endptr);
@@ -273,7 +273,7 @@ static const char *l_str2int (const char *s, lua_Integer *result) {
273273
while (lisspace(cast_uchar(*s))) s++; /* skip initial spaces */
274274
neg = isneg(&s);
275275
if (s[0] == '0' &&
276-
(s[1] == 'x' || s[1] == 'X')) { /* hexa? */
276+
(s[1] == 'x' || s[1] == 'X')) { /* hex? */
277277
s += 2; /* skip '0x' */
278278
for (; lisxdigit(cast_uchar(*s)); s++) {
279279
a = a * 16 + luaO_hexavalue(cast_uchar(*s));

lua.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
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 $
33
** Lua stand-alone interpreter
44
** See Copyright Notice in lua.h
55
*/
@@ -115,7 +115,7 @@ static void lstop (lua_State *L, lua_Debug *ar) {
115115

116116
/*
117117
** 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),
119119
** this function only sets a hook that, when called, will stop the
120120
** interpreter.
121121
*/
@@ -284,7 +284,7 @@ static const char *get_prompt (lua_State *L, int firstline) {
284284
/*
285285
** Check whether 'status' signals a syntax error and the error
286286
** message at the top of the stack ends with the above mark for
287-
** incoplete statements.
287+
** incomplete statements.
288288
*/
289289
static int incomplete (lua_State *L, int status) {
290290
if (status == LUA_ERRSYNTAX) {

lvm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
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 $
33
** Lua virtual machine
44
** See Copyright Notice in lua.h
55
*/
@@ -239,7 +239,7 @@ void luaV_settable (lua_State *L, const TValue *t, TValue *key, StkId val) {
239239
luaT_callTM(L, tm, t, key, val, 0);
240240
return;
241241
}
242-
t = tm; /* else repeat assginment over 'tm' */
242+
t = tm; /* else repeat assignment over 'tm' */
243243
}
244244
luaG_runerror(L, "settable chain too long; possible loop");
245245
}

0 commit comments

Comments
 (0)