|
Last change
on this file since 46d8069 was f40a309, checked in by Thomas Lopatic <thomas@…>, 8 years ago |
|
Unix line breaks.
|
-
Property mode
set to
100644
|
|
File size:
503 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.