mruby/c VM Source Code master (2026/08/06)
Loading...
Searching...
No Matches
console.h File Reference

console output module. (not yet input) More...

#include "value.h"
Include dependency graph for console.h:

Go to the source code of this file.

Data Structures

struct  RPrintfFormat
 printf tiny (mruby/c) version format container. More...
struct  RPrintf
 printf tiny (mruby/c) version data container. More...

Typedefs

typedef struct RPrintf mrbc_printf_t
 printf tiny (mruby/c) version data container.

Functions

static void mrbc_print (const char *str)
static void mrbc_printf_init (mrbc_printf_t *pf, char *buf, int size, const char *fstr)
static void mrbc_printf_clear (mrbc_printf_t *pf)
static void mrbc_printf_end (mrbc_printf_t *pf)
static int mrbc_printf_len (mrbc_printf_t *pf)
static int mrbc_printf_str (mrbc_printf_t *pf, const char *str, int pad)

Detailed Description

console output module. (not yet input)

Copyright (C) 2015-      Kyushu Institute of Technology.
Copyright (C) 2015-2026  Shimane IT Open-Innovation Center.
Copyright (C) 2026-      Shimane Institute for Industrial Technology.

This file is distributed under BSD 3-Clause License.

Definition in file console.h.

Typedef Documentation

◆ mrbc_printf_t

typedef struct RPrintf mrbc_printf_t

printf tiny (mruby/c) version data container.

Function Documentation

◆ mrbc_print()

void mrbc_print ( const char * str)
inlinestatic

output string

Parameters
strstr

Definition at line 110 of file console.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mrbc_printf_clear()

void mrbc_printf_clear ( mrbc_printf_t * pf)
inlinestatic

clear output buffer in container.

Parameters
pfpointer to mrbc_printf

Definition at line 139 of file console.h.

Here is the caller graph for this function:

◆ mrbc_printf_end()

void mrbc_printf_end ( mrbc_printf_t * pf)
inlinestatic

terminate ('\0') output buffer.

Parameters
pfpointer to mrbc_printf

Definition at line 150 of file console.h.

Here is the caller graph for this function:

◆ mrbc_printf_init()

void mrbc_printf_init ( mrbc_printf_t * pf,
char * buf,
int size,
const char * fstr )
inlinestatic

initialize data container.

Parameters
pfpointer to mrbc_printf
bufpointer to output buffer.
sizebuffer size.
fstrformat string.

Definition at line 124 of file console.h.

Here is the caller graph for this function:

◆ mrbc_printf_len()

int mrbc_printf_len ( mrbc_printf_t * pf)
inlinestatic

return string length in buffer

Parameters
pfpointer to mrbc_printf
Returns
length

Definition at line 162 of file console.h.

Here is the caller graph for this function:

◆ mrbc_printf_str()

int mrbc_printf_str ( mrbc_printf_t * pf,
const char * str,
int pad )
inlinestatic

sprintf subcontract function for char 's'

Parameters
pfpointer to mrbc_printf.
stroutput string.
padpadding character.
Return values
0done.
-1buffer full.
Note
not terminate ('\0') buffer tail.

Definition at line 178 of file console.h.

Here is the call graph for this function:
Here is the caller graph for this function: