lua-users home
lua-l archive

Re: luaL_loadfilex works fine only once per session under Windows.

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> The problem can be easily reproduced by a standalone lua.exe included in
> a distribution:
> 
> [...]
> 2. I/O operations DO NOT clear the EOF indicator, despite they return a
> valid, read characters.
Isn't this just a bug in libc? IIUC, in ANSI C, once the eof indicator
is set, any read should return EOF...
 7.19.3 Files
 
 11. [...] The byte input functions read characters from the stream as if
 by successive calls to the fgetc function.
 7.19.7.1 The fgetc function
 
 3. If the end-of-file indicator for the stream is set, or if the stream
 is at end-of-file, the end-of-file indicator for the stream is set and
 the fgetc function returns EOF.
-- Roberto

AltStyle によって変換されたページ (->オリジナル) /