With top-up attempts from batch 26 commit 7f99538 added, lwIP UDP route and validation passed 1 of 3 valid attempts and NuttX floating format layout 0 of 3; Qwen ran out of context in most failures. Each comes from the measured commit, its digest matches, and it is still present at the batch branch head. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3.8 KiB
Record formatting contract
This build uses the C locale and ordinary, unnumbered C variadic arguments. The following clauses describe the supported telemetry record fields.
R01 snprintf(char *, size_t, const char *, ...) and
vsnprintf(char *, size_t, const char *, va_list) produce the same record for
the same arguments. A record may contain ordinary ASCII text and multiple
floating fields, in argument order. The enabled floating-point configuration
and supplied conversion/stream implementations remain in use.
R02 Fields use f, F, e, or E with finite binary64 values. Inputs
are zero (including negative zero), or have magnitude from 2^-32 through 10^12.
Precision is omitted or is an integer from 0 through 12. Inputs exactly halfway
between two output rounding choices are outside this task. Other finite inputs
are rounded to the nearest representable decimal output at the requested
precision. This is a bounded formatting task; other conversions, other locales,
nonfinite values, subnormal values, and halfway rounding are not its acceptance
scope.
R03 For f and F, write the decimal integer part and the requested number
of fractional digits, filling trailing fractional positions with zero. The
default precision is six. At zero precision omit the decimal point unless the
alternate form requires it. Output always contains an integer digit.
R04 For e and E, write one digit before the decimal point and the
requested number of digits after it, followed by the conversion letter, an
exponent sign, and the decimal exponent. The exponent has at least two digits,
using leading zeroes as needed. Zero has exponent zero. The default precision
is six. At zero precision omit the decimal point unless the alternate form
requires it.
R05 The # flag retains a decimal point after the integer or mantissa digits
even when the precision is zero. Fractional precision and exponent syntax
otherwise follow the selected conversion.
R06 Negative values and negative zero begin with -. A nonnegative value
uses + with the + flag, or one leading space with the space flag. + takes
precedence when both flags are present.
R07 Width is a minimum field width, up to 48 characters; a longer conversion
is not shortened. Right alignment fills with spaces. - aligns left and adds
spaces on the right. 0 pads between the sign and digits when right aligned.
- takes precedence over 0. The decimal point and full exponent count toward
the field width.
R08 Width and precision may be written as decimal literals or supplied by
*, using int width and precision arguments before the double value.
Negative dynamic width means left alignment at its absolute value; dynamic
precision in this task is nonnegative.
R09 Capacity is the number of available output bytes, including the terminating null. For a positive capacity, store the first capacity-minus-one bytes of the record, or the whole record if shorter, then a terminating null. Do not modify bytes beyond the terminator. Capacity one stores just a null. Capacity zero writes nothing and permits a null output pointer.
R10 Both APIs return the length of the complete record in bytes, excluding the null, even when capacity truncates the stored record. Truncation may fall at any byte, including inside a field. Text around fields remains unchanged.
R11 Use the supplied public entry points with real variadic arguments. Deliver the implementation in the collected file listed in the README. Local build products are disposable and are not acceptance inputs.
These clauses adapt the relevant formatting rules from ISO C11 committee draft N1570, sections 7.21.6.1, 7.21.6.5, and 7.21.6.12, to the stated numeric and build scope. The public draft is available at https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf.