38 int res =
write(&c,
sizeof(c));
39 return (res ==
sizeof(c) ? c & 0xff : res);
45 const char* bp = (
const char*) s;
47 for (
char c; (c = *bp++) != 0; n++)
56 const char* bp = (
const char*) s;
58 for (
char c; (c = pgm_read_byte(bp++)) != 0; n++)
67 char* bp = (
char*) buf;
78 char* bp = (
char*) buf;
91 size_t res = (size_t)
write(vp->buf, vp->size);
137 if (c ==
'\n')
break;
140 return (s == res ?
NULL : res);
146 char* bp = (
char*) buf;
148 for (; n < size; n++) {
161 size_t res = (size_t)
read(vp->buf, vp->size);
virtual int write_P(const void *buf, size_t size)
virtual int putchar(char c)
virtual int puts(const char *s)
virtual int write(const void *buf, size_t size)
virtual int read(void *buf, size_t size)
const class prog_str * str_P
void * buf
Buffer pointer.
virtual char * gets(char *s, size_t count)