Lines Matching refs:form

1192 static const char *scanformat (lua_State *L, const char *strfrmt, char *form) {  in scanformat()  argument
1206 *(form++) = '%'; in scanformat()
1207 memcpy(form, strfrmt, ((p - strfrmt) + 1) * sizeof(char)); in scanformat()
1208 form += (p - strfrmt) + 1; in scanformat()
1209 *form = '\0'; in scanformat()
1217 static void addlenmod (char *form, const char *lenmod) { in addlenmod() argument
1218 size_t l = strlen(form); in addlenmod()
1220 char spec = form[l - 1]; in addlenmod()
1221 strcpy(form + l - 1, lenmod); in addlenmod()
1222 form[l + lm - 1] = spec; in addlenmod()
1223 form[l + lm] = '\0'; in addlenmod()
1241 char form[MAX_FORMAT]; /* to store the format ('%...') */ in str_format() local
1247 strfrmt = scanformat(L, strfrmt, form); in str_format()
1250 nb = l_sprintf(buff, maxitem, form, (int)luaL_checkinteger(L, arg)); in str_format()
1256 addlenmod(form, LUA_INTEGER_FRMLEN); in str_format()
1257 nb = l_sprintf(buff, maxitem, form, (LUAI_UACINT)n); in str_format()
1261 addlenmod(form, LUA_NUMBER_FRMLEN); in str_format()
1262 nb = lua_number2strx(L, buff, maxitem, form, in str_format()
1271 addlenmod(form, LUA_NUMBER_FRMLEN); in str_format()
1272 nb = l_sprintf(buff, maxitem, form, (LUAI_UACNUMBER)n); in str_format()
1279 form[strlen(form) - 1] = 's'; /* format it as a string */ in str_format()
1281 nb = l_sprintf(buff, maxitem, form, p); in str_format()
1285 if (form[2] != '\0') /* modifiers? */ in str_format()
1293 if (form[2] == '\0') /* no modifiers? */ in str_format()
1297 if (!strchr(form, '.') && l >= 100) { in str_format()
1302 nb = l_sprintf(buff, maxitem, form, s); in str_format()
1309 return luaL_error(L, "invalid conversion '%s' to 'format'", form); in str_format()