Lines Matching refs:form
868 static const char *scanformat (lua_State *L, const char *strfrmt, char *form) { in scanformat() argument
882 *(form++) = '%'; in scanformat()
883 memcpy(form, strfrmt, (p - strfrmt + 1) * sizeof(char)); in scanformat()
884 form += p - strfrmt + 1; in scanformat()
885 *form = '\0'; in scanformat()
893 static void addlenmod (char *form, const char *lenmod, size_t size) { in addlenmod() argument
894 size_t l = strlen(form); in addlenmod()
896 char spec = form[l - 1]; in addlenmod()
897 strlcpy(form + l - 1, lenmod, size - (l - 1)); in addlenmod()
898 form[l + lm - 1] = spec; in addlenmod()
899 form[l + lm] = '\0'; in addlenmod()
917 char form[MAX_FORMAT]; /* to store the format (`%...') */ in str_format() local
922 strfrmt = scanformat(L, strfrmt, form); in str_format()
925 nb = str_sprintf(buff, form, luaL_checkint(L, arg)); in str_format()
934 addlenmod(form, LUA_INTFRMLEN, MAX_FORMAT); in str_format()
935 nb = str_sprintf(buff, form, ni); in str_format()
944 addlenmod(form, LUA_INTFRMLEN, MAX_FORMAT); in str_format()
945 nb = str_sprintf(buff, form, ni); in str_format()
954 addlenmod(form, LUA_FLTFRMLEN, MAX_FORMAT); in str_format()
955 nb = str_sprintf(buff, form, (LUA_FLTFRM_T)luaL_checknumber(L, arg)); in str_format()
966 if (!strchr(form, '.') && l >= 100) { in str_format()
973 nb = str_sprintf(buff, form, s); in str_format()