source:
buchla-68k/libcio/setbuf.c@
6262b5c
Last change on this file since 6262b5c was 6262b5c, checked in by , 7 years ago | |
---|---|
|
|
File size: 484 bytes |
Rev | Line | |
---|---|---|
[f40a309] | 1 | /* |
2 | ============================================================================ | |
3 | setbuf.c -- set a stream buffer | |
4 | Version 1 -- 1987-06-26 -- D.N. Lynx Crowe | |
5 | ============================================================================ | |
6 | */ | |
7 | ||
[6262b5c] | 8 | #include "all.h" |
[f40a309] | 9 | |
[7258c6a] | 10 | void setbuf(FILE *stream, int8_t *buffer) |
[f40a309] | 11 | { |
12 | if (stream->_buff) | |
13 | return; | |
14 | ||
15 | if (buffer) { | |
16 | ||
17 | stream->_buff = buffer; | |
18 | stream->_buflen = BUFSIZ; | |
19 | ||
20 | } else { | |
21 | ||
22 | stream->_buff = &stream->_bytbuf; | |
23 | stream->_buflen = 1; | |
24 | } | |
25 | } | |
[6262b5c] | 26 |
Note:
See TracBrowser
for help on using the repository browser.