console output module. (not yet input) More...
#include "mrubyc.h"Go to the source code of this file.
Macros | |
| #define | MRBC_PRINTF_MAX_WIDTH 82 |
Functions | |
| static int | mrbc_printf_sub_output_arg (mrbc_printf_t *pf, va_list *ap) |
| void | mrbc_putchar (char c) |
| void | mrbc_print_symbol (mrbc_sym sym_id) |
| void | mrbc_nprint (const char *str, int size) |
| void | mrbc_printf (const char *fstr,...) |
| void | mrbc_asprintf (char **buf, int bufsiz, const char *fstr,...) |
| void | mrbc_snprintf (char *buf, int bufsiz, const char *fstr,...) |
| void | mrbc_vprintf (const char *fstr, va_list ap) |
| void | mrbc_vasprintf (char **buf, int bufsiz, const char *fstr, va_list ap) |
| void | mrbc_p (const mrbc_value *v) |
| int | mrbc_p_sub (const mrbc_value *v) |
| int | mrbc_puts_sub (const mrbc_value *v) |
| int | mrbc_print_sub (const mrbc_value *v) |
| void | mrbc_printf_replace_buffer (mrbc_printf_t *pf, char *buf, int size) |
| int | mrbc_printf_main (mrbc_printf_t *pf) |
| int | mrbc_printf_char (mrbc_printf_t *pf, int ch) |
| int | mrbc_printf_bstr (mrbc_printf_t *pf, const char *str, int len, int pad) |
| int | mrbc_printf_int (mrbc_printf_t *pf, mrbc_int_t value, unsigned int base) |
| int | mrbc_printf_bit (mrbc_printf_t *pf, mrbc_int_t value, int bit) |
| int | mrbc_printf_float (mrbc_printf_t *pf, double value) |
| int | mrbc_printf_pointer (mrbc_printf_t *pf, void *ptr) |
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.c.
| void mrbc_asprintf | ( | char ** | buf, |
| int | bufsiz, | ||
| const char * | fstr, | ||
| ... ) |
| void mrbc_nprint | ( | const char * | str, |
| int | size ) |
| void mrbc_p | ( | const mrbc_value * | v | ) |
print mrbc_value
| v | pointer to target value. |
Definition at line 321 of file console.c.
| int mrbc_p_sub | ( | const mrbc_value * | v | ) |
| int mrbc_print_sub | ( | const mrbc_value * | v | ) |
| void mrbc_print_symbol | ( | mrbc_sym | sym_id | ) |
| void mrbc_printf | ( | const char * | fstr, |
| ... ) |
| int mrbc_printf_bit | ( | mrbc_printf_t * | pf, |
| mrbc_int_t | value, | ||
| int | bit ) |
sprintf subcontract function for 'x', 'o', 'b'
| pf | pointer to mrbc_printf. |
| value | output value. |
| bit | n bit. (4=hex, 3=oct, 1=bin) |
| 0 | done. |
| -1 | buffer full. |
Definition at line 774 of file console.c.
| int mrbc_printf_bstr | ( | mrbc_printf_t * | pf, |
| const char * | str, | ||
| int | len, | ||
| int | pad ) |
sprintf subcontract function for byte array.
| pf | pointer to mrbc_printf. |
| str | pointer to byte array. |
| len | byte length. |
| pad | padding character. |
| 0 | done. |
| -1 | buffer full. |
Definition at line 635 of file console.c.
| int mrbc_printf_char | ( | mrbc_printf_t * | pf, |
| int | ch ) |
| int mrbc_printf_float | ( | mrbc_printf_t * | pf, |
| double | value ) |
| int mrbc_printf_int | ( | mrbc_printf_t * | pf, |
| mrbc_int_t | value, | ||
| unsigned int | base ) |
| int mrbc_printf_main | ( | mrbc_printf_t * | pf | ) |
| int mrbc_printf_pointer | ( | mrbc_printf_t * | pf, |
| void * | ptr ) |
sprintf subcontract function for pointer 'p'
| pf | pointer to mrbc_printf. |
| ptr | output value. |
| 0 | done. |
| -1 | buffer full. |
Definition at line 868 of file console.c.
| void mrbc_printf_replace_buffer | ( | mrbc_printf_t * | pf, |
| char * | buf, | ||
| int | size ) |
|
static |
| void mrbc_putchar | ( | char | c | ) |
| int mrbc_puts_sub | ( | const mrbc_value * | v | ) |
| void mrbc_snprintf | ( | char * | buf, |
| int | bufsiz, | ||
| const char * | fstr, | ||
| ... ) |
| void mrbc_vasprintf | ( | char ** | buf, |
| int | bufsiz, | ||
| const char * | fstr, | ||
| va_list | ap ) |
formatted output conversion with va_list, output to heap buffer.
| buf | double pointer to output buffer. must be allocated by mrbc_alloc. |
| bufsiz | buffer size. |
| fstr | format string. |
| ap | variable argument pointer. |
Definition at line 276 of file console.c.