** Writes the message and handle 'tocont', finishing the message ** if needed and setting the next warn function. */
| 1065 | ** if needed and setting the next warn function. |
| 1066 | */ |
| 1067 | static void warnfcont (void *ud, const char *message, int tocont) { |
| 1068 | lua_State *L = (lua_State *)ud; |
| 1069 | lua_writestringerror("%s", message); /* write message */ |
| 1070 | if (tocont) /* not the last part? */ |
| 1071 | lua_setwarnf(L, warnfcont, L); /* to be continued */ |
| 1072 | else { /* last part */ |
| 1073 | lua_writestringerror("%s", "\n"); /* finish message with end-of-line */ |
| 1074 | lua_setwarnf(L, warnfon, L); /* next call is a new message */ |
| 1075 | } |
| 1076 | } |
| 1077 | |
| 1078 | |
| 1079 | static void warnfon (void *ud, const char *message, int tocont) { |
no test coverage detected