aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-12-18 11:41:41 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-12-18 11:41:41 -0200
commitcce8ebd30680947dbf52051752c03d0e0d7cdb44 (patch)
treeda089bf2525d3c1126a6d6221ec56d561cdca4f1
parent4894c2796277b47b0ffc8983e8231d2cc95ee09b (diff)
downloadlua-cce8ebd30680947dbf52051752c03d0e0d7cdb44.tar.gz
lua-cce8ebd30680947dbf52051752c03d0e0d7cdb44.tar.bz2
lua-cce8ebd30680947dbf52051752c03d0e0d7cdb44.zip
obsolete `format' option (d$).
-rw-r--r--lstrlib.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/lstrlib.c b/lstrlib.c
index 3eba827d..5db499dd 100644
--- a/lstrlib.c
+++ b/lstrlib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lstrlib.c,v 1.58 2000/11/24 17:39:56 roberto Exp roberto $ 2** $Id: lstrlib.c,v 1.59 2000/12/04 14:43:06 roberto Exp roberto $
3** Standard library for string operations and pattern-matching 3** Standard library for string operations and pattern-matching
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -585,10 +585,8 @@ static int str_format (lua_State *L) {
585 char form[MAX_FORMAT]; /* to store the format (`%...') */ 585 char form[MAX_FORMAT]; /* to store the format (`%...') */
586 char buff[MAX_ITEM]; /* to store the formatted item */ 586 char buff[MAX_ITEM]; /* to store the formatted item */
587 int hasprecision = 0; 587 int hasprecision = 0;
588 if (isdigit((unsigned char)*strfrmt) && *(strfrmt+1) == '$') { 588 if (isdigit((unsigned char)*strfrmt) && *(strfrmt+1) == '$')
589 arg = *strfrmt - '0'; 589 lua_error(L, "obsolete `format' option (d$)");
590 strfrmt += 2; /* skip the `n$' */
591 }
592 arg++; 590 arg++;
593 strfrmt = scanformat(L, strfrmt, form, &hasprecision); 591 strfrmt = scanformat(L, strfrmt, form, &hasprecision);
594 switch (*strfrmt++) { 592 switch (*strfrmt++) {