home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / progm / ibmcom.zip / CIRC_BUF.H < prev    next >
Text File  |  1987-10-11  |  706b  |  17 lines

  1. /* Include file for circ_buf.c and  programs that use circular buffer
  2.     routines.
  3.  
  4.     Contains structure definitions for a circular buffer.
  5.                                                                     */
  6.     typedef struct {    
  7.         char *address;            /* begining address of buffer */
  8.         char *end;                /* end address of circular buffer */
  9.         int length;                /* length in bytes of circular buffer */
  10.         char *head;                /* head pointer for where to put the next byte */
  11.         char *tail;                /* tail pointer of where oldest or last byte is */
  12.         int char_count;        /* number of characters in buffer */
  13.         char overflow_flag;    /* overflow flag, set if too many characters have tried to be put in buffer (set by interrupt routines) */
  14.         }circ_buffer_description;
  15.  
  16.  
  17.