Numworks Epsilon  1.4.1
Graphing Calculator Operating System
mpprint.c File Reference
#include <assert.h>
#include <stdarg.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include "py/mphal.h"
#include "py/mpprint.h"
#include "py/obj.h"
#include "py/objint.h"
#include "py/runtime.h"

Go to the source code of this file.

Macros

#define INT_BUF_SIZE   (sizeof(mp_int_t) * 4)
 
#define SUPPORT_INT_BASE_PREFIX   (0)
 

Functions

STATIC void plat_print_strn (void *env, const char *str, size_t len)
 
int mp_print_str (const mp_print_t *print, const char *str)
 
int mp_print_strn (const mp_print_t *print, const char *str, size_t len, int flags, char fill, int width)
 
STATIC int mp_print_int (const mp_print_t *print, mp_uint_t x, int sgn, int base, int base_char, int flags, char fill, int width)
 
int mp_print_mp_int (const mp_print_t *print, mp_obj_t x, int base, int base_char, int flags, char fill, int width, int prec)
 
int mp_printf (const mp_print_t *print, const char *fmt,...)
 
int mp_vprintf (const mp_print_t *print, const char *fmt, va_list args)
 

Variables

const mp_print_t mp_plat_print = {NULL, plat_print_strn}
 

Macro Definition Documentation

◆ INT_BUF_SIZE

#define INT_BUF_SIZE   (sizeof(mp_int_t) * 4)

Definition at line 122 of file mpprint.c.

◆ SUPPORT_INT_BASE_PREFIX

#define SUPPORT_INT_BASE_PREFIX   (0)

Definition at line 126 of file mpprint.c.

Function Documentation

◆ mp_print_int()

STATIC int mp_print_int ( const mp_print_t print,
mp_uint_t  x,
int  sgn,
int  base,
int  base_char,
int  flags,
char  fill,
int  width 
)

Definition at line 130 of file mpprint.c.

◆ mp_print_mp_int()

int mp_print_mp_int ( const mp_print_t print,
mp_obj_t  x,
int  base,
int  base_char,
int  flags,
char  fill,
int  width,
int  prec 
)

Definition at line 204 of file mpprint.c.

◆ mp_print_str()

int mp_print_str ( const mp_print_t print,
const char *  str 
)

Definition at line 53 of file mpprint.c.

◆ mp_print_strn()

int mp_print_strn ( const mp_print_t print,
const char *  str,
size_t  len,
int  flags,
char  fill,
int  width 
)

Definition at line 61 of file mpprint.c.

◆ mp_printf()

int mp_printf ( const mp_print_t print,
const char *  fmt,
  ... 
)

Definition at line 380 of file mpprint.c.

◆ mp_vprintf()

int mp_vprintf ( const mp_print_t print,
const char *  fmt,
va_list  args 
)

Definition at line 388 of file mpprint.c.

◆ plat_print_strn()

STATIC void plat_print_strn ( void *  env,
const char *  str,
size_t  len 
)

Definition at line 46 of file mpprint.c.

Variable Documentation

◆ mp_plat_print

const mp_print_t mp_plat_print = {NULL, plat_print_strn}

Definition at line 51 of file mpprint.c.