rbuf_sprintf(3)

rbuf_sprintf3

Creating formatted rbuf's

Usage

#include <roy.h>

void rbuf_sprintf (RBuf *buf, const char *format, ...);

void rbuf_append_sprintf (RBuf *buf, const char *format, ...);

void rbuf_append_vsprintf (RBuf *buf, const char *format, va_list args);

RBuf * rbuf_new_with_sprintf (const char *format, ...);

Overview

These functions are used to insert formatted strings into an RBuf.

A call to rbuf_sprintf(3) resets the current contents of the rbuf with the formatted string.

A call to rbuf_append_sprintf(3) appends the formatted string to the rbuf.

A call to rbuf_append_vsprintf(3) is identical to rbuf_append_sprintf(3) except that a *va_list is used as the arguments to the formatted string *format.

A call to rbuf_new_with_sprintf(3) creates a new rbuf with its buffer set to the formatted string.

Rbuf format specification

The RBuf sprintf calls all implement %b as a format specification for rufs.

Return value

All these calls with the exception of rbuf_new_with_sprintf(3) have no return value. rbuf_new_with_sprintf(3) returns an rbuf struct for use with other rbuf calls. The programmer should free this rbuf a call to rbuf_free(3) when he/she is done using the rbuf.

Errors

These calls do not error.

Function

All rbuf_sprintf(3) style api calls are implemented using functions.

Releases

2 releases since Debian 3.0 (Woody); the text changed 1 time.

  1. 3.0
  2. 3.1

From libroy-dev 1.0.8-1 in Debian 3.1 (Sarge). Parsed by carta from the page's man source.