~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/my_sys.h

  • Committer: Monty Taylor
  • Date: 2008-09-05 22:55:50 UTC
  • mfrom: (373.1.9 stl-client-progs)
  • Revision ID: monty@inaugust.com-20080905225550-zco374c9s7kxwqyb
Merged removal of DYNAMIC_STRING.

Show diffs side-by-side

added added

removed removed

Lines of Context:
280
280
  pthread_mutex_t mutex;
281
281
} MY_TMPDIR;
282
282
 
283
 
typedef struct st_dynamic_string
284
 
{
285
 
  char *str;
286
 
  size_t length,max_length,alloc_increment;
287
 
} DYNAMIC_STRING;
288
 
 
289
283
struct st_io_cache;
290
284
typedef int (*IO_CACHE_CALLBACK)(struct st_io_cache*);
291
285
 
706
700
#define reset_dynamic(array) ((array)->elements= 0)
707
701
#define sort_dynamic(A,cmp) my_qsort((A)->buffer, (A)->elements, (A)->size_of_element, (cmp))
708
702
 
709
 
extern bool init_dynamic_string(DYNAMIC_STRING *str, const char *init_str,
710
 
                                   size_t init_alloc,size_t alloc_increment);
711
 
extern bool dynstr_append(DYNAMIC_STRING *str, const char *append);
712
 
bool dynstr_append_mem(DYNAMIC_STRING *str, const char *append,
713
 
                          size_t length);
714
 
extern bool dynstr_append_os_quoted(DYNAMIC_STRING *str, const char *append,
715
 
                                       ...);
716
 
extern bool dynstr_set(DYNAMIC_STRING *str, const char *init_str);
717
 
extern bool dynstr_realloc(DYNAMIC_STRING *str, size_t additional_size);
718
 
extern bool dynstr_trunc(DYNAMIC_STRING *str, size_t n);
719
 
extern void dynstr_free(DYNAMIC_STRING *str);
720
703
#define my_malloc_lock(A,B) my_malloc((A),(B))
721
704
#define my_free_lock(A,B) my_free((A),(B))
722
705
#define alloc_root_inited(A) ((A)->min_malloc != 0)