59 print((
char) (
'0' + ((n >> 4) & 0xf)));
60 print((
char) (
'0' + (n & 0xf)));
93 for (uint8_t length = strlen(buf); length < digits; length++)
103 for (uint8_t length = strlen(buf); length < digits; length++)
112 dtostrf(value, width, prec, buf);
129 else if (base ==
bin)
131 else if (base ==
oct)
139 uint8_t w = (base ==
hex ? 2 : (base ==
bin ? 8 : 3));
140 uint8_t* p = (uint8_t*) ptr;
145 print((
unsigned int) *p++, w, base);
165 const char* s = (
const char*) format;
169 while ((c = pgm_read_byte(s++)) != 0) {
174 c = pgm_read_byte(s++);
194 print((
char) va_arg(args,
int));
197 print(va_arg(args,
void*));
200 print(va_arg(args,
char*));
207 print(va_arg(args,
int), base);
209 print(va_arg(args,
unsigned int), base);
213 print(va_arg(args,
long int), base);
215 print(va_arg(args,
unsigned long int), base);
231 while (c <=
' ' && c !=
'\n') {
244 if (!isalnum(c))
break;
249 else if (isdigit(c) || c ==
'-') {
252 if (!isdigit(c))
break;
264 const char DEL = 127;
269 size_t len = strlen(buf);
274 if (c == ESC)
continue;
275 if (c ==
'\b' || c == DEL) {
293 if (c ==
'\n')
break;
297 return (c ==
'\n' ? buf :
NULL);
char * scan(char *s, size_t count)
const char IOStream::CR[] __PROGMEM
IOStream & dec(IOStream &outs)
void print(int value, Base base=dec)
int8_t m_width
Minimum width of output string.
static char * ltoa(long __val, char *__s, int base)
int8_t width(int8_t value)
void print_prefix(Base base)
char * readline(char *buf, size_t size, bool echo=true)
const class prog_str * str_P
static char * itoa(int __val, char *__s, int base)
static char * utoa(unsigned int __val, char *__s, int base)
Base m_base
Base for next output operator.
Device * m_dev
Delegated device.
static const size_t BUF_MAX
void vprintf(str_P format, va_list args)
str_P m_eols
End of line string (program memory).
uint8_t m_prec
Number of digits after decimal sign.
static char * ultoa(unsigned long __val, char *__s, int base)