MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / dfs_seq_vprintf

Function dfs_seq_vprintf

components/dfs/dfs_v2/src/dfs_seq_file.c:405–419  ·  view source on GitHub ↗

* @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 */

Source from the content-addressed store, hash-verified

403 * - Triggers overflow if buffer is full
404 */
405void 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)

Callers 1

dfs_seq_printfFunction · 0.85

Calls 1

dfs_seq_overflowFunction · 0.85

Tested by

no test coverage detected