* @brief Format and write data to sequence file buffer using variable arguments * * @param[in,out] seq Pointer to sequence file structure * @param[in] f Format string (printf-style) * @param[in] args Variable arguments list * * @details This function: * - Formats data using vsnprintf * - Triggers overflow if buffer is full */
| 403 | * - Triggers overflow if buffer is full |
| 404 | */ |
| 405 | void dfs_seq_vprintf(struct dfs_seq_file *seq, const char *f, va_list args) |
| 406 | { |
| 407 | int len; |
| 408 | |
| 409 | if (seq->count < seq->size) |
| 410 | { |
| 411 | len = vsnprintf(seq->buf + seq->count, seq->size - seq->count, f, args); |
| 412 | if (seq->count + len < seq->size) |
| 413 | { |
| 414 | seq->count += len; |
| 415 | return; |
| 416 | } |
| 417 | } |
| 418 | dfs_seq_overflow(seq); |
| 419 | } |
| 420 | |
| 421 | /** |
| 422 | * @brief Format and print data to sequence file buffer (printf-style) |
no test coverage detected