|
Last change
on this file since 6a37d5b was b28a12e, checked in by Thomas Lopatic <thomas@…>, 8 years ago |
|
Zero redundant declarations.
|
-
Property mode
set to
100644
|
|
File size:
796 bytes
|
| Rev | Line | |
|---|
| [f40a309] | 1 | /*
|
|---|
| 2 | ============================================================================
|
|---|
| 3 | getbuff.c -- Get a buffer for a file for the Buchla 700 C I/O Library
|
|---|
| 4 | Version 4 -- 1987-06-24 -- D.N. Lynx Crowe
|
|---|
| 5 | ============================================================================
|
|---|
| 6 | */
|
|---|
| 7 |
|
|---|
| [b28a12e] | 8 | #include "ram.h"
|
|---|
| [f40a309] | 9 |
|
|---|
| [0580615] | 10 | void getbuff(FILE *ptr)
|
|---|
| [f40a309] | 11 | {
|
|---|
| [7258c6a] | 12 | int8_t *buffer;
|
|---|
| [f40a309] | 13 |
|
|---|
| 14 | if (ptr->_buflen EQ 1) { /* see if we want the small buffer */
|
|---|
| 15 |
|
|---|
| 16 | ptr->_buff = &ptr->_bytbuf;
|
|---|
| 17 | return;
|
|---|
| 18 | }
|
|---|
| 19 |
|
|---|
| 20 | if (Stdbufs) { /* see if we have any standard buffers left */
|
|---|
| 21 |
|
|---|
| [7258c6a] | 22 | buffer = (int8_t *)Stdbufs;
|
|---|
| 23 | Stdbufs = *(int32_t **)Stdbufs;
|
|---|
| [f40a309] | 24 |
|
|---|
| 25 | } else { /* ... if not, use the small one */
|
|---|
| 26 |
|
|---|
| 27 | ptr->_buff = &ptr->_bytbuf;
|
|---|
| 28 | ptr->_buflen = 1;
|
|---|
| 29 | return;
|
|---|
| 30 | }
|
|---|
| 31 |
|
|---|
| 32 | ptr->_flags |= _ALLBUF; /* say we allocated a standard buffer */
|
|---|
| 33 | ptr->_buff = buffer;
|
|---|
| 34 | return;
|
|---|
| 35 | }
|
|---|
| [6262b5c] | 36 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.