Lines Matching defs:field

24  * - xo_do_format_field() -- handles formatting a single field
153 #define XSF_EMIT (1<<5) /* Some field has been emitted */
155 #define XSF_EMIT_LEAF_LIST (1<<7) /* A leaf-list field has been emitted */
287 #define XOIF_REORDER XOF_BIT(0) /* Reordering fields; record field info */
340 * A place to parse printf-style format flags for each field
345 unsigned char xf_skip; /* Skip this field */
361 * This structure represents the parsed field information, suitable for
370 xo_xff_flags_t xfi_flags; /* Flags for this field */
372 const char *xfi_start; /* Start of field in the format string */
377 ssize_t xfi_len; /* Length of field */
1324 * Retain: We retain parsed field definitions to enhance performance,
1473 /* Record the field info in the retain bucket */
3176 xo_failure(xop, "no comma in plural gettext field: '%s'", cp);
3182 "field: '%s'", cp);
3188 "field: '%s'", cp);
3305 * Interface to format a single field. The arguments are in xo_vap,
3333 * Since we're starting a new field, save the starting offset.
3334 * We'll need this later for field-related operations.
3371 * @X@ - XML-only field; ignored if style isn't XML
3446 xo_failure(xop, "field format missing format character: %s",
3492 * functions won't handle field widths for wide characters
3650 * Handle gettext()ing the field by looking up the value
3804 * given) or formats a field using a format string. If it's
3805 * encode_only, then we can't skip formatting the field, since it may
3823 * Html mode: append a <div> to the output buffer contain a field
3980 /* Don't show keys for the key field */
4210 * This means that it consists only of a single numeric field
4320 /* Emitting a 'k' (key) field */
4322 xo_failure(xop, "key field emitted after normal value field: '%.*s'",
4341 /* Emitting a normal value field */
4409 static char missing[] = "missing-field-name";
4410 xo_failure(xop, "missing field name: %s", fmt);
4500 static char missing[] = "missing-field-name";
4501 xo_failure(xop, "missing field name: %s", fmt);
4559 static char missing[] = "missing-field-name";
4560 xo_failure(xop, "missing field name: %s", fmt);
4604 static char missing[] = "missing-field-name";
4605 xo_failure(xop, "missing field name: %s", fmt);
5176 * "{:/%d}". That means we need to format the field,
5223 * An anchor is a marker used to delay field width implications.
5282 /* Make a suitable padding field and emit it */
5431 * The field format is:
5433 * Roles are optional and include the following field types:
5442 * 'V': value, where 'content' is the name of the field (the default)
5449 * 'd': field is only emitted for display styles (text and html)
5450 * 'e': field is only emitted for encoding styles (xml and json)
5451 * 'g': gettext() the field
5453 * 'k': this field is a key, suitable for XPath predicates
5455 * 'n': no quotes around this field
5456 * 'p': the field has plural gettext semantics (ngettext)
5457 * 'q': add quotes around this field
5531 xo_failure(xop, "field descriptor uses multiple types: '%s'",
5604 xo_failure(xop, "field descriptor uses unknown modifier: '%s'",
5617 xo_failure(xop, "colon modifier on 'N' or 'U' field ignored: "
5633 * field types (text, newline, escaped braces) never get numbers.
5677 /* Find the next unassigned field */
5684 xfip->xfi_fnum = fnum; /* Mark the field number */
5690 * The format string uses field numbers, so we need to whiffle through it
5698 unsigned field, fnum;
5702 for (xfip = fields, field = 0; field < num_fields; xfip++, field++) {
5705 xfip->xfi_fnum = field + 1;
5707 xo_failure(xop, "field number exceeds number of fields: '%s'", fmt);
5714 xo_failure(xop, "field number %u reused: '%s'",
5730 unsigned field = 0;
5734 for (cp = fmt; *cp && field < num_fields; field++, xfip++) {
5786 /* We are looking at the start of a field definition */
5879 * If we saw a field number on at least one field, then we need
5883 rc = xo_parse_field_numbers(xop, fmt, fields, field);
5890 * field. We build a simplified version of the format string.
5902 int field = this_field + 1;
5906 for (xfip = &fields[field]; xfip->xfi_ftype; xfip++, field++) {
5981 * Find the field that matches the given field number
6097 xo_failure(xop, "post-gettext format can't find field "
6110 * the original field is a match.
6218 unsigned field = min_fstart, len, fnum;
6223 * Be aware there are two competing views of "field number": we
6227 * xo_field_info_t and every field have an index. fnum, fstart[]
6230 for (xfip = fields + field; xfip->xfi_ftype; xfip++, field++) {
6231 fnum = field;
6234 fnum = zp ? zp - fields : field;
6295 unsigned field;
6308 * for each field. We'll go ahead and render the fields in the
6320 for (xfip = fields, field = 0; field < max_fields && xfip->xfi_ftype;
6321 xfip++, field++) {
6325 /* Record field start offset */
6327 fstart[field] = xo_buf_offset(&xop->xo_data);
6328 if (min_fstart > field)
6329 min_fstart = field;
6384 * A {G:domain} field; disect the domain name and translate
6400 xo_gettext_build_format(xop, fields, field,
6433 field = -1; /* Will be incremented at top of loop */
6454 xo_failure(xop, "unknown field type: '%c'", ftype);
6464 /* Record the end-of-field offset */
6466 fend[field] = xo_buf_offset(&xop->xo_data);
6467 max_fend = field;
6529 * Check for 'retain' flag, telling us to retain the field
6673 * Emit a single field by providing the info information typically provided
6674 * inside the field description (role, modifiers, and formats). This is
6675 * a convenience function to avoid callers using snprintf to build field
6716 rc = xo_do_emit_fields(xop, &xfi, 1, fmt ?: contents ?: "field");