gbuffer_ungetc()

gbuffer_ungetc()#

Pushes a single character back onto the read buffer of the given gbuffer_t instance, effectively undoing the last read operation.

Prototype

PUBLIC int gbuffer_ungetc(
    gbuffer_t *gbuf,
    char       c
);

Parameters

Key

Type

Description

gbuf

gbuffer_t *

Pointer to the gbuffer_t instance where the character will be pushed back.

c

char

The character to be pushed back onto the read buffer.


Return Value

Returns 0 on success.

Notes

If the read pointer is already at the beginning of the buffer, the function does nothing.

Prototype

// Not applicable in JS

Prototype

# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples