cirbuf_r.c - CIRcular BUFfer Routines.
A collection of routines to build and support a circular byte buffer.
Suitable for storing and buffering a data stream from a device like
a serial port. Or you can buffer display characters to a tty style window.
Function
|
alloc_circular_buff
|
Include file
|
CIRBUF_R.H
|
Prototype
|
CBUF * alloc_circular_buff( int size )
|
Remarks
|
Allocate, initialize and return a virgin circular buffer structure.
|
Function
|
init_circular_buff
|
Include file
|
CIRBUF_R.H
|
Prototype
|
void init_circular_buff( CBUF *cb_ptr )
|
Remarks
|
Reset the data pointers of the circular buffer.
|
Function
|
free_circular_buff
|
Include file
|
CIRBUF_R.H
|
Prototype
|
void free_circular_buff( CBUF *cb_ptr )
|
Remarks
|
Free a circular buffer structure.
|
Function
|
reset_read_circular_buff
|
Include file
|
CIRBUF_R.H
|
Prototype
|
void reset_read_circular_buff( CBUF *cb_ptr )
|
Remarks
|
Reset the temporary read pointer back to the tail.
|
Function
|
store_in_circular_buff
|
Include file
|
CIRBUF_R.H
|
Prototype
|
void store_in_circular_buff( CBUF *cb_ptr , char *str )
|
Remarks
|
Copy a data string into the circular buffer.
|
Function
|
set_lines_array
|
Include file
|
CIRBUF_R.H
|
Prototype
|
void set_lines_array( CBUF *cb_ptr )
|
Remarks
|
Sweep the circular buffer and set the line ptr array.
|
Function
|
get_next_from_circular_buff
|
Include file
|
CIRBUF_R.H
|
Prototype
|
char get_next_from_circular_buff( CBUF *cb_ptr )
|
Remarks
|
Return the next data value from the circular buffer and advance the
buffer pointers.
|
Table of Contents
Function Index
generated on 22 September 1998 - 12:54:35
© 1998 Tierra del Fuego Ltd.
|