man rbuf_str (Fonctions bibliothèques) - get the buffer from an rbuf

NAME

rbuf_str - get the buffer from an rbuf

rbuf_long - return float value of rbuf contents.

rbuf_float - return float value of rbuf contents.

SYNOPSIS

#include <roy.h>

char * rbuf_str (RBuf *buf);

long rbuf_long (RBuf *buf);

float rbuf_float (RBuf *buf);

DESCRIPTION

The rbuf structure is meant to be fully opaque to the programmer, and any access of the rbuf's buffer should be done using these calls. The return value of rbuf_str(3) does not always stay constant with some rbuf api calls, so programmers shouldn't keep long term references to the buffer.

rbuf_long(3) returns the integer value of buf. This is a macro wrapper around atol(3).

rbuf_float(3) returns the float value of buf. This is a macro wrapper around atof(3).

RETURN VALUE

rbuf_str(3) returns the buffer that the rbuf points to.

rbuf_long(3) and rbuf_float(3) return a long and float respectively.

ERRORS

These functions never err.

MACRO

These apis are all implemented using macros.

SEE ALSO