| 12367 | |
| 12368 | |
| 12369 | static int f_setvbuf (lua_State *L) { |
| 12370 | static const int mode[] = {_IONBF, _IOFBF, _IOLBF}; |
| 12371 | static const char *const modenames[] = {"no", "full", "line", NULL}; |
| 12372 | FILE *f = tofile(L); |
| 12373 | int op = luaL_checkoption(L, 2, NULL, modenames); |
| 12374 | lua_Integer sz = luaL_optinteger(L, 3, LUAL_BUFFERSIZE); |
| 12375 | int res = setvbuf(f, NULL, mode[op], sz); |
| 12376 | return pushresult(L, res == 0, NULL); |
| 12377 | } |
| 12378 | |
| 12379 | |
| 12380 |
nothing calls this directly
no test coverage detected