BB2 C port
API reference: Blitz libraries in C and the shared code
Loading...
Searching...
No Matches
basictest_write.c File Reference
#include "basictest.h"

Go to the source code of this file.

Data Structures

struct  out

Functions

static void put (struct out *o, uint8_t c)
static void puts_ (struct out *o, const char *s)
size_t basictest_decimal (uint32_t v, uint8_t *buf)
 Writes v in decimal (no sign, no leading zero) to buf, which has room for 10 bytes; the writer's and the error text's helper.
static void putdecimal (struct out *o, uint32_t v)
static void putlong (struct out *o, uint32_t v)
static void putstr (struct out *o, const struct basictest_str *s)
static void tab (struct out *o)
size_t basictest_write (const struct basictest_entry *e, uint8_t *buf, size_t size)
 Writes the line of an entry, with its LF, to buf.

Variables

static const char hexdigit [] = "0123456789ABCDEF"

Function Documentation

◆ basictest_decimal()

size_t basictest_decimal ( uint32_t v,
uint8_t * buf )

Writes v in decimal (no sign, no leading zero) to buf, which has room for 10 bytes; the writer's and the error text's helper.

Returns
the number of digits.

◆ basictest_write()

size_t basictest_write ( const struct basictest_entry * e,
uint8_t * buf,
size_t size )

Writes the line of an entry, with its LF, to buf.

Returns
the number of bytes written, 0 if the line does not fit into size bytes or the entry is not one of the kinds above, or a case without a name (buf then holds no complete line).

◆ put()

void put ( struct out * o,
uint8_t c )
static

◆ putdecimal()

void putdecimal ( struct out * o,
uint32_t v )
static

◆ putlong()

void putlong ( struct out * o,
uint32_t v )
static

◆ puts_()

void puts_ ( struct out * o,
const char * s )
static

◆ putstr()

void putstr ( struct out * o,
const struct basictest_str * s )
static

◆ tab()

void tab ( struct out * o)
static

Variable Documentation

◆ hexdigit

const char hexdigit[] = "0123456789ABCDEF"
static