Lines Matching +defs:tot +defs:len

25  *	len = byts[i]
26 * n = where "v" appears in byts[i + 1] to byts[i + len]
28 * len = byts[i]
29 * n = where "i" appears in byts[i + 1] to byts[i + len]
31 * len = byts[i]
318 #define MAXWLEN 250 /* Assume max. word len is this many bytes.
435 * <len> <byte1> <byte2> ...
858 static int read_region_section __ARGS((FILE *fd, slang_T *slang, int len));
863 static int read_words_section __ARGS((FILE *fd, slang_T *lp, int len));
864 static void count_common_word __ARGS((slang_T *lp, char_u *word, int len, int count));
867 static int read_compound __ARGS((FILE *fd, slang_T *slang, int len));
886 static int spell_casefold __ARGS((char_u *p, int len, char_u *buf, int buflen));
1236 int len;
1304 len = byts[arridx++];
1318 --len;
1322 while (len > 0 && byts[arridx] == 0)
1325 --len;
1327 if (len == 0)
1340 hi = arridx + len - 1;
1427 for (len = byts[arridx - 1]; len > 0 && byts[arridx] == 0;
1428 --len, ++arridx)
1755 int len;
1765 len = (int)STRLEN(p);
1766 if (len <= wlen && STRNCMP(ptr + wlen - len, p, len) == 0)
1979 int len;
2016 len = byts[arridx++];
2027 mip->mi_prefcnt = len;
2028 while (len > 0 && byts[arridx] == 0)
2031 --len;
2033 mip->mi_prefcnt -= len;
2054 if (len == 0)
2065 hi = arridx + len - 1;
2176 int len;
2210 len = (int)STRLEN(line);
2211 if (buflen < len + MAXWLEN + 2)
2214 buflen = len + MAXWLEN + 2;
2247 endp = buf + len;
2260 len = spell_check(wp, p, &attr, &capcol, FALSE);
2273 || (colnr_T)(curline ? p - buf + len
2305 return len;
2310 found_pos.col += len;
2311 found_len = len;
2320 p += len;
2321 capcol -= len;
2750 int len;
2831 len = get4c(fd); /* <sectionlen> */
2832 if (len < 0)
2839 lp->sl_info = read_string(fd, len); /* <infotext> */
2845 res = read_region_section(fd, lp, len);
2853 lp->sl_midword = read_string(fd, len); /* <midword> */
2879 p = read_string(fd, len); /* <mapstr> */
2887 res = read_words_section(fd, lp, len);
2899 res = read_compound(fd, lp, len);
2907 lp->sl_syllable = read_string(fd, len); /* <syllable> */
2922 while (--len >= 0)
3025 read_region_section(fd, lp, len)
3028 int len;
3032 if (len > 16)
3034 for (i = 0; i < len; ++i)
3036 lp->sl_regions[len] = NUL;
3337 read_words_section(fd, lp, len)
3340 int len;
3347 while (done < len)
3374 count_common_word(lp, word, len, count)
3377 int len; /* word length, -1 for upto NUL */
3386 if (len == -1)
3390 vim_strncpy(buf, word, len);
3496 read_compound(fd, slang, len)
3499 int len;
3501 int todo = len;
3766 int len;
3774 for (p = word; *p != NUL; p += len)
3779 len = 1;
3785 len = 0;
3789 if (syl->sy_len > len
3791 len = syl->sy_len;
3793 if (len != 0) /* found a match, count syllable */
3803 len = (*mb_ptr2len)(p);
3806 len = 1;
4015 int len;
4022 len = get4c(fd);
4023 if (len < 0)
4025 if (len > 0)
4028 bp = lalloc((long_u)len, TRUE);
4034 ip = (idx_T *)lalloc_clear((long_u)(len * sizeof(int)), TRUE);
4040 idx = read_tree_node(fd, bp, ip, len, 0, prefixtree, prefixcnt);
4067 int len;
4075 len = getc(fd); /* <siblingcount> */
4076 if (len <= 0)
4079 if (startidx + len >= maxidx)
4081 byts[idx++] = len;
4084 for (i = 1; i <= len; ++i)
4151 for (i = 1; i <= len; ++i)
4187 int len;
4222 len = (int)STRLEN(lang);
4227 if (len > 4 && fnamecmp(lang + len - 4, ".spl") == 0)
4237 mch_memmove(p, p + 3, len - (p - lang) - 2);
4238 len -= 3;
4252 if (len > 3 && lang[len - 3] == '_')
4254 region = lang + len - 2;
4255 len -= 3;
4256 lang[len] = NUL;
5008 static void *getroom __ARGS((spellinfo_T *spin, size_t len, int align));
5018 static int node_compress __ARGS((spellinfo_T *spin, wordnode_T *node, hashtab_T *ht, int *tot));
6249 int len;
6257 len = (int)STRLEN(compflags) + 1;
6259 len += (int)STRLEN(spin->si_compflags) + 1;
6260 p = getroom(spin, len, FALSE);
7323 * Get part of an sblock_T, "len" bytes long.
7330 getroom(spin, len, align)
7332 size_t len; /* length needed */
7344 if (bl == NULL || bl->sb_used + len > SBLOCKSIZE)
7357 bl->sb_used += (int)len;
7424 int len = (int)STRLEN(word);
7425 int ct = captype(word, word + len);
7430 (void)spell_casefold(word, len, foldword, MAXWLEN);
7756 int tot = 0;
7764 n = node_compress(spin, root->wn_sibling, &ht, &tot);
7770 if (tot > 1000000)
7771 perc = (tot - n) / (tot / 100);
7772 else if (tot == 0)
7775 perc = (tot - n) * 100 / tot;
7778 n, tot, tot - n, perc);
7793 node_compress(spin, node, ht, tot)
7797 int *tot; /* total count of nodes before compressing,
7805 int len = 0;
7817 ++len;
7821 compressed += node_compress(spin, child, ht, tot);
7858 *tot += len + 1; /* add one for the node that stores the length */
7865 node->wn_u1.hashkey[0] = len;
8191 int len = 0;
8199 len += l;
8205 put_bytes(fd, (long_u)len, 4); /* <sectionlen> */
8552 int len;
8616 len = (int)STRLEN(fname);
8617 fname[len - 2] = 'u';
8618 fname[len - 1] = 'g';
8933 int len;
8991 len = (int)STRLEN(line) + 1;
8992 if (fwrite(line, (size_t)len, (size_t)1, fd) == 0)
8997 spin->si_memtot += len;
9073 int len;
9098 len = (int)STRLEN(fnames[0]);
9099 if (fcount == 1 && len > 4 && STRCMP(fnames[0] + len - 4, ".add") == 0)
9115 else if (len > 4 && STRCMP(fnames[0] + len - 4, ".spl") == 0)
9165 len = (int)STRLEN(innames[i]);
9167 || innames[i][len - 3] != '_')
9172 spin.si_region_name[i * 2] = TOLOWER_ASC(innames[i][len - 2]);
9174 TOLOWER_ASC(innames[i][len - 1]);
9338 * Add "word[len]" to 'spellfile' as a good or bad word.
9341 spell_add_word(word, len, bad, idx, undo)
9343 int len;
9420 if (STRNCMP(word, line, len) == 0
9421 && (line[len] == '/' || line[len] < ' '))
9476 fprintf(fd, "%.*s/!\n", len, word);
9478 fprintf(fd, "%.*s\n", len, word);
9943 int len;
9958 len = (int)STRLEN(p);
9961 fputc(len, fd);
9962 x &= fwrite(p, (size_t)len, (size_t)1, fd);
9964 totlen += len;
9974 * Case-fold "str[len]" into "buf[buflen]". The result is NUL terminated.
9980 spell_casefold(str, len, buf, buflen)
9982 int len;
9988 if (len >= buflen)
10002 for (p = str; p < str + len; )
10018 for (i = 0; i < len; ++i)
10705 int len;
10728 for (len = 0; p[len] >= ' '; ++len)
10730 p[len] = NUL;
11172 size_t len;
11180 len = p - su->su_fbadword;
11182 if (STRLEN(p) == len && STRNCMP(su->su_fbadword, p, len) == 0)
11186 c = su->su_fbadword[len];
11187 su->su_fbadword[len] = NUL;
11189 su->su_fbadword[len] = c;
11294 int len;
11375 len = byts[arridx]; /* bytes in this node */
11381 for (n = 0; n < len && byts[arridx + n] == 0; ++n)
11427 if (sp->ts_curi > len || byts[arridx] != 0)
11460 len = pbyts[n++];
11461 for (c = 0; c < len && pbyts[n + c] == 0; ++c)
12782 int len;
12860 len = byts[tryidx++];
12863 hi = tryidx + len - 1;
13465 int len;
13479 len = byts[arridx++];
13490 while (len > 0 && byts[arridx] == NUL)
13493 --len;
13495 if (len == 0)
13512 if (--len == 0) /* end of the bytes, didn't find it */
13694 int badlenarg; /* len of bad word replaced with "goodword" */
13702 int goodlen; /* len of goodword changed */
13703 int badlen; /* len of bad word changed */
13836 int len;
13844 len = stp[i].st_wordlen;
13845 vim_strncpy(longword + len, su->su_badptr + stp[i].st_orglen,
13846 MAXWLEN - len);
15857 int len;
15883 len = byts[n];
15884 if (curi[depth] > len)
15899 for (i = 1; i < len; ++i)