pike.git / src / dynamic_buffer.c

version» Context lines:

pike.git/src/dynamic_buffer.c:3:   ||| Pike is distributed as GPL (General Public License)   ||| See the files COPYING and DISCLAIMER for more information.   \*/   /**/   #include "global.h"   #include "dynamic_buffer.h"   #include "stralloc.h"   #include "error.h"   #include "pike_memory.h"    - RCSID("$Id: dynamic_buffer.c,v 1.11 2000/08/04 10:59:22 grubba Exp $"); + RCSID("$Id: dynamic_buffer.c,v 1.12 2000/08/10 09:03:10 grubba Exp $");      static dynamic_buffer buff;      PMOD_EXPORT char *low_make_buf_space(size_t space, dynamic_buffer *buf)   {    char *ret;   #ifdef PIKE_DEBUG    if(!buf->s.str) fatal("ARRRRGH! Deadly Trap!\n");   #endif   
pike.git/src/dynamic_buffer.c:121:    q=make_shared_binary_string(buf->s.str,buf->s.len);    free(buf->s.str);    buf->s.str=0;    buf->s.len=0;    return q;   }      PMOD_EXPORT struct pike_string *debug_free_buf(void) { return low_free_buf(&buff); }   PMOD_EXPORT char *make_buf_space(INT32 space) { return low_make_buf_space(space,&buff); }   PMOD_EXPORT void my_putchar(char b) { low_my_putchar(b,&buff); } - PMOD_EXPORT void my_binary_strcat(const char *b,INT32 l) { low_my_binary_strcat(b,l,&buff); } + PMOD_EXPORT void my_binary_strcat(const char *b, ptrdiff_t l) { low_my_binary_strcat(b,l,&buff); }   PMOD_EXPORT void my_strcat(const char *b) { my_binary_strcat(b,strlen(b)); }   PMOD_EXPORT void init_buf(void) { low_reinit_buf(&buff); }   PMOD_EXPORT void init_buf_with_string(string s) { low_init_buf_with_string(s,&buff); }   PMOD_EXPORT char *debug_return_buf(void)   {    my_putchar(0);    return buff.s.str;   }   /* int my_get_buf_size() { return buff->s.len; } */