Last change
on this file since 6099cac was b28a12e, checked in by Thomas Lopatic <thomas@…>, 7 years ago |
Zero redundant declarations.
|
-
Property mode
set to
100644
|
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 |
|
---|
[b28a12e] | 8 | #include "ram.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.