Moved the definition of the struct buffer_s into the buffer.c file and out
of the buffer.h file. This also required the removal of the BUFFER_SIZE macro, and replace it with the buffer_size() function.
This commit is contained in:
1 parent
d46cba8a0b
commit
bb9f206529
4 files changed
+41
-30
No files matched your search
+4
-15
@@ -1,4 +1,4 @@
|
||||
/* $Id: buffer.h,v 1.7 2001-11-25 22:05:42 rjkaes Exp $
|
||||
/* $Id: buffer.h,v 1.8 2002-05-14 00:43:38 rjkaes Exp $
|
||||
*
|
||||
* See 'buffer.c' for a detailed description.
|
||||
*
|
||||
@@ -18,23 +18,12 @@
|
||||
#ifndef _TINYPROXY_BUFFER_H_
|
||||
#define _TINYPROXY_BUFFER_H_
|
||||
|
||||
/*
|
||||
* This structure contains the total size of a buffer, plus pointers to the
|
||||
* head and tail of the buffer.
|
||||
*/
|
||||
struct buffer_s {
|
||||
struct bufline_s *head; /* top of the buffer */
|
||||
struct bufline_s *tail; /* bottom of the buffer */
|
||||
size_t size; /* total size of the buffer */
|
||||
};
|
||||
|
||||
/*
|
||||
* Return the size of a buffer (pass a pointer to a buffer_s structure.)
|
||||
*/
|
||||
#define BUFFER_SIZE(x) (x)->size
|
||||
/* Forward declaration */
|
||||
struct buffer_s;
|
||||
|
||||
extern struct buffer_s *new_buffer(void);
|
||||
extern void delete_buffer(struct buffer_s *buffptr);
|
||||
extern size_t buffer_size(struct buffer_s *buffptr);
|
||||
|
||||
/*
|
||||
* Add a new line to the given buffer. The data IS copied into the structure.
|
||||
|
||||
Reference in new issue
Block a user