diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1998-06-19 13:14:09 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1998-06-19 13:14:09 -0300 |
| commit | 9618aaf07d0d82ccbac91db22cb42451ec17d7ed (patch) | |
| tree | 199314fbf7462d174921c71af389da14b4f6c595 | |
| parent | bec9bc4154e54fbc19b134874f6301f1e4654d5d (diff) | |
| download | lua-9618aaf07d0d82ccbac91db22cb42451ec17d7ed.tar.gz lua-9618aaf07d0d82ccbac91db22cb42451ec17d7ed.tar.bz2 lua-9618aaf07d0d82ccbac91db22cb42451ec17d7ed.zip | |
small corrections in comments
| -rw-r--r-- | lapi.h | 4 | ||||
| -rw-r--r-- | lauxlib.c | 6 | ||||
| -rw-r--r-- | lauxlib.h | 4 | ||||
| -rw-r--r-- | lbuffer.c | 6 | ||||
| -rw-r--r-- | lbuiltin.c | 4 | ||||
| -rw-r--r-- | lfunc.c | 4 | ||||
| -rw-r--r-- | llex.h | 4 | ||||
| -rw-r--r-- | lmathlib.c | 4 | ||||
| -rw-r--r-- | lmem.c | 4 | ||||
| -rw-r--r-- | lobject.c | 4 | ||||
| -rw-r--r-- | lstate.h | 4 | ||||
| -rw-r--r-- | lstring.c | 4 | ||||
| -rw-r--r-- | lstrlib.c | 6 | ||||
| -rw-r--r-- | luadebug.h | 4 | ||||
| -rw-r--r-- | lualib.h | 4 |
15 files changed, 33 insertions, 33 deletions
| @@ -1,6 +1,6 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: $ | 2 | ** $Id: lapi.h,v 1.1 1997/09/16 19:25:59 roberto Exp roberto $ |
| 3 | ** auxiliar functions from Lua API | 3 | ** Auxiliary functions from Lua API |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| 6 | 6 | ||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lauxlib.c,v 1.10 1998/03/06 18:47:42 roberto Exp roberto $ | 2 | ** $Id: lauxlib.c,v 1.11 1998/06/18 16:57:03 roberto Exp roberto $ |
| 3 | ** Auxiliar functions for building Lua libraries | 3 | ** Auxiliary functions for building Lua libraries |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| 6 | 6 | ||
| @@ -9,7 +9,7 @@ | |||
| 9 | #include <stdio.h> | 9 | #include <stdio.h> |
| 10 | #include <string.h> | 10 | #include <string.h> |
| 11 | 11 | ||
| 12 | /* Please Notice: This file uses only the oficial API of Lua | 12 | /* Please Notice: This file uses only the official API of Lua |
| 13 | ** Any function declared here could be written as an application | 13 | ** Any function declared here could be written as an application |
| 14 | ** function. With care, these functions can be used by other libraries. | 14 | ** function. With care, these functions can be used by other libraries. |
| 15 | */ | 15 | */ |
| @@ -1,6 +1,6 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lauxlib.h,v 1.7 1998/03/06 16:54:42 roberto Exp roberto $ | 2 | ** $Id: lauxlib.h,v 1.8 1998/06/18 16:57:03 roberto Exp roberto $ |
| 3 | ** Auxiliar functions for building Lua libraries | 3 | ** Auxiliary functions for building Lua libraries |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| 6 | 6 | ||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lbuffer.c,v 1.2 1998/03/06 16:54:42 roberto Exp roberto $ | 2 | ** $Id: lbuffer.c,v 1.3 1998/06/02 20:37:04 roberto Exp roberto $ |
| 3 | ** Auxiliar functions for building Lua libraries | 3 | ** Auxiliary functions for building Lua libraries |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| 6 | 6 | ||
| @@ -13,7 +13,7 @@ | |||
| 13 | 13 | ||
| 14 | 14 | ||
| 15 | /*------------------------------------------------------- | 15 | /*------------------------------------------------------- |
| 16 | ** Auxiliar buffer | 16 | ** Auxiliary buffer |
| 17 | -------------------------------------------------------*/ | 17 | -------------------------------------------------------*/ |
| 18 | 18 | ||
| 19 | #define BUFF_STEP 32 | 19 | #define BUFF_STEP 32 |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lbuiltin.c,v 1.28 1998/05/31 22:19:35 roberto Exp roberto $ | 2 | ** $Id: lbuiltin.c,v 1.29 1998/06/05 22:17:44 roberto Exp roberto $ |
| 3 | ** Built-in functions | 3 | ** Built-in functions |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -200,7 +200,7 @@ static void luaI_type (void) | |||
| 200 | static void tonumber (void) | 200 | static void tonumber (void) |
| 201 | { | 201 | { |
| 202 | int base = luaL_opt_number(2, 10); | 202 | int base = luaL_opt_number(2, 10); |
| 203 | if (base == 10) { /* standard convertion */ | 203 | if (base == 10) { /* standard conversion */ |
| 204 | lua_Object o = lua_getparam(1); | 204 | lua_Object o = lua_getparam(1); |
| 205 | if (lua_isnumber(o)) | 205 | if (lua_isnumber(o)) |
| 206 | lua_pushnumber(lua_getnumber(o)); | 206 | lua_pushnumber(lua_getnumber(o)); |
| @@ -1,6 +1,6 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lfunc.c,v 1.7 1997/12/09 13:35:19 roberto Exp roberto $ | 2 | ** $Id: lfunc.c,v 1.8 1997/12/15 16:17:20 roberto Exp roberto $ |
| 3 | ** Auxiliar functions to manipulate prototypes and closures | 3 | ** Auxiliary functions to manipulate prototypes and closures |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| 6 | 6 | ||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: llex.h,v 1.7 1998/01/09 14:57:43 roberto Exp $ | 2 | ** $Id: llex.h,v 1.8 1998/05/27 13:03:40 roberto Exp roberto $ |
| 3 | ** Lexical Analizer | 3 | ** Lexical Analizer |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -32,7 +32,7 @@ enum RESERVED { | |||
| 32 | struct ifState { | 32 | struct ifState { |
| 33 | int elsepart; /* true if its in the $else part */ | 33 | int elsepart; /* true if its in the $else part */ |
| 34 | int condition; /* true if $if condition is true */ | 34 | int condition; /* true if $if condition is true */ |
| 35 | int skip; /* true if part must be skiped */ | 35 | int skip; /* true if part must be skipped */ |
| 36 | }; | 36 | }; |
| 37 | 37 | ||
| 38 | 38 | ||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lmathlib.c,v 1.8 1997/12/26 18:36:31 roberto Exp roberto $ | 2 | ** $Id: lmathlib.c,v 1.9 1998/05/27 19:09:39 roberto Exp roberto $ |
| 3 | ** Lua standard mathematical library | 3 | ** Lua standard mathematical library |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -155,7 +155,7 @@ static void math_max (void) | |||
| 155 | 155 | ||
| 156 | static void math_random (void) | 156 | static void math_random (void) |
| 157 | { | 157 | { |
| 158 | /* the '%' is needed because on some sistems (SunOS!) "rand()" may */ | 158 | /* the '%' is needed because on some systems (SunOS!) "rand()" may */ |
| 159 | /* return a value bigger than RAND_MAX... */ | 159 | /* return a value bigger than RAND_MAX... */ |
| 160 | double r = (double)(rand()%RAND_MAX) / (double)RAND_MAX; | 160 | double r = (double)(rand()%RAND_MAX) / (double)RAND_MAX; |
| 161 | double l = luaL_opt_number(1, 0); | 161 | double l = luaL_opt_number(1, 0); |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lmem.c,v 1.4 1997/12/17 20:48:58 roberto Exp roberto $ | 2 | ** $Id: lmem.c,v 1.5 1998/03/09 21:49:52 roberto Exp roberto $ |
| 3 | ** Interface to Memory Manager | 3 | ** Interface to Memory Manager |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -83,7 +83,7 @@ void *luaM_realloc (void *block, unsigned long size) | |||
| 83 | unsigned long realsize = sizeof(unsigned long)+size+sizeof(char); | 83 | unsigned long realsize = sizeof(unsigned long)+size+sizeof(char); |
| 84 | if (realsize != (size_t)realsize) | 84 | if (realsize != (size_t)realsize) |
| 85 | lua_error("Allocation Error: Block too big"); | 85 | lua_error("Allocation Error: Block too big"); |
| 86 | if (size == 0) { /* ANSI doen't need this, but some machines... */ | 86 | if (size == 0) { /* ANSI dosen't need this, but some machines... */ |
| 87 | if (block) { | 87 | if (block) { |
| 88 | memset(block, -1, *((unsigned long *)block-1)); /* erase block */ | 88 | memset(block, -1, *((unsigned long *)block-1)); /* erase block */ |
| 89 | block = checkblock(block); | 89 | block = checkblock(block); |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lobject.c,v 1.11 1998/03/09 21:49:52 roberto Exp roberto $ | 2 | ** $Id: lobject.c,v 1.12 1998/06/18 16:57:03 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 | */ |
| @@ -52,7 +52,7 @@ int luaO_equalObj (TObject *t1, TObject *t2) | |||
| 52 | case LUA_T_CLOSURE: return t1->value.cl == t2->value.cl; | 52 | case LUA_T_CLOSURE: return t1->value.cl == t2->value.cl; |
| 53 | default: | 53 | default: |
| 54 | LUA_INTERNALERROR("invalid type"); | 54 | LUA_INTERNALERROR("invalid type"); |
| 55 | return 0; /* UNREACHEABLE */ | 55 | return 0; /* UNREACHABLE */ |
| 56 | } | 56 | } |
| 57 | } | 57 | } |
| 58 | 58 | ||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lstate.h,v 1.8 1998/05/27 13:03:40 roberto Exp roberto $ | 2 | ** $Id: lstate.h,v 1.9 1998/06/02 20:37:04 roberto Exp roberto $ |
| 3 | ** Global State | 3 | ** Global State |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -46,7 +46,7 @@ struct ref { | |||
| 46 | 46 | ||
| 47 | 47 | ||
| 48 | struct lua_State { | 48 | struct lua_State { |
| 49 | /* trhead-specific state */ | 49 | /* thread-specific state */ |
| 50 | struct Stack stack; /* Lua stack */ | 50 | struct Stack stack; /* Lua stack */ |
| 51 | struct C_Lua_Stack Cstack; /* C2lua struct */ | 51 | struct C_Lua_Stack Cstack; /* C2lua struct */ |
| 52 | void *errorJmp; /* current error recover point */ | 52 | void *errorJmp; /* current error recover point */ |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lstring.c,v 1.11 1998/01/28 16:50:33 roberto Exp roberto $ | 2 | ** $Id: lstring.c,v 1.12 1998/03/06 16:54:42 roberto Exp roberto $ |
| 3 | ** String table (keeps all strings handled by Lua) | 3 | ** String table (keeps all strings handled by Lua) |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -258,7 +258,7 @@ TaggedString *luaS_collectudata (void) | |||
| 258 | for (j=0; j<tb->size; j++) { | 258 | for (j=0; j<tb->size; j++) { |
| 259 | TaggedString *t = tb->hash[j]; | 259 | TaggedString *t = tb->hash[j]; |
| 260 | if (t == NULL || t == &EMPTY || t->constindex != -1) | 260 | if (t == NULL || t == &EMPTY || t->constindex != -1) |
| 261 | continue; /* get only user datas */ | 261 | continue; /* get only user data */ |
| 262 | t->head.next = (GCnode *)frees; | 262 | t->head.next = (GCnode *)frees; |
| 263 | frees = t; | 263 | frees = t; |
| 264 | tb->hash[j] = &EMPTY; | 264 | tb->hash[j] = &EMPTY; |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lstrlib.c,v 1.13 1998/05/18 22:21:55 roberto Exp roberto $ | 2 | ** $Id: lstrlib.c,v 1.14 1998/05/31 22:20:45 roberto Exp roberto $ |
| 3 | ** Standard library for strings and pattern-matching | 3 | ** Standard library for strings and pattern-matching |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -341,7 +341,7 @@ static void str_find (void) | |||
| 341 | struct Capture cap; | 341 | struct Capture cap; |
| 342 | luaL_arg_check(0 <= init && init <= l, 3, "out of range"); | 342 | luaL_arg_check(0 <= init && init <= l, 3, "out of range"); |
| 343 | if (lua_getparam(4) != LUA_NOOBJECT || | 343 | if (lua_getparam(4) != LUA_NOOBJECT || |
| 344 | strpbrk(p, SPECIALS) == NULL) { /* no special caracters? */ | 344 | strpbrk(p, SPECIALS) == NULL) { /* no special characters? */ |
| 345 | char *s2 = strstr(s+init, p); | 345 | char *s2 = strstr(s+init, p); |
| 346 | if (s2) { | 346 | if (s2) { |
| 347 | lua_pushnumber(s2-s+1); | 347 | lua_pushnumber(s2-s+1); |
| @@ -483,7 +483,7 @@ static void str_format (void) | |||
| 483 | strfrmt = match(initf, "[-+ #0]*(%d*)%.?(%d*)", &cap); | 483 | strfrmt = match(initf, "[-+ #0]*(%d*)%.?(%d*)", &cap); |
| 484 | if (cap.capture[0].len > 2 || cap.capture[1].len > 2) /* < 100? */ | 484 | if (cap.capture[0].len > 2 || cap.capture[1].len > 2) /* < 100? */ |
| 485 | lua_error("invalid format (width or precision too long)"); | 485 | lua_error("invalid format (width or precision too long)"); |
| 486 | strncpy(form+1, initf, strfrmt-initf+1); /* +1 to include convertion */ | 486 | strncpy(form+1, initf, strfrmt-initf+1); /* +1 to include conversion */ |
| 487 | form[strfrmt-initf+2] = 0; | 487 | form[strfrmt-initf+2] = 0; |
| 488 | buff = luaL_openspace(1000); /* to store the formatted value */ | 488 | buff = luaL_openspace(1000); /* to store the formatted value */ |
| 489 | switch (*strfrmt++) { | 489 | switch (*strfrmt++) { |
| @@ -1,6 +1,6 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: $ | 2 | ** $Id: luadebug.h,v 1.1 1997/09/16 19:25:59 roberto Exp roberto $ |
| 3 | ** Debuging API | 3 | ** Debugging API |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| 6 | 6 | ||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lualib.h,v 1.2 1997/11/26 18:53:45 roberto Exp roberto $ | 2 | ** $Id: lualib.h,v 1.3 1997/12/17 20:48:58 roberto Exp roberto $ |
| 3 | ** Lua standard libraries | 3 | ** Lua standard libraries |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -26,7 +26,7 @@ void lua_mathlibopen (void); | |||
| 26 | 26 | ||
| 27 | 27 | ||
| 28 | 28 | ||
| 29 | /* auxiliar functions (private) */ | 29 | /* Auxiliary functions (private) */ |
| 30 | 30 | ||
| 31 | int luaI_singlematch (int c, char *p, char **ep); | 31 | int luaI_singlematch (int c, char *p, char **ep); |
| 32 | 32 | ||
