Lines Matching refs:gap

306 static int write_spell_prefcond(FILE *fd, garray_T *gap);
310 static int read_rep_section(FILE *fd, garray_T *gap, short *first);
944 read_rep_section(FILE *fd, garray_T *gap, short *first) in read_rep_section() argument
954 if (ga_grow(gap, cnt) == FAIL) in read_rep_section()
958 for (; gap->ga_len < cnt; ++gap->ga_len) in read_rep_section()
960 ftp = &((fromto_T *)gap->ga_data)[gap->ga_len]; in read_rep_section()
979 for (i = 0; i < gap->ga_len; ++i) in read_rep_section()
981 ftp = &((fromto_T *)gap->ga_data)[i]; in read_rep_section()
997 garray_T *gap; in read_sal_section() local
1016 gap = &slang->sl_sal; in read_sal_section()
1017 ga_init2(gap, sizeof(salitem_T), 10); in read_sal_section()
1018 if (ga_grow(gap, cnt + 1) == FAIL) in read_sal_section()
1022 for (; gap->ga_len < cnt; ++gap->ga_len) in read_sal_section()
1026 smp = &((salitem_T *)gap->ga_data)[gap->ga_len]; in read_sal_section()
1107 if (gap->ga_len > 0) in read_sal_section()
1111 smp = &((salitem_T *)gap->ga_data)[gap->ga_len]; in read_sal_section()
1127 ++gap->ga_len; in read_sal_section()
1226 garray_T *gap; in read_compound() local
1259 gap = &slang->sl_comppat; in read_compound()
1264 ga_init2(gap, sizeof(char_u *), c); in read_compound()
1265 if (ga_grow(gap, c) == OK) in read_compound()
1268 ((char_u **)(gap->ga_data))[gap->ga_len++] = in read_compound()
1413 garray_T *gap; in set_sofo() local
1425 gap = &lp->sl_sal; in set_sofo()
1426 ga_init2(gap, sizeof(int *), 1); in set_sofo()
1427 if (ga_grow(gap, 256) == FAIL) in set_sofo()
1429 vim_memset(gap->ga_data, 0, sizeof(int *) * 256); in set_sofo()
1430 gap->ga_len = 256; in set_sofo()
1451 ((int **)gap->ga_data)[i] = (int *)p; in set_sofo()
1466 inp = ((int **)gap->ga_data)[c & 0xff]; in set_sofo()
1502 garray_T *gap = &lp->sl_sal; in set_sal_first() local
1507 smp = (salitem_T *)gap->ga_data; in set_sal_first()
1508 for (i = 0; i < gap->ga_len; ++i) in set_sal_first()
1527 while (i + 1 < gap->ga_len in set_sal_first()
1532 for (n = 1; i + n < gap->ga_len; ++n) in set_sal_first()
1996 static void add_fromto(spellinfo_T *spin, garray_T *gap, char_u *from, char_u *to);
2015 static int sug_filltable(spellinfo_T *spin, wordnode_T *node, int startwordnr, garray_T *gap);
2548 garray_T *gap = &spin->si_comppat; in spell_read_aff() local
2552 for (i = 0; i < gap->ga_len - 1; i += 2) in spell_read_aff()
2553 if (STRCMP(((char_u **)(gap->ga_data))[i], items[1]) == 0 in spell_read_aff()
2554 && STRCMP(((char_u **)(gap->ga_data))[i + 1], in spell_read_aff()
2557 if (i >= gap->ga_len && ga_grow(gap, 2) == OK) in spell_read_aff()
2559 ((char_u **)(gap->ga_data))[gap->ga_len++] in spell_read_aff()
2561 ((char_u **)(gap->ga_data))[gap->ga_len++] in spell_read_aff()
3424 garray_T *gap, in add_fromto() argument
3431 if (ga_grow(gap, 1) == OK) in add_fromto()
3433 ftp = ((fromto_T *)gap->ga_data) + gap->ga_len; in add_fromto()
3438 ++gap->ga_len; in add_fromto()
4865 garray_T *gap; in write_vim_spell() local
4996 gap = &spin->si_rep; in write_vim_spell()
5002 gap = &spin->si_sal; in write_vim_spell()
5005 gap = &spin->si_repsal; in write_vim_spell()
5008 if (gap->ga_len == 0) in write_vim_spell()
5013 qsort(gap->ga_data, (size_t)gap->ga_len, in write_vim_spell()
5024 for (i = 0; i < gap->ga_len; ++i) in write_vim_spell()
5026 ftp = &((fromto_T *)gap->ga_data)[i]; in write_vim_spell()
5046 put_bytes(fd, (long_u)gap->ga_len, 2); // <repcount> or <salcount> in write_vim_spell()
5047 for (i = 0; i < gap->ga_len; ++i) in write_vim_spell()
5051 ftp = &((fromto_T *)gap->ga_data)[i]; in write_vim_spell()
5685 garray_T *gap) // place to store line of numbers in sug_filltable() argument
5696 gap->ga_len = 0; in sug_filltable()
5700 if (ga_grow(gap, 10) == FAIL) in sug_filltable()
5710 gap->ga_len += offset2bytes(nr, in sug_filltable()
5711 (char_u *)gap->ga_data + gap->ga_len); in sug_filltable()
5715 ((char_u *)gap->ga_data)[gap->ga_len++] = NUL; in sug_filltable()
5718 gap->ga_data, gap->ga_len, TRUE) == FAIL) in sug_filltable()
5734 wordnr = sug_filltable(spin, p->wn_child, wordnr, gap); in sug_filltable()
6573 write_spell_prefcond(FILE *fd, garray_T *gap) in write_spell_prefcond() argument
6582 put_bytes(fd, (long_u)gap->ga_len, 2); // <prefcondcnt> in write_spell_prefcond()
6584 totlen = 2 + gap->ga_len; // length of <prefcondcnt> and <condlen> bytes in write_spell_prefcond()
6586 for (i = 0; i < gap->ga_len; ++i) in write_spell_prefcond()
6589 p = ((char_u **)gap->ga_data)[i]; in write_spell_prefcond()