** add length modifier into formats */
| 1215 | ** add length modifier into formats |
| 1216 | */ |
| 1217 | static void addlenmod (char *form, const char *lenmod) { |
| 1218 | size_t l = strlen(form); |
| 1219 | size_t lm = strlen(lenmod); |
| 1220 | char spec = form[l - 1]; |
| 1221 | strcpy(form + l - 1, lenmod); |
| 1222 | form[l + lm - 1] = spec; |
| 1223 | form[l + lm] = '\0'; |
| 1224 | } |
| 1225 | |
| 1226 | |
| 1227 | static int str_format (lua_State *L) { |