summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lapi.c4
-rw-r--r--lauxlib.c8
-rw-r--r--lbuiltin.c14
-rw-r--r--lbuiltin.h6
-rw-r--r--ldo.c8
-rw-r--r--lfunc.c4
-rw-r--r--lfunc.h4
-rw-r--r--lgc.c6
-rw-r--r--llex.h8
-rw-r--r--lmathlib.c8
-rw-r--r--lmem.c4
-rw-r--r--lmem.h4
-rw-r--r--lobject.h12
-rw-r--r--lopcodes.h4
-rw-r--r--lref.c4
-rw-r--r--lref.h4
-rw-r--r--lstate.h6
-rw-r--r--lstrlib.c4
-rw-r--r--ltests.c4
-rw-r--r--lvm.c14
20 files changed, 65 insertions, 65 deletions
diff --git a/lapi.c b/lapi.c
index 029f98e5..75e1c656 100644
--- a/lapi.c
+++ b/lapi.c
@@ -1,5 +1,5 @@
/*
-** $Id: lapi.c,v 1.64 1999/12/14 18:31:20 roberto Exp roberto $
+** $Id: lapi.c,v 1.65 1999/12/23 18:19:57 roberto Exp roberto $
** Lua API
** See Copyright Notice in lua.h
*/
@@ -79,7 +79,7 @@ lua_Object luaA_putObjectOnTop (lua_State *L) {
static void top2LC (lua_State *L, int n) {
- /* Put the 'n' elements on the top as the Lua2C contents */
+ /* Put the `n' elements on the top as the Lua2C contents */
L->Cstack.base = L->top; /* new base */
L->Cstack.lua2C = L->Cstack.base-n; /* position of the new results */
L->Cstack.num = n; /* number of results */
diff --git a/lauxlib.c b/lauxlib.c
index 5a333d3e..78be8bef 100644
--- a/lauxlib.c
+++ b/lauxlib.c
@@ -1,5 +1,5 @@
/*
-** $Id: lauxlib.c,v 1.21 1999/11/22 13:12:07 roberto Exp roberto $
+** $Id: lauxlib.c,v 1.22 1999/12/20 13:09:45 roberto Exp roberto $
** Auxiliary functions for building Lua libraries
** See Copyright Notice in lua.h
*/
@@ -9,7 +9,7 @@
#include <stdio.h>
#include <string.h>
-/* Please Notice: This file uses only the official API of Lua
+/* This file uses only the official API of Lua.
** Any function declared here could be written as an application function.
** With care, these functions can be used by other libraries.
*/
@@ -113,7 +113,7 @@ void luaL_verror (lua_State *L, const char *fmt, ...) {
}
-#define EXTRALEN 13 /* > strlen('string "..."\0') */
+#define EXTRALEN sizeof("string \"...\"0")
void luaL_chunkid (char *out, const char *source, int len) {
if (*source == '(') {
@@ -129,7 +129,7 @@ void luaL_chunkid (char *out, const char *source, int len) {
const char *b = strchr(source , '\n'); /* stop at first new line */
int lim = (b && (b-source)<len) ? b-source : len;
sprintf(out, "string \"%.*s\"", lim, source);
- strcpy(out+lim+(EXTRALEN-5), "...\""); /* 5 = strlen("...'\0") */
+ strcpy(out+lim+(EXTRALEN-sizeof("...\"0")), "...\"");
}
}
}
diff --git a/lbuiltin.c b/lbuiltin.c
index 51bea491..9b0e29fe 100644
--- a/lbuiltin.c
+++ b/lbuiltin.c
@@ -1,5 +1,5 @@
/*
-** $Id: lbuiltin.c,v 1.87 1999/12/23 18:19:57 roberto Exp roberto $
+** $Id: lbuiltin.c,v 1.88 1999/12/27 13:04:53 roberto Exp roberto $
** Built-in functions
** See Copyright Notice in lua.h
*/
@@ -94,16 +94,16 @@ static Hash *gettable (lua_State *L, int arg) {
** If your system does not support "stderr", redefine this function, or
** redefine _ERRORMESSAGE so that it won't need _ALERT.
*/
-void luaB_alert (lua_State *L) {
+void luaB__alert (lua_State *L) {
fputs(luaL_check_string(L, 1), stderr);
}
/*
** Standard implementation of _ERRORMESSAGE.
-** The library "iolib" redefines _ERRORMESSAGE for better error information.
+** The library `liolib' redefines _ERRORMESSAGE for better error information.
*/
-void luaB_ERRORMESSAGE (lua_State *L) {
+void luaB__ERRORMESSAGE (lua_State *L) {
lua_Object al = lua_rawgetglobal(L, "_ALERT");
if (lua_isfunction(L, al)) { /* avoid error loop if _ALERT is not defined */
char buff[600];
@@ -529,7 +529,7 @@ static void swap (lua_State *L, Hash *a, int i, int j) {
static int sort_comp (lua_State *L, lua_Object f, const TObject *a,
const TObject *b) {
- /* notice: the caller (auxsort) must check stack space */
+ /* WARNING: the caller (auxsort) must ensure stack space */
if (f != LUA_NOOBJECT) {
*(L->top) = *f;
*(L->top+1) = *a;
@@ -609,8 +609,8 @@ void luaB_sort (lua_State *L) {
static const struct luaL_reg builtin_funcs[] = {
- {"_ALERT", luaB_alert},
- {"_ERRORMESSAGE", luaB_ERRORMESSAGE},
+ {"_ALERT", luaB__alert},
+ {"_ERRORMESSAGE", luaB__ERRORMESSAGE},
{"call", luaB_call},
{"collectgarbage", luaB_collectgarbage},
{"copytagmethods", luaB_copytagmethods},
diff --git a/lbuiltin.h b/lbuiltin.h
index 0e42c138..e35b3ba4 100644
--- a/lbuiltin.h
+++ b/lbuiltin.h
@@ -1,5 +1,5 @@
/*
-** $Id: lbuiltin.h,v 1.2 1999/11/22 13:12:07 roberto Exp roberto $
+** $Id: lbuiltin.h,v 1.3 1999/12/14 18:33:29 roberto Exp roberto $
** Built-in functions
** See Copyright Notice in lua.h
*/
@@ -9,8 +9,8 @@
#include "lua.h"
-void luaB_alert (lua_State *L);
-void luaB_ERRORMESSAGE (lua_State *L);
+void luaB__alert (lua_State *L);
+void luaB__ERRORMESSAGE (lua_State *L);
void luaB_print (lua_State *L);
void luaB_tonumber (lua_State *L);
void luaB_error (lua_State *L);
diff --git a/ldo.c b/ldo.c
index 3fde714b..e4751e48 100644
--- a/ldo.c
+++ b/ldo.c
@@ -1,5 +1,5 @@
/*
-** $Id: ldo.c,v 1.59 1999/12/21 18:04:41 roberto Exp roberto $
+** $Id: ldo.c,v 1.60 1999/12/23 18:19:57 roberto Exp roberto $
** Stack and Call structure of Lua
** See Copyright Notice in lua.h
*/
@@ -56,7 +56,7 @@ void luaD_checkstack (lua_State *L, int n) {
else {
L->stack_last += EXTRA_STACK; /* to be used by error message */
if (lua_stackedfunction(L, L->stacksize/SLOTS_PER_F) == LUA_NOOBJECT) {
- /* too few funcs on stack: doesn't look like a rec. loop */
+ /* too few funcs on stack: doesn't look like a recursion loop */
lua_error(L, "Lua2C - C2Lua overflow");
}
else
@@ -253,14 +253,14 @@ static void message (lua_State *L, const char *s) {
}
/*
-** Reports an error, and jumps up to the available recover label
+** Reports an error, and jumps up to the available recovery label
*/
void lua_error (lua_State *L, const char *s) {
if (s) message(L, s);
if (L->errorJmp)
longjmp(L->errorJmp->b, 1);
else {
- message(L, "exit(1). Unable to recover.\n");
+ message(L, "unable to recover. exiting.\n");
exit(1);
}
}
diff --git a/lfunc.c b/lfunc.c
index 46325dea..d01025a3 100644
--- a/lfunc.c
+++ b/lfunc.c
@@ -1,5 +1,5 @@
/*
-** $Id: lfunc.c,v 1.14 1999/11/10 15:39:35 roberto Exp roberto $
+** $Id: lfunc.c,v 1.15 1999/11/22 13:12:07 roberto Exp roberto $
** Auxiliary functions to manipulate prototypes and closures
** See Copyright Notice in lua.h
*/
@@ -61,7 +61,7 @@ void luaF_freeclosure (lua_State *L, Closure *c) {
/*
-** Look for n-th local variable at line "line" in function "func".
+** Look for n-th local variable at line `line' in function `func'.
** Returns NULL if not found.
*/
const char *luaF_getlocalname (const TProtoFunc *func,
diff --git a/lfunc.h b/lfunc.h
index a7ff5fc7..9b862b14 100644
--- a/lfunc.h
+++ b/lfunc.h
@@ -1,6 +1,6 @@
/*
-** $Id: lfunc.h,v 1.8 1999/10/14 19:46:57 roberto Exp roberto $
-** Lua Function structures
+** $Id: lfunc.h,v 1.9 1999/11/22 13:12:07 roberto Exp roberto $
+** Auxiliary functions to manipulate prototypes and closures
** See Copyright Notice in lua.h
*/
diff --git a/lgc.c b/lgc.c
index c119c29e..6fc73942 100644
--- a/lgc.c
+++ b/lgc.c
@@ -1,5 +1,5 @@
/*
-** $Id: lgc.c,v 1.37 1999/12/21 18:04:41 roberto Exp roberto $
+** $Id: lgc.c,v 1.38 1999/12/23 18:19:57 roberto Exp roberto $
** Garbage Collector
** See Copyright Notice in lua.h
*/
@@ -181,7 +181,7 @@ static void clear_global_list (lua_State *L, int limit) {
** with limit=MAX_INT, that means all elements.
*/
static void collectstring (lua_State *L, int limit) {
- TObject o; /* to call userdata 'gc' tag method */
+ TObject o; /* to call userdata `gc' tag method */
int i;
ttype(&o) = LUA_T_USERDATA;
clear_global_list(L, limit);
@@ -254,7 +254,7 @@ void luaC_collect (lua_State *L, int all) {
long lua_collectgarbage (lua_State *L, long limit) {
- unsigned long recovered = L->nblocks; /* to subtract nblocks after gc */
+ unsigned long recovered = L->nblocks; /* to subtract `nblocks' after gc */
markall(L);
luaR_invalidaterefs(L);
luaC_collect(L, 0);
diff --git a/llex.h b/llex.h
index fbdc875d..ffa53aa5 100644
--- a/llex.h
+++ b/llex.h
@@ -1,5 +1,5 @@
/*
-** $Id: llex.h,v 1.14 1999/08/16 20:52:00 roberto Exp roberto $
+** $Id: llex.h,v 1.15 1999/11/22 13:12:07 roberto Exp roberto $
** Lexical Analyzer
** See Copyright Notice in lua.h
*/
@@ -13,7 +13,7 @@
#define FIRST_RESERVED 260
-/* maximum length of a reserved word (+1 for terminal 0) */
+/* maximum length of a reserved word (+1 for final 0) */
#define TOKEN_LEN 15
@@ -34,7 +34,7 @@ enum RESERVED {
#define MAX_IFS 5 /* arbitrary limit */
#endif
-/* "ifstate" keeps the state of each nested $if the lexical is dealing with. */
+/* `ifState' keeps the state of each nested $if the lexical is dealing with. */
struct ifState {
int elsepart; /* true if it's in the $else part */
@@ -46,7 +46,7 @@ struct ifState {
typedef struct LexState {
int current; /* look ahead character */
int token; /* look ahead token */
- struct FuncState *fs; /* 'FuncState' is private for the parser */
+ struct FuncState *fs; /* `FuncState' is private for the parser */
struct lua_State *L;
union {
real r;
diff --git a/lmathlib.c b/lmathlib.c
index 6fc9f78f..ee53f52e 100644
--- a/lmathlib.c
+++ b/lmathlib.c
@@ -1,6 +1,6 @@
/*
-** $Id: lmathlib.c,v 1.21 1999/11/22 17:39:51 roberto Exp roberto $
-** Lua standard mathematical library
+** $Id: lmathlib.c,v 1.22 1999/12/14 18:31:20 roberto Exp roberto $
+** Standard mathematical library
** See Copyright Notice in lua.h
*/
@@ -147,7 +147,7 @@ static void math_random (lua_State *L) {
some systems (SunOS!) "rand()" may return a value larger than RAND_MAX */
double r = (double)(rand()%RAND_MAX) / (double)RAND_MAX;
if (lua_getparam(L, 1) == LUA_NOOBJECT) /* no arguments? */
- lua_pushnumber(L, r); /* real between 0 & 1 */
+ lua_pushnumber(L, r); /* real between 0 and 1 */
else {
int l, u; /* lower & upper limits */
if (lua_getparam(L, 2) == LUA_NOOBJECT) { /* only one argument? */
@@ -159,7 +159,7 @@ static void math_random (lua_State *L) {
u = luaL_check_int(L, 2);
}
luaL_arg_check(L, l<=u, 1, "interval is empty");
- lua_pushnumber(L, (int)(r*(u-l+1))+l); /* integer between l & u */
+ lua_pushnumber(L, (int)(r*(u-l+1))+l); /* integer between `l' and `u' */
}
}
diff --git a/lmem.c b/lmem.c
index 47c45156..349bf751 100644
--- a/lmem.c
+++ b/lmem.c
@@ -1,5 +1,5 @@
/*
-** $Id: lmem.c,v 1.21 1999/11/29 16:38:48 roberto Exp roberto $
+** $Id: lmem.c,v 1.22 1999/12/14 18:31:20 roberto Exp roberto $
** Interface to Memory Manager
** See Copyright Notice in lua.h
*/
@@ -49,7 +49,7 @@ void *luaM_realloc (lua_State *L, void *block, unsigned long size) {
if (s != size)
lua_error(L, "memory allocation error: block too big");
if (size == 0) {
- free(block); /* block may be NULL, that is OK for free */
+ free(block); /* block may be NULL; that is OK for free */
return NULL;
}
block = realloc(block, s);
diff --git a/lmem.h b/lmem.h
index 3d292885..e666c09c 100644
--- a/lmem.h
+++ b/lmem.h
@@ -1,5 +1,5 @@
/*
-** $Id: lmem.h,v 1.9 1999/08/16 20:52:00 roberto Exp roberto $
+** $Id: lmem.h,v 1.10 1999/11/22 13:12:07 roberto Exp roberto $
** Interface to Memory Manager
** See Copyright Notice in lua.h
*/
@@ -18,7 +18,7 @@
#define refEM "reference table overflow"
#define tableEM "table overflow"
#define memEM "not enough memory"
-#define arrEM "internal array bigger than `int' limit"
+#define arrEM "internal array larger than `int' limit"
void *luaM_realloc (lua_State *L, void *oldblock, unsigned long size);
void *luaM_growaux (lua_State *L, void *block, unsigned long nelems, int inc, int size,
diff --git a/lobject.h b/lobject.h
index 8f63a9e3..e971c85b 100644
--- a/lobject.h
+++ b/lobject.h
@@ -1,5 +1,5 @@
/*
-** $Id: lobject.h,v 1.40 1999/12/14 18:33:29 roberto Exp roberto $
+** $Id: lobject.h,v 1.41 1999/12/23 18:19:57 roberto Exp roberto $
** Type definitions for Lua objects
** See Copyright Notice in lua.h
*/
@@ -46,7 +46,7 @@ typedef unsigned char Byte; /* unsigned 8 bits */
#define MAX_INT (INT_MAX-2) /* maximum value of an int (-2 for safety) */
-/* convertion of pointer to int (for hashing only) */
+/* conversion of pointer to int (for hashing only) */
/* (the shift removes bits that are usually 0 because of alignment) */
#define IntPoint(L, p) (((unsigned int)(p)) >> 3)
@@ -65,10 +65,10 @@ typedef unsigned char Byte; /* unsigned 8 bits */
** grep "ORDER LUA_T"
*/
typedef enum {
- LUA_T_USERDATA = 0, /* tag default for userdata */
+ LUA_T_USERDATA = 0, /* default tag for userdata */
LUA_T_NUMBER = -1, /* fixed tag for numbers */
LUA_T_STRING = -2, /* fixed tag for strings */
- LUA_T_ARRAY = -3, /* tag default for tables (or arrays) */
+ LUA_T_ARRAY = -3, /* default tag for tables (or arrays) */
LUA_T_LPROTO = -4, /* fixed tag for Lua functions */
LUA_T_CPROTO = -5, /* fixed tag for C functions */
LUA_T_NIL = -6, /* last "pre-defined" tag */
@@ -84,7 +84,7 @@ typedef enum {
#define NUM_TAGS 7
/*
-** chech whether t is a mark; ttypes are negative numbers, so the
+** chech whether `t' is a mark; ttypes are negative numbers, so the
** comparisons look reversed. (ORDER LUA_T)
*/
#define is_T_MARK(t) (LUA_T_CMARK <= (t) && (t) <= LUA_T_LCLMARK)
@@ -181,7 +181,7 @@ typedef struct LocVar {
typedef struct Closure {
struct Closure *next;
int marked;
- int nelems; /* not included the first one (always the prototype) */
+ int nelems; /* not including the first one (always the prototype) */
TObject consts[1]; /* at least one for prototype */
} Closure;
diff --git a/lopcodes.h b/lopcodes.h
index f6e81bff..f44b5f76 100644
--- a/lopcodes.h
+++ b/lopcodes.h
@@ -1,5 +1,5 @@
/*
-** $Id: lopcodes.h,v 1.33 1999/06/17 17:04:03 roberto Exp roberto $
+** $Id: lopcodes.h,v 1.34 1999/11/25 18:59:43 roberto Exp roberto $
** Opcodes for Lua virtual machine
** See Copyright Notice in lua.h
*/
@@ -121,7 +121,7 @@ LONGARG /* b (add b*(1<<16) to arg of next instruction) */
#define MAX_ARG ((1<<24)-1)
#endif
-/* maximum value of a word of 2 bytes; cannot be bigger than MAX_ARG */
+/* maximum value of a word of 2 bytes; cannot be larger than MAX_ARG */
#if MAX_ARG < (1<<16)
#define MAX_WORD MAX_ARG
#else
diff --git a/lref.c b/lref.c
index 2b24ecd3..879f25d7 100644
--- a/lref.c
+++ b/lref.c
@@ -1,6 +1,6 @@
/*
-** $Id: lref.c,v 1.4 1999/12/14 18:31:20 roberto Exp roberto $
-** REF mechanism
+** $Id: lref.c,v 1.5 1999/12/23 18:19:57 roberto Exp roberto $
+** reference mechanism
** See Copyright Notice in lua.h
*/
diff --git a/lref.h b/lref.h
index af4a1431..1d140d38 100644
--- a/lref.h
+++ b/lref.h
@@ -1,6 +1,6 @@
/*
-** $Id: lref.h,v 1.3 1999/11/22 13:12:07 roberto Exp roberto $
-** REF mechanism
+** $Id: lref.h,v 1.4 1999/12/14 18:33:29 roberto Exp roberto $
+** reference mechanism
** See Copyright Notice in lua.h
*/
diff --git a/lstate.h b/lstate.h
index 8364dc45..c4c8271e 100644
--- a/lstate.h
+++ b/lstate.h
@@ -1,5 +1,5 @@
/*
-** $Id: lstate.h,v 1.25 1999/12/06 11:41:28 roberto Exp roberto $
+** $Id: lstate.h,v 1.26 1999/12/21 18:04:41 roberto Exp roberto $
** Global State
** See Copyright Notice in lua.h
*/
@@ -19,7 +19,7 @@ typedef TObject *StkId; /* index to stack elements */
/*
-** "jmp_buf" may be an array, so it is better to make sure it has an
+** `jmp_buf' may be an array, so it is better to make sure it has an
** address (and not that it *is* an address...)
*/
struct lua_longjmp {
@@ -74,7 +74,7 @@ struct lua_State {
int refSize; /* size of refArray */
int refFree; /* list of free positions in refArray */
unsigned long GCthreshold;
- unsigned long nblocks; /* number of 'blocks' currently allocated */
+ unsigned long nblocks; /* number of `blocks' currently allocated */
int debug;
lua_CHFunction callhook;
lua_LHFunction linehook;
diff --git a/lstrlib.c b/lstrlib.c
index 4f67a72c..c724d076 100644
--- a/lstrlib.c
+++ b/lstrlib.c
@@ -1,6 +1,6 @@
/*
-** $Id: lstrlib.c,v 1.37 1999/11/22 13:12:07 roberto Exp roberto $
-** Standard library for strings and pattern-matching
+** $Id: lstrlib.c,v 1.38 1999/11/22 17:39:51 roberto Exp roberto $
+** Standard library for string operations and pattern-matching
** See Copyright Notice in lua.h
*/
diff --git a/ltests.c b/ltests.c
index bb7791f4..8a57fcd9 100644
--- a/ltests.c
+++ b/ltests.c
@@ -1,5 +1,5 @@
/*
-** $Id: ltests.c,v 1.1 1999/12/14 18:31:20 roberto Exp roberto $
+** $Id: ltests.c,v 1.2 1999/12/23 18:19:57 roberto Exp roberto $
** Internal Module for Debugging of the Lua Implementation
** See Copyright Notice in lua.h
*/
@@ -163,7 +163,7 @@ static void testC (lua_State *L) {
}
else if EQ("getparam") {
int n = getreg(L, &pc);
- reg[n] = lua_getparam(L, getnum(&pc)+1); /* skips the commmand itself */
+ reg[n] = lua_getparam(L, getnum(&pc)+1); /* skips the command itself */
}
else if EQ("getresult") {
int n = getreg(L, &pc);
diff --git a/lvm.c b/lvm.c
index d185b32b..45bc6616 100644
--- a/lvm.c
+++ b/lvm.c
@@ -1,5 +1,5 @@
/*
-** $Id: lvm.c,v 1.74 1999/12/21 18:04:41 roberto Exp roberto $
+** $Id: lvm.c,v 1.75 1999/12/23 18:19:57 roberto Exp roberto $
** Lua virtual machine
** See Copyright Notice in lua.h
*/
@@ -135,21 +135,21 @@ void luaV_gettable (lua_State *L) {
*/
void luaV_settable (lua_State *L, StkId t) {
const TObject *im;
- if (ttype(t) != LUA_T_ARRAY) { /* not a table, get "settable" method */
+ if (ttype(t) != LUA_T_ARRAY) { /* not a table, get `settable' method */
im = luaT_getimbyObj(L, t, IM_SETTABLE);
if (ttype(im) == LUA_T_NIL)
lua_error(L, "indexed expression not a table");
}
else { /* object is a table... */
im = luaT_getim(L, avalue(t)->htag, IM_SETTABLE);
- if (ttype(im) == LUA_T_NIL) { /* and does not have a "settable" method */
+ if (ttype(im) == LUA_T_NIL) { /* and does not have a `settable' method */
luaH_set(L, avalue(t), t+1, L->top-1);
L->top--; /* pop value */
return;
}
- /* else it has a "settable" method, go through to next command */
+ /* else it has a `settable' method, go through to next command */
}
- /* object is not a table, or it has a "settable" method */
+ /* object is not a table, or it has a `settable' method */
/* prepare arguments and call the tag method */
*(L->top+1) = *(L->top-1);
*(L->top) = *(t+1);
@@ -210,7 +210,7 @@ static void call_binTM (lua_State *L, StkId top, IMS event, const char *msg) {
if (ttype(im) == LUA_T_NIL) {
im = luaT_getimbyObj(L, top-1, event); /* try second operand */
if (ttype(im) == LUA_T_NIL) {
- im = luaT_getim(L, 0, event); /* try a 'global' i.m. */
+ im = luaT_getim(L, 0, event); /* try a `global' method */
if (ttype(im) == LUA_T_NIL)
lua_error(L, msg);
}
@@ -603,7 +603,7 @@ StkId luaV_execute (lua_State *L, const Closure *cl, const TProtoFunc *tf,
case LONGARGW: aux += highbyte(L, *pc++);
case LONGARG: aux += *pc++;
aux = highbyte(L, highbyte(L, aux));
- goto switchentry; /* do not reset "aux" */
+ goto switchentry; /* do not reset `aux' */
}
}