summaryrefslogtreecommitdiff
path: root/lstrlib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1998-06-19 13:14:09 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1998-06-19 13:14:09 -0300
commit9618aaf07d0d82ccbac91db22cb42451ec17d7ed (patch)
tree199314fbf7462d174921c71af389da14b4f6c595 /lstrlib.c
parentbec9bc4154e54fbc19b134874f6301f1e4654d5d (diff)
downloadlua-9618aaf07d0d82ccbac91db22cb42451ec17d7ed.tar.gz
lua-9618aaf07d0d82ccbac91db22cb42451ec17d7ed.tar.bz2
lua-9618aaf07d0d82ccbac91db22cb42451ec17d7ed.zip
small corrections in comments
Diffstat (limited to 'lstrlib.c')
-rw-r--r--lstrlib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lstrlib.c b/lstrlib.c
index a42a6118..58fbd708 100644
--- a/lstrlib.c
+++ b/lstrlib.c
@@ -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++) {