libc/stream: Rename lib_stream_[put|get]c to lib_stream_[put|get]

keep the macro consistent with the callback name

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2022-11-26 02:24:08 +08:00 committed by Petro Karashchenko
parent 6d30726a1b
commit df6666ab5e
6 changed files with 34 additions and 34 deletions

View File

@ -43,10 +43,10 @@
#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_putc(stream, ch) \
((FAR struct lib_outstream_s *)(stream))->putc( \
#define lib_stream_put(stream, ch) \
((FAR struct lib_outstream_s *)(stream))->put( \
(FAR struct lib_outstream_s *)(stream), ch)
#define lib_stream_getc(stream) \
#define lib_stream_get(stream) \
((FAR struct lib_instream_s *)(stream))->get( \
(FAR struct lib_instream_s *)(stream))
#define lib_stream_gets(stream, buf, len) \

View File

@ -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_getc(instream);
ch = lib_stream_get(instream);
while (ch != RECORD_STARTCODE && ch != EOF)
{
ch = lib_stream_getc(instream);
ch = lib_stream_get(instream);
}
/* Skip over the startcode */
if (ch != EOF)
{
ch = lib_stream_getc(instream);
ch = lib_stream_get(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_getc(instream);
ch = lib_stream_get(instream);
}
/* Some error occurred: Unexpected EOF, line too long, or bad character in

View File

@ -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_getc(stream);
ch = lib_stream_get(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_getc(stream);
ch = lib_stream_get(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_getc(stream);
ch = lib_stream_get(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_getc(stream);
ch = lib_stream_get(stream);
if (ch == EOF)
{
/* End of file/stream. Unget everything and return the ESC character.

View File

@ -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_getc(stream);
ch = lib_stream_get(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_getc(stream);
ch = lib_stream_get(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_getc(stream);
ch = lib_stream_get(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_getc(stream);
ch = lib_stream_get(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_getc(stream);
ch = lib_stream_get(stream);
if (ch == EOF)
{
/* End of file/stream. Return the ESC now; return the following

View File

@ -149,7 +149,7 @@ int __dtoa_engine(double x, FAR struct dtoa_s *dtoa, int max_digits,
/* Now convert mantissa to decimal. */
uint64_t mant = (uint64_t) x;
uint64_t mant = (uint64_t)x;
uint64_t decimal = MIN_MANT_INT;
/* Compute digits */

View File

@ -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_getc(obj);
c = lib_stream_get(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_getc(obj);
c = lib_stream_get(obj);
}
}
@ -366,7 +366,7 @@ int lib_vscanf(FAR struct lib_instream_s *obj, FAR int *lastc,
while (isspace(c))
{
c = lib_stream_getc(obj);
c = lib_stream_get(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_getc(obj);
c = lib_stream_get(obj);
}
if (!noassign)
@ -445,7 +445,7 @@ int lib_vscanf(FAR struct lib_instream_s *obj, FAR int *lastc,
}
fwidth++;
c = lib_stream_getc(obj);
c = lib_stream_get(obj);
}
if (!fwidth)
@ -509,7 +509,7 @@ int lib_vscanf(FAR struct lib_instream_s *obj, FAR int *lastc,
}
fwidth++;
c = lib_stream_getc(obj);
c = lib_stream_get(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_getc(obj);
c = lib_stream_get(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_getc(obj);
c = lib_stream_get(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_getc(obj);
c = lib_stream_get(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_getc(obj);
c = lib_stream_get(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_getc(obj);
c = lib_stream_get(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_getc(obj);
c = lib_stream_get(obj);
}
}
break;
@ -954,7 +954,7 @@ int lib_vscanf(FAR struct lib_instream_s *obj, FAR int *lastc,
while (isspace(c))
{
c = lib_stream_getc(obj);
c = lib_stream_get(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_getc(obj);
c = lib_stream_get(obj);
}
}
@ -1168,7 +1168,7 @@ int lib_vscanf(FAR struct lib_instream_s *obj, FAR int *lastc,
}
else
{
c = lib_stream_getc(obj);
c = lib_stream_get(obj);
}
}
@ -1188,7 +1188,7 @@ int lib_vscanf(FAR struct lib_instream_s *obj, FAR int *lastc,
while (isspace(c))
{
c = lib_stream_getc(obj);
c = lib_stream_get(obj);
}
#endif
@ -1201,7 +1201,7 @@ int lib_vscanf(FAR struct lib_instream_s *obj, FAR int *lastc,
else
{
fmt++;
c = lib_stream_getc(obj);
c = lib_stream_get(obj);
}
}
else