Last change
on this file since f806726 was 3ae31e9, checked in by Thomas Lopatic <thomas@…>, 7 years ago |
Imported original source code.
|
-
Property mode
set to
100755
|
File size:
530 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 | setbuf(stream, buffer)
|
---|
11 | register FILE *stream;
|
---|
12 | char *buffer;
|
---|
13 | {
|
---|
14 | if (stream->_buff)
|
---|
15 | return;
|
---|
16 |
|
---|
17 | if (buffer) {
|
---|
18 |
|
---|
19 | stream->_buff = buffer;
|
---|
20 | stream->_buflen = BUFSIZ;
|
---|
21 |
|
---|
22 | } else {
|
---|
23 |
|
---|
24 | stream->_buff = &stream->_bytbuf;
|
---|
25 | stream->_buflen = 1;
|
---|
26 | }
|
---|
27 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.