diff --git a/boards/arm/sam34/sam4l-xplained/src/sam_slcd.c b/boards/arm/sam34/sam4l-xplained/src/sam_slcd.c index 1d45a118de7..59e3d991824 100644 --- a/boards/arm/sam34/sam4l-xplained/src/sam_slcd.c +++ b/boards/arm/sam34/sam4l-xplained/src/sam_slcd.c @@ -908,7 +908,7 @@ static ssize_t slcd_write(struct file *filep, /* Initialize the stream for use with the SLCD CODEC */ - instream.stream.get = slcd_getstream; + instream.stream.getc = slcd_getstream; instream.stream.nget = 0; instream.buffer = buffer; instream.nbytes = len; diff --git a/boards/arm/stm32/stm32ldiscovery/src/stm32_lcd.c b/boards/arm/stm32/stm32ldiscovery/src/stm32_lcd.c index 7b05554a5ae..4832ca4ad1a 100644 --- a/boards/arm/stm32/stm32ldiscovery/src/stm32_lcd.c +++ b/boards/arm/stm32/stm32ldiscovery/src/stm32_lcd.c @@ -1175,7 +1175,7 @@ static ssize_t slcd_write(struct file *filep, /* Initialize the stream for use with the SLCD CODEC */ - instream.stream.get = slcd_getstream; + instream.stream.getc = slcd_getstream; instream.stream.nget = 0; instream.buffer = buffer; instream.nbytes = len; diff --git a/boards/mips/pic32mx/sure-pic32mx/src/pic32mx_lcd1602.c b/boards/mips/pic32mx/sure-pic32mx/src/pic32mx_lcd1602.c index 3d8f0d73da4..cae80ad8459 100644 --- a/boards/mips/pic32mx/sure-pic32mx/src/pic32mx_lcd1602.c +++ b/boards/mips/pic32mx/sure-pic32mx/src/pic32mx_lcd1602.c @@ -837,7 +837,7 @@ static ssize_t lcd_write(struct file *filep, const char *buffer, /* Initialize the stream for use with the SLCD CODEC */ - instream.stream.get = lcd_getstream; + instream.stream.getc = lcd_getstream; instream.stream.nget = 0; instream.buffer = buffer; instream.nbytes = len; diff --git a/drivers/lcd/ht16k33_14seg.c b/drivers/lcd/ht16k33_14seg.c index 1d398c2ac15..e5e04137167 100644 --- a/drivers/lcd/ht16k33_14seg.c +++ b/drivers/lcd/ht16k33_14seg.c @@ -808,7 +808,7 @@ static ssize_t ht16k33_write(FAR struct file *filep, FAR const char *buffer, /* Initialize the stream for use with the SLCD CODEC */ - instream.stream.get = lcd_getstream; + instream.stream.getc = lcd_getstream; instream.stream.nget = 0; instream.buffer = buffer; instream.nbytes = buflen; diff --git a/drivers/lcd/pcf8574_lcd_backpack.c b/drivers/lcd/pcf8574_lcd_backpack.c index deea3b417f0..50cc6a22db1 100644 --- a/drivers/lcd/pcf8574_lcd_backpack.c +++ b/drivers/lcd/pcf8574_lcd_backpack.c @@ -1226,7 +1226,7 @@ static ssize_t pcf8574_lcd_write(FAR struct file *filep, /* Initialize the stream for use with the SLCD CODEC */ - instream.stream.get = lcd_getstream; + instream.stream.getc = lcd_getstream; instream.stream.nget = 0; instream.buffer = buffer; instream.nbytes = buflen; diff --git a/drivers/lcd/st7032.c b/drivers/lcd/st7032.c index 67f1f120874..403e38d9647 100644 --- a/drivers/lcd/st7032.c +++ b/drivers/lcd/st7032.c @@ -730,7 +730,7 @@ static ssize_t st7032_write(FAR struct file *filep, FAR const char *buffer, /* Initialize the stream for use with the SLCD CODEC */ - instream.stream.get = lcd_getstream; + instream.stream.getc = lcd_getstream; instream.stream.nget = 0; instream.buffer = buffer; instream.nbytes = buflen; diff --git a/drivers/segger/stream_rtt.c b/drivers/segger/stream_rtt.c index 1096fddc1cd..1f3d97651c7 100644 --- a/drivers/segger/stream_rtt.c +++ b/drivers/segger/stream_rtt.c @@ -126,7 +126,7 @@ void lib_rttoutstream_open(FAR struct lib_rttoutstream_s *stream, bufsize, SEGGER_RTT_MODE_DEFAULT); } - stream->public.put = rttstream_putc; + stream->public.putc = rttstream_putc; stream->public.puts = rttstream_puts; stream->public.flush = lib_noflush; stream->public.nput = 0; @@ -174,7 +174,7 @@ void lib_rttinstream_open(FAR struct lib_rttinstream_s *stream, bufsize, SEGGER_RTT_MODE_DEFAULT); } - stream->public.get = rttstream_getc; + stream->public.getc = rttstream_getc; stream->public.gets = rttstream_gets; stream->public.nget = 0; stream->channel = channel; diff --git a/drivers/syslog/syslog_stream.c b/drivers/syslog/syslog_stream.c index 47986d0da17..04e3d5f251f 100644 --- a/drivers/syslog/syslog_stream.c +++ b/drivers/syslog/syslog_stream.c @@ -129,7 +129,7 @@ static int syslog_stream_putc(FAR struct syslog_channel_s *channel, int ch) irqstate_t flags; flags = enter_critical_section(); - lib_stream_put(chan->stream, ch); + lib_stream_putc(chan->stream, ch); leave_critical_section(flags); return OK; @@ -156,7 +156,7 @@ static int syslog_stream_force(FAR struct syslog_channel_s *channel, int ch) FAR struct syslog_stream_s *chan = (FAR struct syslog_stream_s *)channel; - lib_stream_put(chan->stream, ch); + lib_stream_putc(chan->stream, ch); return OK; } diff --git a/drivers/usbhost/usbhost_hidkbd.c b/drivers/usbhost/usbhost_hidkbd.c index 148e57b5e15..9d91aa9eaa1 100644 --- a/drivers/usbhost/usbhost_hidkbd.c +++ b/drivers/usbhost/usbhost_hidkbd.c @@ -965,7 +965,7 @@ static inline void usbhost_encodescancode(FAR struct usbhost_state_s *priv, /* And it does correspond to a special function key */ - usbstream.stream.put = usbhost_putstream; + usbstream.stream.putc = usbhost_putstream; usbstream.stream.nput = 0; usbstream.priv = priv; diff --git a/include/nuttx/input/kbd_codec.h b/include/nuttx/input/kbd_codec.h index 5efb7aa51c1..9a1cb01c452 100644 --- a/include/nuttx/input/kbd_codec.h +++ b/include/nuttx/input/kbd_codec.h @@ -223,7 +223,7 @@ extern "C" * ****************************************************************************/ -#define kbd_press(ch, stream) (stream)->put((stream), (int)(ch)) +#define kbd_press(ch, stream) lib_stream_putc(stream, ch) /**************************************************************************** * Name: kbd_release diff --git a/include/nuttx/lcd/slcd_codec.h b/include/nuttx/lcd/slcd_codec.h index 6e61dc63b67..5ea6ce6166c 100644 --- a/include/nuttx/lcd/slcd_codec.h +++ b/include/nuttx/lcd/slcd_codec.h @@ -128,7 +128,7 @@ extern "C" * ****************************************************************************/ -#define slcd_put(ch, stream) (stream)->put((stream), (int)(ch)) +#define slcd_put(ch, stream) lib_stream_putc(stream, ch) /**************************************************************************** * Name: slcd_encode diff --git a/include/nuttx/streams.h b/include/nuttx/streams.h index 0b19fe01ebf..adbc6c3044d 100644 --- a/include/nuttx/streams.h +++ b/include/nuttx/streams.h @@ -40,14 +40,14 @@ * Pre-processor Definitions ****************************************************************************/ +#define lib_stream_putc(stream, ch) \ + ((FAR struct lib_outstream_s *)(stream))->putc( \ + (FAR struct lib_outstream_s *)(stream), ch) #define lib_stream_puts(stream, buf, len) \ ((FAR struct lib_outstream_s *)(stream))->puts( \ (FAR struct lib_outstream_s *)(stream), buf, len) -#define lib_stream_put(stream, ch) \ - ((FAR struct lib_outstream_s *)(stream))->put( \ - (FAR struct lib_outstream_s *)(stream), ch) -#define lib_stream_get(stream) \ - ((FAR struct lib_instream_s *)(stream))->get( \ +#define lib_stream_getc(stream) \ + ((FAR struct lib_instream_s *)(stream))->getc( \ (FAR struct lib_instream_s *)(stream)) #define lib_stream_gets(stream, buf, len) \ ((FAR struct lib_instream_s *)(stream))->gets( \ @@ -84,7 +84,7 @@ struct lib_instream_s { int nget; /* Total number of characters gotten. Written * by get method, readable by user */ - lib_getc_t get; /* Get one character from the instream */ + lib_getc_t getc; /* Get one character from the instream */ lib_gets_t gets; /* Get the string from the instream */ }; @@ -92,7 +92,7 @@ struct lib_outstream_s { int nput; /* Total number of characters put. Written * by put method, readable by user */ - lib_putc_t put; /* Put one character to the outstream */ + lib_putc_t putc; /* Put one character to the outstream */ lib_puts_t puts; /* Writes the string to the outstream */ lib_flush_t flush; /* Flush any buffered characters in the outstream */ }; @@ -118,7 +118,7 @@ struct lib_sistream_s { int nget; /* Total number of characters gotten. Written * by get method, readable by user */ - lib_sigetc_t get; /* Get one character from the instream */ + lib_sigetc_t getc; /* Get one character from the instream */ lib_gets_t gets; /* Get the string from the instream */ lib_siseek_t seek; /* Seek to a position in the instream */ }; @@ -127,7 +127,7 @@ struct lib_sostream_s { int nput; /* Total number of characters put. Written * by put method, readable by user */ - lib_soputc_t put; /* Put one character to the outstream */ + lib_soputc_t putc; /* Put one character to the outstream */ lib_soputs_t puts; /* Writes the string to the outstream */ lib_soflush_t flush; /* Flush any buffered characters in the outstream */ lib_soseek_t seek; /* Seek a position in the output stream */ diff --git a/libs/libc/hex2bin/lib_hex2bin.c b/libs/libc/hex2bin/lib_hex2bin.c index 74363401cae..9ddd7c722f5 100644 --- a/libs/libc/hex2bin/lib_hex2bin.c +++ b/libs/libc/hex2bin/lib_hex2bin.c @@ -247,17 +247,17 @@ static int readstream(FAR struct lib_instream_s *instream, /* Skip until the beginning of line start code is encountered */ - ch = lib_stream_get(instream); + ch = lib_stream_getc(instream); while (ch != RECORD_STARTCODE && ch != EOF) { - ch = lib_stream_get(instream); + ch = lib_stream_getc(instream); } /* Skip over the startcode */ if (ch != EOF) { - ch = lib_stream_get(instream); + ch = lib_stream_getc(instream); } /* Then read, verify, and buffer until the end of line is encountered */ @@ -286,7 +286,7 @@ static int readstream(FAR struct lib_instream_s *instream, /* Read the next character from the input stream */ - ch = lib_stream_get(instream); + ch = lib_stream_getc(instream); } /* Some error occurred: Unexpected EOF, line too long, or bad character in @@ -339,7 +339,7 @@ static inline void writedata(FAR struct lib_sostream_s *outstream, { for (; bytecount > 0; bytecount--) { - outstream->put(outstream, *data++); + lib_stream_putc(outstream, *data++); } } diff --git a/libs/libc/misc/lib_kbddecode.c b/libs/libc/misc/lib_kbddecode.c index 30eff5d4e41..dac910a9884 100644 --- a/libs/libc/misc/lib_kbddecode.c +++ b/libs/libc/misc/lib_kbddecode.c @@ -139,7 +139,7 @@ int kbd_decode(FAR struct lib_instream_s *stream, /* No, ungotten characters. Check for the beginning of an ESC sequence. */ - ch = lib_stream_get(stream); + ch = lib_stream_getc(stream); if (ch == EOF) { /* End of file/stream */ @@ -163,7 +163,7 @@ int kbd_decode(FAR struct lib_instream_s *stream, /* Check for ESC-[ */ - ch = lib_stream_get(stream); + ch = lib_stream_getc(stream); if (ch == EOF) { /* End of file/stream. Return the escape character now. We will @@ -189,7 +189,7 @@ int kbd_decode(FAR struct lib_instream_s *stream, /* Get and verify the special keyboard data to decode */ - ch = lib_stream_get(stream); + ch = lib_stream_getc(stream); if (ch == EOF) { /* End of file/stream. Unget everything and return the ESC character. @@ -216,7 +216,7 @@ int kbd_decode(FAR struct lib_instream_s *stream, /* Check for the final semicolon */ - ch = lib_stream_get(stream); + ch = lib_stream_getc(stream); if (ch == EOF) { /* End of file/stream. Unget everything and return the ESC character. diff --git a/libs/libc/misc/lib_kbdencode.c b/libs/libc/misc/lib_kbdencode.c index 8fd909fe604..d64bc8bef08 100644 --- a/libs/libc/misc/lib_kbdencode.c +++ b/libs/libc/misc/lib_kbdencode.c @@ -55,10 +55,10 @@ static void kbd_encode(uint8_t keycode, FAR struct lib_outstream_s *stream, uint8_t terminator) { - stream->put(stream, ASCII_ESC); - stream->put(stream, '['); - stream->put(stream, (int)keycode); - stream->put(stream, terminator); + lib_stream_putc(stream, ASCII_ESC); + lib_stream_putc(stream, '['); + lib_stream_putc(stream, (int)keycode); + lib_stream_putc(stream, terminator); } /**************************************************************************** diff --git a/libs/libc/misc/lib_slcddecode.c b/libs/libc/misc/lib_slcddecode.c index b32d021aa8a..6ff5580ea6c 100644 --- a/libs/libc/misc/lib_slcddecode.c +++ b/libs/libc/misc/lib_slcddecode.c @@ -177,7 +177,7 @@ enum slcdret_e slcd_decode(FAR struct lib_instream_s *stream, /* No, ungotten characters. Get the next character from the buffer. */ - ch = lib_stream_get(stream); + ch = lib_stream_getc(stream); if (ch == EOF) { /* End of file/stream (or perhaps an I/O error) */ @@ -201,7 +201,7 @@ enum slcdret_e slcd_decode(FAR struct lib_instream_s *stream, /* Get the next character from the buffer */ - ch = lib_stream_get(stream); + ch = lib_stream_getc(stream); if (ch == EOF) { /* End of file/stream. Return the escape character now. We will @@ -230,7 +230,7 @@ enum slcdret_e slcd_decode(FAR struct lib_instream_s *stream, /* Get the next character from the buffer */ - ch = lib_stream_get(stream); + ch = lib_stream_getc(stream); if (ch == EOF) { /* End of file/stream. Return the ESC now; return the following @@ -278,7 +278,7 @@ enum slcdret_e slcd_decode(FAR struct lib_instream_s *stream, /* Get the next character from the buffer */ - ch = lib_stream_get(stream); + ch = lib_stream_getc(stream); if (ch == EOF) { /* End of file/stream. Return the ESC now; return the following @@ -311,7 +311,7 @@ enum slcdret_e slcd_decode(FAR struct lib_instream_s *stream, /* Get the next character from the buffer */ - ch = lib_stream_get(stream); + ch = lib_stream_getc(stream); if (ch == EOF) { /* End of file/stream. Return the ESC now; return the following diff --git a/libs/libc/misc/lib_slcdencode.c b/libs/libc/misc/lib_slcdencode.c index 4b1928b795c..2e512d4b23f 100644 --- a/libs/libc/misc/lib_slcdencode.c +++ b/libs/libc/misc/lib_slcdencode.c @@ -86,9 +86,9 @@ static inline void slcd_put3(uint8_t slcdcode, { /* Put the 3-byte escape sequences into the output buffer */ - stream->put(stream, ASCII_ESC); - stream->put(stream, '['); - stream->put(stream, 'A' + (int)slcdcode); + lib_stream_putc(stream, ASCII_ESC); + lib_stream_putc(stream, '['); + lib_stream_putc(stream, 'A' + (int)slcdcode); } /**************************************************************************** @@ -114,11 +114,11 @@ static inline void slcd_put5(uint8_t slcdcode, uint8_t count, { /* Put the 5-byte escape sequences into the output buffer */ - stream->put(stream, ASCII_ESC); - stream->put(stream, '['); - stream->put(stream, slcd_nibble(count >> 4)); - stream->put(stream, slcd_nibble(count)); - stream->put(stream, 'A' + (int)slcdcode); + lib_stream_putc(stream, ASCII_ESC); + lib_stream_putc(stream, '['); + lib_stream_putc(stream, slcd_nibble(count >> 4)); + lib_stream_putc(stream, slcd_nibble(count)); + lib_stream_putc(stream, 'A' + (int)slcdcode); } /**************************************************************************** diff --git a/libs/libc/obstack/lib_obstack_vprintf.c b/libs/libc/obstack/lib_obstack_vprintf.c index 89d67318a4f..87adb1ce909 100644 --- a/libs/libc/obstack/lib_obstack_vprintf.c +++ b/libs/libc/obstack/lib_obstack_vprintf.c @@ -87,7 +87,7 @@ int obstack_vprintf(FAR struct obstack *h, FAR const char *fmt, va_list ap) { struct obstack_stream outstream; - outstream.public.put = obstack_putc; + outstream.public.putc = obstack_putc; outstream.public.puts = obstack_puts; outstream.public.flush = lib_noflush; outstream.public.nput = 0; diff --git a/libs/libc/stdio/lib_libdtoa.c b/libs/libc/stdio/lib_libdtoa.c index 5073a215118..47882fd2d5c 100644 --- a/libs/libc/stdio/lib_libdtoa.c +++ b/libs/libc/stdio/lib_libdtoa.c @@ -97,7 +97,7 @@ static void zeroes(FAR struct lib_outstream_s *obj, int nzeroes) for (i = nzeroes; i > 0; i--) { - obj->put(obj, '0'); + lib_stream_putc(obj, '0'); } } @@ -131,7 +131,7 @@ static void lib_dtoa_string(FAR struct lib_outstream_s *obj, const char *str) { while (*str) { - obj->put(obj, *str++); + lib_stream_putc(obj, *str++); } } @@ -197,7 +197,7 @@ static void lib_dtoa(FAR struct lib_outstream_s *obj, int fmt, int prec, { if (value < 0.0) { - obj->put(obj, '-'); + lib_stream_putc(obj, '-'); } lib_dtoa_string(obj, "Infinity"); @@ -245,11 +245,11 @@ static void lib_dtoa(FAR struct lib_outstream_s *obj, int fmt, int prec, if (IS_NEGATE(flags)) { - obj->put(obj, '-'); + lib_stream_putc(obj, '-'); } else if (IS_SHOWPLUS(flags)) { - obj->put(obj, '+'); + lib_stream_putc(obj, '+'); } /* Special case exact zero or the case where the number is smaller than @@ -260,7 +260,7 @@ static void lib_dtoa(FAR struct lib_outstream_s *obj, int fmt, int prec, { /* kludge for __dtoa irregularity */ - obj->put(obj, '0'); + lib_stream_putc(obj, '0'); /* A decimal point is printed only in the alternate form or if a * particular precision is requested. @@ -268,7 +268,7 @@ static void lib_dtoa(FAR struct lib_outstream_s *obj, int fmt, int prec, if ((prec > 0 && !notrailing) || IS_ALTFORM(flags)) { - obj->put(obj, '.'); + lib_stream_putc(obj, '.'); /* Always print at least one digit to the right of the decimal * point. @@ -297,11 +297,11 @@ static void lib_dtoa(FAR struct lib_outstream_s *obj, int fmt, int prec, { /* Print a single zero to the left of the decimal point */ - obj->put(obj, '0'); + lib_stream_putc(obj, '0'); /* Print the decimal point */ - obj->put(obj, '.'); + lib_stream_putc(obj, '.'); /* Print any leading zeros to the right of the decimal point */ @@ -325,12 +325,12 @@ static void lib_dtoa(FAR struct lib_outstream_s *obj, int fmt, int prec, { if (*digits != '\0') { - obj->put(obj, *digits); + lib_stream_putc(obj, *digits); digits++; } else { - obj->put(obj, '0'); + lib_stream_putc(obj, '0'); } } @@ -348,7 +348,7 @@ static void lib_dtoa(FAR struct lib_outstream_s *obj, int fmt, int prec, { /* Print the decimal point */ - obj->put(obj, '.'); + lib_stream_putc(obj, '.'); /* Always print at least one digit to the right of the decimal * point. @@ -382,7 +382,7 @@ static void lib_dtoa(FAR struct lib_outstream_s *obj, int fmt, int prec, for (i = nchars; i > 0; i--) { - obj->put(obj, *digits); + lib_stream_putc(obj, *digits); digits++; } diff --git a/libs/libc/stdio/lib_libvscanf.c b/libs/libc/stdio/lib_libvscanf.c index 1704092d843..0be28b5aafb 100644 --- a/libs/libc/stdio/lib_libvscanf.c +++ b/libs/libc/stdio/lib_libvscanf.c @@ -256,7 +256,7 @@ int lib_vscanf(FAR struct lib_instream_s *obj, FAR int *lastc, /* Get first character, we keep always the next character in c */ - c = lib_stream_get(obj); + c = lib_stream_getc(obj); while (fmt_char(fmt)) { @@ -266,7 +266,7 @@ int lib_vscanf(FAR struct lib_instream_s *obj, FAR int *lastc, { while (isspace(c)) { - c = lib_stream_get(obj); + c = lib_stream_getc(obj); } } @@ -366,7 +366,7 @@ int lib_vscanf(FAR struct lib_instream_s *obj, FAR int *lastc, while (isspace(c)) { - c = lib_stream_get(obj); + c = lib_stream_getc(obj); } /* But we only perform the data conversion is we still have @@ -390,7 +390,7 @@ int lib_vscanf(FAR struct lib_instream_s *obj, FAR int *lastc, } fwidth++; - c = lib_stream_get(obj); + c = lib_stream_getc(obj); } if (!noassign) @@ -445,7 +445,7 @@ int lib_vscanf(FAR struct lib_instream_s *obj, FAR int *lastc, } fwidth++; - c = lib_stream_get(obj); + c = lib_stream_getc(obj); } if (!fwidth) @@ -509,7 +509,7 @@ int lib_vscanf(FAR struct lib_instream_s *obj, FAR int *lastc, } fwidth++; - c = lib_stream_get(obj); + c = lib_stream_getc(obj); } if (fwidth != width) @@ -582,7 +582,7 @@ int lib_vscanf(FAR struct lib_instream_s *obj, FAR int *lastc, while (isspace(c)) { - c = lib_stream_get(obj); + c = lib_stream_getc(obj); } /* But we only perform the data conversion if we still have @@ -641,7 +641,7 @@ int lib_vscanf(FAR struct lib_instream_s *obj, FAR int *lastc, if (!stopconv) { tmp[fwidth++] = c; - c = lib_stream_get(obj); + c = lib_stream_getc(obj); } } @@ -691,7 +691,7 @@ int lib_vscanf(FAR struct lib_instream_s *obj, FAR int *lastc, if (!stopconv) { tmp[fwidth++] = c; - c = lib_stream_get(obj); + c = lib_stream_getc(obj); } } @@ -716,7 +716,7 @@ int lib_vscanf(FAR struct lib_instream_s *obj, FAR int *lastc, if (!stopconv) { tmp[fwidth++] = c; - c = lib_stream_get(obj); + c = lib_stream_getc(obj); } } @@ -741,7 +741,7 @@ int lib_vscanf(FAR struct lib_instream_s *obj, FAR int *lastc, if (!stopconv) { tmp[fwidth++] = c; - c = lib_stream_get(obj); + c = lib_stream_getc(obj); } } @@ -796,7 +796,7 @@ int lib_vscanf(FAR struct lib_instream_s *obj, FAR int *lastc, if (!stopconv) { tmp[fwidth++] = c; - c = lib_stream_get(obj); + c = lib_stream_getc(obj); } } break; @@ -954,7 +954,7 @@ int lib_vscanf(FAR struct lib_instream_s *obj, FAR int *lastc, while (isspace(c)) { - c = lib_stream_get(obj); + c = lib_stream_getc(obj); } /* But we only perform the data conversion is we still have @@ -1038,7 +1038,7 @@ int lib_vscanf(FAR struct lib_instream_s *obj, FAR int *lastc, if (!stopconv) { tmp[fwidth++] = c; - c = lib_stream_get(obj); + c = lib_stream_getc(obj); } } @@ -1168,7 +1168,7 @@ int lib_vscanf(FAR struct lib_instream_s *obj, FAR int *lastc, } else { - c = lib_stream_get(obj); + c = lib_stream_getc(obj); } } @@ -1188,7 +1188,7 @@ int lib_vscanf(FAR struct lib_instream_s *obj, FAR int *lastc, while (isspace(c)) { - c = lib_stream_get(obj); + c = lib_stream_getc(obj); } #endif @@ -1201,7 +1201,7 @@ int lib_vscanf(FAR struct lib_instream_s *obj, FAR int *lastc, else { fmt++; - c = lib_stream_get(obj); + c = lib_stream_getc(obj); } } else diff --git a/libs/libc/stdio/lib_libvsprintf.c b/libs/libc/stdio/lib_libvsprintf.c index e074e4951cc..9fbcc02dbde 100644 --- a/libs/libc/stdio/lib_libvsprintf.c +++ b/libs/libc/stdio/lib_libvsprintf.c @@ -67,7 +67,7 @@ # undef CONFIG_LIBC_LONG_LONG #endif -#define stream_putc(c,stream) (total_len++, lib_stream_put(stream, c)) +#define stream_putc(c,stream) (total_len++, lib_stream_putc(stream, c)) /* Order is relevant here and matches order in format string */ diff --git a/libs/libc/stream/lib_blkoutstream.c b/libs/libc/stream/lib_blkoutstream.c index 970b273d88f..d96c27bdca0 100644 --- a/libs/libc/stream/lib_blkoutstream.c +++ b/libs/libc/stream/lib_blkoutstream.c @@ -227,7 +227,7 @@ int lib_blkoutstream_open(FAR struct lib_blkoutstream_s *stream, } stream->inode = inode; - stream->public.put = blkoutstream_putc; + stream->public.putc = blkoutstream_putc; stream->public.puts = blkoutstream_puts; stream->public.flush = blkoutstream_flush; diff --git a/libs/libc/stream/lib_lowoutstream.c b/libs/libc/stream/lib_lowoutstream.c index 899c736e0eb..8a9e2a83429 100644 --- a/libs/libc/stream/lib_lowoutstream.c +++ b/libs/libc/stream/lib_lowoutstream.c @@ -72,7 +72,7 @@ static void lowoutstream_putc(FAR struct lib_outstream_s *this, int ch) void lib_lowoutstream(FAR struct lib_outstream_s *stream) { - stream->put = lowoutstream_putc; + stream->putc = lowoutstream_putc; stream->flush = lib_noflush; stream->nput = 0; } diff --git a/libs/libc/stream/lib_lzfcompress.c b/libs/libc/stream/lib_lzfcompress.c index b508a9d1754..c66797f3f79 100644 --- a/libs/libc/stream/lib_lzfcompress.c +++ b/libs/libc/stream/lib_lzfcompress.c @@ -49,13 +49,13 @@ static int lzfoutstream_flush(FAR struct lib_outstream_s *this) stream->offset, stream->state, &header); if (outlen > 0) { - stream->backend->puts(stream->backend, header, outlen); + lib_stream_puts(stream->backend, header, outlen); } stream->offset = 0; } - return stream->backend->flush(stream->backend); + return lib_stream_flush(stream->backend); } /**************************************************************************** @@ -94,7 +94,7 @@ static int lzfoutstream_puts(FAR struct lib_outstream_s *this, &header); if (outlen > 0) { - ret = stream->backend->puts(stream->backend, header, outlen); + ret = lib_stream_puts(stream->backend, header, outlen); if (ret < 0) { return ret; diff --git a/libs/libc/stream/lib_meminstream.c b/libs/libc/stream/lib_meminstream.c index 313c7e82d5d..460910cb792 100644 --- a/libs/libc/stream/lib_meminstream.c +++ b/libs/libc/stream/lib_meminstream.c @@ -80,7 +80,7 @@ static int meminstream_getc(FAR struct lib_instream_s *this) void lib_meminstream(FAR struct lib_meminstream_s *instream, FAR const char *bufstart, int buflen) { - instream->public.get = meminstream_getc; + instream->public.getc = meminstream_getc; instream->public.nget = 0; /* Will be buffer index */ instream->buffer = bufstart; /* Start of buffer */ instream->buflen = buflen; /* Length of the buffer */ diff --git a/libs/libc/stream/lib_memoutstream.c b/libs/libc/stream/lib_memoutstream.c index 58c673e312a..fa4b1b45b74 100644 --- a/libs/libc/stream/lib_memoutstream.c +++ b/libs/libc/stream/lib_memoutstream.c @@ -94,7 +94,7 @@ static void memoutstream_putc(FAR struct lib_outstream_s *this, int ch) void lib_memoutstream(FAR struct lib_memoutstream_s *outstream, FAR char *bufstart, int buflen) { - outstream->public.put = memoutstream_putc; + outstream->public.putc = memoutstream_putc; outstream->public.puts = memoutstream_puts; outstream->public.flush = lib_noflush; outstream->public.nput = 0; /* Will be buffer index */ diff --git a/libs/libc/stream/lib_memsistream.c b/libs/libc/stream/lib_memsistream.c index cef2189d40f..15b1f166268 100644 --- a/libs/libc/stream/lib_memsistream.c +++ b/libs/libc/stream/lib_memsistream.c @@ -124,7 +124,7 @@ static off_t memsistream_seek(FAR struct lib_sistream_s *this, off_t offset, void lib_memsistream(FAR struct lib_memsistream_s *instream, FAR const char *bufstart, int buflen) { - instream->public.get = memsistream_getc; + instream->public.getc = memsistream_getc; instream->public.seek = memsistream_seek; instream->public.nget = 0; /* Total number of characters read */ instream->buffer = bufstart; /* Start of buffer */ diff --git a/libs/libc/stream/lib_memsostream.c b/libs/libc/stream/lib_memsostream.c index a488d96b616..55b73df8253 100644 --- a/libs/libc/stream/lib_memsostream.c +++ b/libs/libc/stream/lib_memsostream.c @@ -121,7 +121,7 @@ static off_t memsostream_seek(FAR struct lib_sostream_s *this, off_t offset, void lib_memsostream(FAR struct lib_memsostream_s *outstream, FAR char *bufstart, int buflen) { - outstream->public.put = memsostream_putc; + outstream->public.putc = memsostream_putc; outstream->public.flush = lib_snoflush; outstream->public.seek = memsostream_seek; outstream->public.nput = 0; /* Total number of characters written */ diff --git a/libs/libc/stream/lib_mtdoutstream.c b/libs/libc/stream/lib_mtdoutstream.c index c488b2c6b4a..a5ae94c950e 100644 --- a/libs/libc/stream/lib_mtdoutstream.c +++ b/libs/libc/stream/lib_mtdoutstream.c @@ -302,7 +302,7 @@ int lib_mtdoutstream_open(FAR struct lib_mtdoutstream_s *stream, } stream->inode = node; - stream->public.put = mtdoutstream_putc; + stream->public.putc = mtdoutstream_putc; stream->public.puts = mtdoutstream_puts; stream->public.flush = mtdoutstream_flush; diff --git a/libs/libc/stream/lib_nullinstream.c b/libs/libc/stream/lib_nullinstream.c index 9dd1f3c406a..3fa0c4f9440 100644 --- a/libs/libc/stream/lib_nullinstream.c +++ b/libs/libc/stream/lib_nullinstream.c @@ -59,6 +59,6 @@ static int nullinstream_getc(FAR struct lib_instream_s *this) void lib_nullinstream(FAR struct lib_instream_s *nullinstream) { - nullinstream->get = nullinstream_getc; + nullinstream->getc = nullinstream_getc; nullinstream->nget = 0; } diff --git a/libs/libc/stream/lib_nulloutstream.c b/libs/libc/stream/lib_nulloutstream.c index 692ff185ca1..20b305a85bf 100644 --- a/libs/libc/stream/lib_nulloutstream.c +++ b/libs/libc/stream/lib_nulloutstream.c @@ -61,7 +61,7 @@ static void nulloutstream_putc(FAR struct lib_outstream_s *this, int ch) void lib_nulloutstream(FAR struct lib_outstream_s *nulloutstream) { - nulloutstream->put = nulloutstream_putc; + nulloutstream->putc = nulloutstream_putc; nulloutstream->flush = lib_noflush; nulloutstream->nput = 0; } diff --git a/libs/libc/stream/lib_rawinstream.c b/libs/libc/stream/lib_rawinstream.c index b51f0194d1b..88e180d2b51 100644 --- a/libs/libc/stream/lib_rawinstream.c +++ b/libs/libc/stream/lib_rawinstream.c @@ -89,7 +89,7 @@ static int rawinstream_getc(FAR struct lib_instream_s *this) void lib_rawinstream(FAR struct lib_rawinstream_s *instream, int fd) { - instream->public.get = rawinstream_getc; + instream->public.getc = rawinstream_getc; instream->public.nget = 0; instream->fd = fd; } diff --git a/libs/libc/stream/lib_rawoutstream.c b/libs/libc/stream/lib_rawoutstream.c index 67bf5b43571..7b2d255f422 100644 --- a/libs/libc/stream/lib_rawoutstream.c +++ b/libs/libc/stream/lib_rawoutstream.c @@ -109,7 +109,7 @@ static off_t rawsostream_seek(FAR struct lib_sostream_s *this, off_t offset, void lib_rawsostream(FAR struct lib_rawsostream_s *outstream, int fd) { - outstream->public.put = rawsostream_putc; + outstream->public.putc = rawsostream_putc; outstream->public.flush = lib_snoflush; outstream->public.seek = rawsostream_seek; outstream->public.nput = 0; diff --git a/libs/libc/stream/lib_rawsistream.c b/libs/libc/stream/lib_rawsistream.c index d5a6d2bb5dd..8b2268b4f8a 100644 --- a/libs/libc/stream/lib_rawsistream.c +++ b/libs/libc/stream/lib_rawsistream.c @@ -102,7 +102,7 @@ static off_t rawsistream_seek(FAR struct lib_sistream_s *this, off_t offset, void lib_rawsistream(FAR struct lib_rawsistream_s *instream, int fd) { - instream->public.get = rawsistream_getc; + instream->public.getc = rawsistream_getc; instream->public.seek = rawsistream_seek; instream->public.nget = 0; instream->fd = fd; diff --git a/libs/libc/stream/lib_rawsostream.c b/libs/libc/stream/lib_rawsostream.c index 0c417cd64c8..7cfded60e4a 100644 --- a/libs/libc/stream/lib_rawsostream.c +++ b/libs/libc/stream/lib_rawsostream.c @@ -102,7 +102,7 @@ static void rawoutstream_putc(FAR struct lib_outstream_s *this, int ch) void lib_rawoutstream(FAR struct lib_rawoutstream_s *outstream, int fd) { - outstream->public.put = rawoutstream_putc; + outstream->public.putc = rawoutstream_putc; outstream->public.puts = rawoutstream_puts; outstream->public.flush = lib_noflush; outstream->public.nput = 0; diff --git a/libs/libc/stream/lib_stdinstream.c b/libs/libc/stream/lib_stdinstream.c index ddc2fdf4294..e218d20ecdc 100644 --- a/libs/libc/stream/lib_stdinstream.c +++ b/libs/libc/stream/lib_stdinstream.c @@ -76,7 +76,7 @@ static int stdinstream_getc(FAR struct lib_instream_s *this) void lib_stdinstream(FAR struct lib_stdinstream_s *instream, FAR FILE *stream) { - instream->public.get = stdinstream_getc; + instream->public.getc = stdinstream_getc; instream->public.nget = 0; instream->stream = stream; } diff --git a/libs/libc/stream/lib_stdoutstream.c b/libs/libc/stream/lib_stdoutstream.c index e893cc42939..3b77d074ff0 100644 --- a/libs/libc/stream/lib_stdoutstream.c +++ b/libs/libc/stream/lib_stdoutstream.c @@ -103,9 +103,9 @@ static int stdoutstream_flush(FAR struct lib_outstream_s *this) void lib_stdoutstream(FAR struct lib_stdoutstream_s *outstream, FAR FILE *stream) { - /* Select the put operation */ + /* Select the putc operation */ - outstream->public.put = stdoutstream_putc; + outstream->public.putc = stdoutstream_putc; /* Select the correct flush operation. This flush is only called when * a newline is encountered in the output stream. However, we do not diff --git a/libs/libc/stream/lib_stdsistream.c b/libs/libc/stream/lib_stdsistream.c index 1b83d74a19b..41ca3434e37 100644 --- a/libs/libc/stream/lib_stdsistream.c +++ b/libs/libc/stream/lib_stdsistream.c @@ -89,7 +89,7 @@ static off_t stdsistream_seek(FAR struct lib_sistream_s *this, off_t offset, void lib_stdsistream(FAR struct lib_stdsistream_s *instream, FAR FILE *stream) { - instream->public.get = stdsistream_getc; + instream->public.getc = stdsistream_getc; instream->public.seek = stdsistream_seek; instream->public.nget = 0; instream->stream = stream; diff --git a/libs/libc/stream/lib_stdsostream.c b/libs/libc/stream/lib_stdsostream.c index 2e5aa9e3ba4..c73dac066b9 100644 --- a/libs/libc/stream/lib_stdsostream.c +++ b/libs/libc/stream/lib_stdsostream.c @@ -114,9 +114,9 @@ static off_t stdsostream_seek(FAR struct lib_sostream_s *this, off_t offset, void lib_stdsostream(FAR struct lib_stdsostream_s *outstream, FAR FILE *stream) { - /* Select the put operation */ + /* Select the putc operation */ - outstream->public.put = stdsostream_putc; + outstream->public.putc = stdsostream_putc; /* Select the correct flush operation. This flush is only called when * a newline is encountered in the output stream. However, we do not diff --git a/libs/libc/stream/lib_syslogstream.c b/libs/libc/stream/lib_syslogstream.c index d57ab257077..fd0d8b5b311 100644 --- a/libs/libc/stream/lib_syslogstream.c +++ b/libs/libc/stream/lib_syslogstream.c @@ -191,7 +191,7 @@ void lib_syslogstream_open(FAR struct lib_syslogstream_s *stream) /* Initialize the common fields */ - stream->public.put = syslogstream_putc; + stream->public.putc = syslogstream_putc; stream->public.flush = lib_noflush; stream->public.nput = 0; diff --git a/libs/libc/stream/lib_zeroinstream.c b/libs/libc/stream/lib_zeroinstream.c index d1a8ac059f9..1cd42177f7d 100644 --- a/libs/libc/stream/lib_zeroinstream.c +++ b/libs/libc/stream/lib_zeroinstream.c @@ -58,6 +58,6 @@ static int zeroinstream_getc(FAR struct lib_instream_s *this) void lib_zeroinstream(FAR struct lib_instream_s *zeroinstream) { - zeroinstream->get = zeroinstream_getc; + zeroinstream->getc = zeroinstream_getc; zeroinstream->nget = 0; }