diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-12-18 11:41:41 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-12-18 11:41:41 -0200 |
commit | cce8ebd30680947dbf52051752c03d0e0d7cdb44 (patch) | |
tree | da089bf2525d3c1126a6d6221ec56d561cdca4f1 | |
parent | 4894c2796277b47b0ffc8983e8231d2cc95ee09b (diff) | |
download | lua-cce8ebd30680947dbf52051752c03d0e0d7cdb44.tar.gz lua-cce8ebd30680947dbf52051752c03d0e0d7cdb44.tar.bz2 lua-cce8ebd30680947dbf52051752c03d0e0d7cdb44.zip |
obsolete `format' option (d$).
-rw-r--r-- | lstrlib.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -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++) { |