** add length modifier into formats */
| 1011 | ** add length modifier into formats |
| 1012 | */ |
| 1013 | static void addlenmod (char *form, const char *lenmod) { |
| 1014 | size_t l = strlen(form); |
| 1015 | size_t lm = strlen(lenmod); |
| 1016 | char spec = form[l - 1]; |
| 1017 | strcpy(form + l - 1, lenmod); |
| 1018 | form[l + lm - 1] = spec; |
| 1019 | form[l + lm] = '\0'; |
| 1020 | } |
| 1021 | |
| 1022 | |
| 1023 | static int str_format (lua_State *L) { |