45 #define WEAK_ATR __attribute__((weak)) 56 MEMSPACE long strtol (
const char *nptr ,
char **endptr ,
int base );
57 MEMSPACE long long strtoll (
const char *nptr ,
char **endptr ,
int base );
58 #ifdef __SIZEOF_INT128__ 59 MEMSPACE __uint128_t strto128 (
const char *nptr ,
char **endptr ,
int base );
92 unsigned short width : 1;
93 unsigned short prec : 1;
94 unsigned short plus : 1;
95 unsigned short left : 1;
96 unsigned short space : 1;
97 unsigned short zero : 1;
98 unsigned short neg: 1;
99 unsigned short alt: 1;
115 MEMSPACE int p_ntoa (
uint8_t *nump ,
int numsize ,
char *str ,
int strmax ,
int radix ,
int width ,
int prec ,
f_t f );
116 MEMSPACE int p_ftoa (
double val ,
char *str ,
int max ,
int width ,
int prec ,
f_t f );
117 MEMSPACE int p_etoa (
double val ,
char *str ,
int max ,
int width ,
int prec ,
f_t f );
121 MEMSPACE int vsnprintf (
char *str ,
size_t size ,
const char *format , va_list va );
122 MEMSPACE int snprintf (
char *str ,
size_t size ,
const char *format , ...);
125 MEMSPACE int vsnprintf_P (
char *str ,
size_t size ,
__memx const char *format , va_list va );
126 MEMSPACE int snprintf_P (
char *str ,
size_t size ,
__memx const char *format , ...);
127 MEMSPACE int sprintf_P (
char *str ,
__memx const char *format , ...);
133 int sscanf (
const char *strp ,
const char *fmt , ...);
135 #endif // ifndef _MATHIO_H_ MEMSPACE void pch_init(char *str, int max)
Initialize character buffer with limits.
MEMSPACE int vsnprintf(char *str, size_t size, const char *format, va_list va)
vsnprintf function
MEMSPACE int pch_ind(void)
Return current index of character buffer with limits.
MEMSPACE double scale10(double num, int *exp)
MEMSPACE int bin2num(uint8_t *str, int strmax, int nummin, int base, uint8_t *nump, int numsize, int sign_ch)
Convert an unsigned number (numsize bytes in size) to ASCII in specified base Notes: No limit except ...
MEMSPACE long atol(const char *str)
Convert ASCII string to number in base 10.
MEMSPACE int pch(char ch)
Put character in buffer with limits.
MEMSPACE void _printf_fn(printf_t *fn, __memx const char *fmt, va_list va)
vsnprintf function
MEMSPACE long atoh(const char *p)
Convert ASCII hex string to long integer.
MEMSPACE long strtol(const char *nptr, char **endptr, int base)
Convert ASCII string to number in a given base.
MEMSPACE void WEAK_ATR strupper(char *str)
UPPERCASE a string.
int putchar(int c)
put a character to stdout See fdevopen() sets stream->put get for TTY devices
MEMSPACE size_t WEAK_ATR strlen(const char *str)
String Length.
MEMSPACE double atof(const char *str)
struct _printf_t printf_t
undefine any potential macro version of these functions
MEMSPACE double strtod(const char *nptr, char **endptr)
MEMSPACE long long strtoll(const char *nptr, char **endptr, int base)
Convert ASCII string to number in a given base.
MEMSPACE double iexp(double num, int exp)
int sscanf(const char *strp, const char *fmt,...)
MEMSPACE int WEAK_ATR isdigit(int c)
test if a character is a digit
MEMSPACE int mul10str(uint8_t *str, int size)
Fast multiply number of any size by 10.
MEMSPACE int p_ntoa(uint8_t *nump, int numsize, char *str, int strmax, int radix, int width, int prec, f_t f)
Convert number an base 2 .. 16 to ASCII with optional sign Notes: 1) Numbers can be any number of dig...
MEMSPACE int pch_max_ind(void)
Return maximum valid index for character buffer.
MEMSPACE int printf(const char *format,...)
MEMSPACE int p_etoa(double val, char *str, int max, int width, int prec, f_t f)
MEMSPACE void print_flags(f_t f)
print flags set in t_t structure
MEMSPACE void _puts_pad(printf_t *fn, char *s, int width, int count, int left)
MEMSPACE long aton(char *str, int base)
Convert ASCII string to number in a given base.
MEMSPACE int snprintf(char *str, size_t size, const char *format,...)
snprintf function
MEMSPACE void WEAK_ATR reverse(char *str)
Reverse a string in place Example: abcdef -> fedcba.
MEMSPACE int atodigit(int c, int radix)
Convert ASCII character to radix based digit , or -1.
MEMSPACE int p_ftoa(double val, char *str, int max, int width, int prec, f_t f)
void(* put)(struct _printf_t *, char)
MEMSPACE void _putc_buffer_fn(struct _printf_t *p, char ch)
_putc_buffer_fn - character output to a string buffer Used by snprintf and vsnprintf You can make _pr...
MEMSPACE int atoi(const char *str)
Convert ASCII string to number in base 10.
undefine any potential macro version of these functions