Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 7699c21 in mainline


Ignore:
Timestamp:
2013-01-24T13:55:04Z (9 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master
Children:
0262f180
Parents:
6218d4b
Message:

Add setbuf() function (C89)

Location:
uspace/lib/c
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/io/io.c

    r6218d4b r7699c21  
    192192}
    193193
     194/** Set stream buffer.
     195 *
     196 * When @p buf is NULL, the stream is set as unbuffered, otherwise
     197 * full buffering is enabled.
     198 */
     199void setbuf(FILE *stream, void *buf)
     200{
     201        if (buf == NULL) {
     202                setvbuf(stream, NULL, _IONBF, BUFSIZ);
     203        } else {
     204                setvbuf(stream, buf, _IOFBF, BUFSIZ);
     205        }
     206}
     207
    194208static void _setvbuf(FILE *stream)
    195209{
  • uspace/lib/c/include/stdio.h

    r6218d4b r7699c21  
    143143
    144144extern void setvbuf(FILE *, void *, int, size_t);
     145extern void setbuf(FILE *, void *);
    145146
    146147/* Misc file functions */
Note: See TracChangeset for help on using the changeset viewer.