Last change
on this file since 445 was 444, checked in by coas-nagasima, 4 years ago |
muslのソースコードを追加
|
-
Property svn:eol-style
set to
native
-
Property svn:mime-type
set to
text/x-csrc;charset=UTF-8
|
File size:
732 bytes
|
Rev | Line | |
---|
[444] | 1 | #include "stdio_impl.h"
|
---|
| 2 |
|
---|
| 3 | /* This function makes no attempt to protect the user from his/her own
|
---|
| 4 | * stupidity. If called any time but when then ISO C standard specifically
|
---|
| 5 | * allows it, all hell can and will break loose, especially with threads!
|
---|
| 6 | *
|
---|
| 7 | * This implementation ignores all arguments except the buffering type,
|
---|
| 8 | * and uses the existing buffer allocated alongside the FILE object.
|
---|
| 9 | * In the case of stderr where the preexisting buffer is length 1, it
|
---|
| 10 | * is not possible to set line buffering or full buffering. */
|
---|
| 11 |
|
---|
| 12 | int setvbuf(FILE *restrict f, char *restrict buf, int type, size_t size)
|
---|
| 13 | {
|
---|
| 14 | f->lbf = EOF;
|
---|
| 15 |
|
---|
| 16 | if (type == _IONBF)
|
---|
| 17 | f->buf_size = 0;
|
---|
| 18 | else if (type == _IOLBF)
|
---|
| 19 | f->lbf = '\n';
|
---|
| 20 |
|
---|
| 21 | f->flags |= F_SVB;
|
---|
| 22 |
|
---|
| 23 | return 0;
|
---|
| 24 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.