Last change
on this file since 9519422 was 7258c6a, checked in by Thomas Lopatic <thomas@…>, 7 years ago |
Use standard integer types.
|
-
Property mode
set to
100644
|
File size:
485 bytes
|
Line | |
---|
1 | /*
|
---|
2 | ============================================================================
|
---|
3 | setbuf.c -- set a stream buffer
|
---|
4 | Version 1 -- 1987-06-26 -- D.N. Lynx Crowe
|
---|
5 | ============================================================================
|
---|
6 | */
|
---|
7 |
|
---|
8 | #include "stdio.h"
|
---|
9 |
|
---|
10 | void setbuf(FILE *stream, int8_t *buffer)
|
---|
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 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.