diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-06-28 11:45:44 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-06-28 11:45:44 -0300 |
commit | 61a036eaa5918bdf5d7f01443b43288030337d20 (patch) | |
tree | 36d337a57e9aaec56c0d5612c2ad446335ffbcd5 /liolib.c | |
parent | 37f3a1c0452439bce1f5c2069ca015af148bf62f (diff) | |
download | lua-61a036eaa5918bdf5d7f01443b43288030337d20.tar.gz lua-61a036eaa5918bdf5d7f01443b43288030337d20.tar.bz2 lua-61a036eaa5918bdf5d7f01443b43288030337d20.zip |
new macro to control format for `read"*n"'
Diffstat (limited to 'liolib.c')
-rw-r--r-- | liolib.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: liolib.c,v 1.115 2001/06/08 16:48:32 roberto Exp roberto $ | 2 | ** $Id: liolib.c,v 1.116 2001/06/22 13:49:42 roberto Exp roberto $ |
3 | ** Standard I/O (and system) library | 3 | ** Standard I/O (and system) library |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -263,7 +263,7 @@ static int read_until (lua_State *L, FILE *f, const l_char *p, int pl) { | |||
263 | 263 | ||
264 | static int read_number (lua_State *L, FILE *f) { | 264 | static int read_number (lua_State *L, FILE *f) { |
265 | double d; | 265 | double d; |
266 | if (fscanf(f, l_s("%lf"), &d) == 1) { | 266 | if (fscanf(f, l_s(LUA_SCAN_NUMBER), &d) == 1) { |
267 | lua_pushnumber(L, d); | 267 | lua_pushnumber(L, d); |
268 | return 1; | 268 | return 1; |
269 | } | 269 | } |