Move garray_T from structs.h to garray.h

This commit is contained in:
Felipe Oliveira Carvalho
2014-03-06 16:03:04 -03:00
committed by Thiago de Arruda
parent cab5c25c70
commit 3005681a02
2 changed files with 18 additions and 20 deletions

View File

@@ -1,6 +1,21 @@
#ifndef NEOVIM_GARRAY_H
#define NEOVIM_GARRAY_H
/*
* Structure used for growing arrays.
* This is used to store information that only grows, is deleted all at
* once, and needs to be accessed by index. See ga_clear() and ga_grow().
*/
typedef struct growarray {
int ga_len; /* current number of items used */
int ga_maxlen; /* maximum number of items possible */
int ga_itemsize; /* sizeof(item) */
int ga_growsize; /* number of items to grow each time */
void *ga_data; /* pointer to the first item */
} garray_T;
#define GA_EMPTY {0, 0, 0, 0, NULL}
void ga_clear(garray_T *gap);
void ga_clear_strings(garray_T *gap);
void ga_init(garray_T *gap);