mruby/c VM Source Code release 3.4
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...

Macros

#define mrb_p(vm, v)
#define console_print   mrbc_print
#define console_nprint   mrbc_nprint
#define console_putchar   mrbc_putchar
#define console_printf   mrbc_printf

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- Shimane IT Open-Innovation Center.

This file is distributed under BSD 3-Clause License.

Definition in file console.h.

Macro Definition Documentation

◆ console_nprint

#define console_nprint   mrbc_nprint

Definition at line 37 of file console.h.

◆ console_print

#define console_print   mrbc_print

Definition at line 36 of file console.h.

◆ console_printf

#define console_printf   mrbc_printf

Definition at line 39 of file console.h.

◆ console_putchar

#define console_putchar   mrbc_putchar

Definition at line 38 of file console.h.

◆ mrb_p

#define mrb_p ( vm,
v )
Value:
mrbc_p(&v)
void mrbc_p(const mrbc_value *v)
Definition console.c:321

Definition at line 35 of 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 104 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 133 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 144 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 118 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 156 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 172 of file console.h.

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