diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-12-10 17:03:46 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-12-10 17:03:46 -0200 |
| commit | af119c8b55f15910df17e02633d8a5ca656b209a (patch) | |
| tree | 74c0e645490a9114a3f3e81108ac8627e2e184d8 /lstrlib.c | |
| parent | 1aead7f5536c92cfbd1dd7dbb51f5ac95f239e14 (diff) | |
| download | lua-af119c8b55f15910df17e02633d8a5ca656b209a.tar.gz lua-af119c8b55f15910df17e02633d8a5ca656b209a.tar.bz2 lua-af119c8b55f15910df17e02633d8a5ca656b209a.zip | |
official support for floating hexa numerals
Diffstat (limited to 'lstrlib.c')
| -rw-r--r-- | lstrlib.c | 5 |
1 files changed, 4 insertions, 1 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lstrlib.c,v 1.158 2010/11/16 20:39:41 roberto Exp roberto $ | 2 | ** $Id: lstrlib.c,v 1.159 2010/11/19 16:25:51 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 | */ |
| @@ -861,6 +861,9 @@ static int str_format (lua_State *L) { | |||
| 861 | break; | 861 | break; |
| 862 | } | 862 | } |
| 863 | case 'e': case 'E': case 'f': | 863 | case 'e': case 'E': case 'f': |
| 864 | #if defined(LUA_USE_AFORMAT) | ||
| 865 | case 'a': case 'A': | ||
| 866 | #endif | ||
| 864 | case 'g': case 'G': { | 867 | case 'g': case 'G': { |
| 865 | addlenmod(form, LUA_FLTFRMLEN); | 868 | addlenmod(form, LUA_FLTFRMLEN); |
| 866 | nb = sprintf(buff, form, (LUA_FLTFRM_T)luaL_checknumber(L, arg)); | 869 | nb = sprintf(buff, form, (LUA_FLTFRM_T)luaL_checknumber(L, arg)); |
