** add length modifier into formats */
| 880 | ** add length modifier into formats |
| 881 | */ |
| 882 | static void addlenmod (char *form, const char *lenmod) { |
| 883 | size_t l = strlen(form); |
| 884 | size_t lm = strlen(lenmod); |
| 885 | char spec = form[l - 1]; |
| 886 | strcpy(form + l - 1, lenmod); |
| 887 | form[l + lm - 1] = spec; |
| 888 | form[l + lm] = '\0'; |
| 889 | } |
| 890 | |
| 891 | |
| 892 | static int str_format (lua_State *L) { |