projects
/
fw
/
pdclib
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
s/stdin/stream to make function actually work. Thanks to Kevin of OSDev.org for point...
[fw/pdclib]
/
functions
/
stdio
/
fgets.c
diff --git
a/functions/stdio/fgets.c
b/functions/stdio/fgets.c
index f763e3333f18f5bc222044a19a02b330d4c4c3fb..a3c41e94085eb3f8fa610d57c926dfa8115c36ef 100644
(file)
--- a/
functions/stdio/fgets.c
+++ b/
functions/stdio/fgets.c
@@
-21,16
+21,16
@@
char * fgets( char * _PDCLIB_restrict s, int size, struct _PDCLIB_file_t * _PDCL
*s = '\0';
return s;
}
*s = '\0';
return s;
}
- if ( _PDCLIB_prepread( st
din
) == EOF )
+ if ( _PDCLIB_prepread( st
ream
) == EOF )
{
return NULL;
}
char * dest = s;
{
return NULL;
}
char * dest = s;
- while ( ( ( *dest = st
din->buffer[stdin
->bufidx++] ) != '\n' ) && --size > 0 )
+ while ( ( ( *dest = st
ream->buffer[stream
->bufidx++] ) != '\n' ) && --size > 0 )
{
{
- if ( st
din->bufidx == stdin
->bufend )
+ if ( st
ream->bufidx == stream
->bufend )
{
{
- if ( _PDCLIB_fillbuffer( st
din
) == EOF )
+ if ( _PDCLIB_fillbuffer( st
ream
) == EOF )
{
/* EOF adds \0, error leaves target indeterminate, so we can
just add the \0 anyway.
{
/* EOF adds \0, error leaves target indeterminate, so we can
just add the \0 anyway.