cb2256 | 1995-10-11 | Fredrik Hübinette (Hubbe) | | |
06983f | 1996-09-22 | Fredrik Hübinette (Hubbe) | | ||| This file a part of Pike, and is copyright by Fredrik Hubinette
||| Pike is distributed as GPL (General Public License)
|
cb2256 | 1995-10-11 | Fredrik Hübinette (Hubbe) | | ||| See the files COPYING and DISCLAIMER for more information.
\*/
|
24ddc7 | 1998-03-28 | Henrik Grubbström (Grubba) | |
|
20f7a0 | 2000-03-20 | Fredrik Hübinette (Hubbe) | | * $Id: dynamic_buffer.h,v 1.7 2000/03/20 21:00:04 hubbe Exp $
|
24ddc7 | 1998-03-28 | Henrik Grubbström (Grubba) | | */
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | #ifndef DYNAMIC_BUFFER_H
#define DYNAMIC_BUFFER_H
#define BUFFER_BEGIN_SIZE 4080
struct string_s
{
char *str;
SIZE_T len;
};
typedef struct string_s string;
struct dynamic_buffer_s
{
string s;
SIZE_T bufsize;
};
typedef struct dynamic_buffer_s dynamic_buffer;
|
61e9a0 | 1998-01-25 | Fredrik Hübinette (Hubbe) | | char *low_make_buf_space(INT32 space, dynamic_buffer *buf);
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | void low_my_putchar(char b,dynamic_buffer *buf);
void low_my_binary_strcat(const char *b,INT32 l,dynamic_buffer *buf);
|
61e9a0 | 1998-01-25 | Fredrik Hübinette (Hubbe) | | void debug_initialize_buf(dynamic_buffer *buf);
|
e43ca2 | 1996-11-15 | Fredrik Hübinette (Hubbe) | | void low_reinit_buf(dynamic_buffer *buf);
|
61e9a0 | 1998-01-25 | Fredrik Hübinette (Hubbe) | | void low_init_buf_with_string(string s, dynamic_buffer *buf);
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | string complex_free_buf(void);
void toss_buffer(dynamic_buffer *buf);
char *simple_free_buf(void);
|
3c0c28 | 1998-01-26 | Fredrik Hübinette (Hubbe) | | struct pike_string *debug_low_free_buf(dynamic_buffer *buf);
struct pike_string *debug_free_buf(void);
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | char *make_buf_space(INT32 space);
void my_putchar(char b);
void my_binary_strcat(const char *b,INT32 l);
void my_strcat(const char *b);
void init_buf(void);
void init_buf_with_string(string s);
|
3c0c28 | 1998-01-26 | Fredrik Hübinette (Hubbe) | | char *debug_return_buf(void);
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | |
|
61e9a0 | 1998-01-25 | Fredrik Hübinette (Hubbe) | | #ifdef DEBUG_MALLOC
#define initialize_buf(X) \
do { dynamic_buffer *b_=(X); debug_initialize_buf(b_); \
|
20f7a0 | 2000-03-20 | Fredrik Hübinette (Hubbe) | | debug_malloc_touch(b_->s.str); } while(0)
|
3c0c28 | 1998-01-26 | Fredrik Hübinette (Hubbe) | | #define low_free_buf(X) \
((struct pike_string *)debug_malloc_touch(debug_low_free_buf(X)))
#define free_buf() \
((struct pike_string *)debug_malloc_touch(debug_free_buf()))
#define return_buf() \
((char *)debug_malloc_touch(debug_return_buf()))
|
61e9a0 | 1998-01-25 | Fredrik Hübinette (Hubbe) | | #else
#define initialize_buf debug_initialize_buf
|
3c0c28 | 1998-01-26 | Fredrik Hübinette (Hubbe) | | #define low_free_buf debug_low_free_buf
#define free_buf debug_free_buf
#define return_buf debug_return_buf
|
61e9a0 | 1998-01-25 | Fredrik Hübinette (Hubbe) | | #endif
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | #endif
|