Last change
on this file since f7428b1 was 7258c6a, checked in by Thomas Lopatic <thomas@…>, 7 years ago |
Use standard integer types.
|
-
Property mode
set to
100644
|
File size:
818 bytes
|
Line | |
---|
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 |
|
---|
8 | #include "stdio.h"
|
---|
9 | #include "stddefs.h"
|
---|
10 |
|
---|
11 | void getbuff(FILE *ptr)
|
---|
12 | {
|
---|
13 | int8_t *buffer;
|
---|
14 |
|
---|
15 | if (ptr->_buflen EQ 1) { /* see if we want the small buffer */
|
---|
16 |
|
---|
17 | ptr->_buff = &ptr->_bytbuf;
|
---|
18 | return;
|
---|
19 | }
|
---|
20 |
|
---|
21 | if (Stdbufs) { /* see if we have any standard buffers left */
|
---|
22 |
|
---|
23 | buffer = (int8_t *)Stdbufs;
|
---|
24 | Stdbufs = *(int32_t **)Stdbufs;
|
---|
25 |
|
---|
26 | } else { /* ... if not, use the small one */
|
---|
27 |
|
---|
28 | ptr->_buff = &ptr->_bytbuf;
|
---|
29 | ptr->_buflen = 1;
|
---|
30 | return;
|
---|
31 | }
|
---|
32 |
|
---|
33 | ptr->_flags |= _ALLBUF; /* say we allocated a standard buffer */
|
---|
34 | ptr->_buff = buffer;
|
---|
35 | return;
|
---|
36 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.