Lines Matching refs:p
344 char_u *p, *fp; in spell_check() local
352 p = mi.mi_word; in spell_check()
356 MB_PTR_ADV(p); in spell_check()
358 if (p >= mi.mi_end) in spell_check()
364 mi.mi_end = p; in spell_check()
413 char_u *p; in find_word() local
577 p = mip->mi_word; in find_word()
578 if (STRNCMP(ptr, p, wlen) != 0) in find_word()
581 MB_PTR_ADV(p); in find_word()
582 wlen = (int)(p - mip->mi_word); in find_word()
700 p = mip->mi_word; in find_word()
702 MB_PTR_ADV(p); in find_word()
705 p = mip->mi_word + mip->mi_compoff; in find_word()
706 capflags = captype(p, mip->mi_word + wlen); in find_word()
717 MB_PTR_BACK(mip->mi_word, p); in find_word()
718 if (spell_iswordp_nmw(p, mip->mi_win) in find_word()
783 p = mip->mi_fword; in find_word()
784 if (STRNCMP(ptr, p, wlen) != 0) in find_word()
787 MB_PTR_ADV(p); in find_word()
788 mip->mi_compoff = (int)(p - mip->mi_fword); in find_word()
915 char_u *p; in match_checkcompoundpattern() local
920 p = ((char_u **)gap->ga_data)[i + 1]; in match_checkcompoundpattern()
921 if (STRNCMP(ptr + wlen, p, STRLEN(p)) == 0) in match_checkcompoundpattern()
925 p = ((char_u **)gap->ga_data)[i]; in match_checkcompoundpattern()
926 len = (int)STRLEN(p); in match_checkcompoundpattern()
927 if (len <= wlen && STRNCMP(ptr + wlen - len, p, len) == 0) in match_checkcompoundpattern()
943 char_u *p; in can_compound() local
950 p = uflags; in can_compound()
952 p += utf_char2bytes(flags[i], p); in can_compound()
953 *p = NUL; in can_compound()
954 p = uflags; in can_compound()
957 p = flags; in can_compound()
958 if (!vim_regexec_prog(&slang->sl_compprog, FALSE, p, 0)) in can_compound()
979 char_u *p; in match_compoundrule() local
984 for (p = slang->sl_comprules; *p != NUL; ++p) in match_compoundrule()
994 if (*p == '/' || *p == NUL) in match_compoundrule()
996 if (*p == '[') in match_compoundrule()
1001 ++p; in match_compoundrule()
1002 while (*p != ']' && *p != NUL) in match_compoundrule()
1003 if (*p++ == c) in match_compoundrule()
1008 else if (*p != c) in match_compoundrule()
1010 ++p; in match_compoundrule()
1014 p = vim_strchr(p, '/'); in match_compoundrule()
1015 if (p == NULL) in match_compoundrule()
1206 char_u *p; in fold_more() local
1208 p = mip->mi_fend; in fold_more()
1217 (void)spell_casefold(mip->mi_win, p, (int)(mip->mi_fend - p), in fold_more()
1276 char_u *p; in spell_move_to() local
1349 p = buf + skip; in spell_move_to()
1351 while (p < endp) in spell_move_to()
1358 && (colnr_T)(p - buf) >= wp->w_cursor.col) in spell_move_to()
1363 len = spell_check(wp, p, &attr, &capcol, FALSE); in spell_move_to()
1376 || (colnr_T)(curline ? p - buf + len in spell_move_to()
1377 : p - buf) in spell_move_to()
1383 col = (int)(p - buf); in spell_move_to()
1397 found_pos.col = (int)(p - buf); in spell_move_to()
1421 p += len; in spell_move_to()
1483 skip = (int)(p - endp); in spell_move_to()
1511 char_u *p; in spell_cat_line() local
1514 p = skipwhite(line); in spell_cat_line()
1515 while (vim_strchr((char_u *)"*#/\"\t", *p) != NULL) in spell_cat_line()
1516 p = skipwhite(p + 1); in spell_cat_line()
1518 if (*p != NUL) in spell_cat_line()
1522 n = (int)(p - line) + 1; in spell_cat_line()
1526 vim_strncpy(buf + n, p, maxlen - 1 - n); in spell_cat_line()
1817 char_u *p; in count_common_word() local
1820 p = word; in count_common_word()
1826 p = buf; in count_common_word()
1829 hash = hash_hash(p); in count_common_word()
1830 hi = hash_lookup(&lp->sl_wordcount, p, hash); in count_common_word()
1833 wc = alloc(sizeof(wordcount_T) + STRLEN(p)); in count_common_word()
1836 STRCPY(wc->wc_word, p); in count_common_word()
1855 char_u *p; in byte_in_str() local
1857 for (p = str; *p != NUL; ++p) in byte_in_str()
1858 if (*p == n) in byte_in_str()
1877 char_u *p; in init_syl_tab() local
1883 p = vim_strchr(slang->sl_syllable, '/'); in init_syl_tab()
1884 while (p != NULL) in init_syl_tab()
1886 *p++ = NUL; in init_syl_tab()
1887 if (*p == NUL) // trailing slash in init_syl_tab()
1889 s = p; in init_syl_tab()
1890 p = vim_strchr(p, '/'); in init_syl_tab()
1891 if (p == NULL) in init_syl_tab()
1894 l = (int)(p - s); in init_syl_tab()
1917 char_u *p; in count_syllables() local
1926 for (p = word; *p != NUL; p += len) in count_syllables()
1929 if (*p == ' ') in count_syllables()
1942 && STRNCMP(p, syl->sy_chars, syl->sy_len) == 0) in count_syllables()
1953 c = mb_ptr2char(p); in count_syllables()
1954 len = (*mb_ptr2len)(p); in count_syllables()
1985 char_u *p; in did_set_spelllang() local
2043 p = vim_strchr(gettail(lang), '_'); in did_set_spelllang()
2044 if (p != NULL && ASCII_ISALPHA(p[1]) && ASCII_ISALPHA(p[2]) in did_set_spelllang()
2045 && !ASCII_ISALPHA(p[3])) in did_set_spelllang()
2047 vim_strncpy(region_cp, p + 1, 2); in did_set_spelllang()
2048 mch_memmove(p, p + 3, len - (p - lang) - 2); in did_set_spelllang()
2176 p = LANGP_ENTRY(ga, c)->lp_slang->sl_fname; in did_set_spelllang()
2177 if (p != NULL && fullpathcmp(spf_name, p, FALSE, TRUE) in did_set_spelllang()
2200 p = vim_strchr(lang, '.'); in did_set_spelllang()
2201 if (p != NULL) in did_set_spelllang()
2202 *p = NUL; // truncate at ".encoding.add" in did_set_spelllang()
2309 char_u *p; in use_midword() local
2314 for (p = lp->sl_midword; *p != NUL; ) in use_midword()
2320 c = mb_ptr2char(p); in use_midword()
2321 l = (*mb_ptr2len)(p); in use_midword()
2326 wp->w_s->b_spell_ismw_mb = vim_strnsave(p, l); in use_midword()
2336 vim_strncpy(bp + n, p, l); in use_midword()
2339 p += l; in use_midword()
2342 wp->w_s->b_spell_ismw[*p++] = TRUE; in use_midword()
2377 char_u *p; in captype() local
2384 for (p = word; !spell_iswordp_nmw(p, curwin); MB_PTR_ADV(p)) in captype()
2385 if (end == NULL ? *p == NUL : p >= end) in captype()
2388 c = mb_ptr2char_adv(&p); in captype()
2390 c = *p++; in captype()
2397 for ( ; end == NULL ? *p != NUL : p < end; MB_PTR_ADV(p)) in captype()
2398 if (spell_iswordp_nmw(p, curwin)) in captype()
2400 c = PTR2CHAR(p); in captype()
2636 char_u *p, in spell_iswordp() argument
2645 l = mb_ptr2len(p); in spell_iswordp()
2646 s = p; in spell_iswordp()
2650 if (wp->w_s->b_spell_ismw[*p]) in spell_iswordp()
2651 s = p + 1; // skip a mid-word character in spell_iswordp()
2655 c = mb_ptr2char(p); in spell_iswordp()
2659 s = p + l; in spell_iswordp()
2668 return spelltab.st_isw[wp->w_s->b_spell_ismw[*p] ? p[1] : p[0]]; in spell_iswordp()
2676 spell_iswordp_nmw(char_u *p, win_T *wp) in spell_iswordp_nmw() argument
2682 c = mb_ptr2char(p); in spell_iswordp_nmw()
2684 return spell_mb_isword_class(mb_get_class(p), wp); in spell_iswordp_nmw()
2687 return spelltab.st_isw[*p]; in spell_iswordp_nmw()
2710 spell_iswordp_w(int *p, win_T *wp) in spell_iswordp_w() argument
2714 if (*p < 256 ? wp->w_s->b_spell_ismw[*p] in spell_iswordp_w()
2716 && vim_strchr(wp->w_s->b_spell_ismw_mb, *p) != NULL)) in spell_iswordp_w()
2717 s = p + 1; in spell_iswordp_w()
2719 s = p; in spell_iswordp_w()
2758 char_u *p; in spell_casefold() local
2762 for (p = str; p < str + len; ) in spell_casefold()
2769 c = mb_cptr2char_adv(&p); in spell_casefold()
2776 if (p == str + len || !spell_iswordp(p, wp)) in spell_casefold()
2809 char_u *p; in check_need_cap() local
2846 p = line + endcol; in check_need_cap()
2849 MB_PTR_BACK(line, p); in check_need_cap()
2850 if (p == line || spell_iswordp_nmw(p, curwin)) in check_need_cap()
2852 if (vim_regexec(®match, p, 0) in check_need_cap()
2878 char_u *p; in ex_spellrepall() local
2910 p = alloc(STRLEN(line) + addlen + 1); in ex_spellrepall()
2911 if (p == NULL) in ex_spellrepall()
2913 mch_memmove(p, line, curwin->w_cursor.col); in ex_spellrepall()
2914 STRCPY(p + curwin->w_cursor.col, repl_to); in ex_spellrepall()
2915 STRCAT(p, line + curwin->w_cursor.col + STRLEN(repl_from)); in ex_spellrepall()
2916 ml_replace(curwin->w_cursor.lnum, p, FALSE); in ex_spellrepall()
2950 char_u *p; in onecap_copy() local
2954 p = word; in onecap_copy()
2956 c = mb_cptr2char_adv(&p); in onecap_copy()
2958 c = *p++; in onecap_copy()
2970 vim_strncpy(wcopy + l, p, MAXWLEN - l - 1); in onecap_copy()
3027 char_u *p; in nofold_len() local
3030 for (p = fword; p < fword + flen; MB_PTR_ADV(p)) in nofold_len()
3032 for (p = word; i > 0; MB_PTR_ADV(p)) in nofold_len()
3034 return (int)(p - word); in nofold_len()
3794 char_u *p; in ex_spellinfo() local
3806 p = lp->lp_slang->sl_info; in ex_spellinfo()
3807 if (p != NULL) in ex_spellinfo()
3809 msg_puts((char *)p); in ex_spellinfo()
3883 char_u *p; in spell_dump_compl() local
3909 p = lp->lp_slang->sl_regions; in spell_dump_compl()
3910 if (p[0] != 0) in spell_dump_compl()
3913 region_names = p; in spell_dump_compl()
3914 else if (STRCMP(region_names, p) != 0) in spell_dump_compl()
4067 char_u *p; in dump_word() local
4083 p = cword; in dump_word()
4087 p = word; in dump_word()
4093 tw = p; in dump_word()
4100 STRCPY(badword, p); in dump_word()
4112 p = badword; in dump_word()
4125 p = IObuff; in dump_word()
4129 ml_append(lnum, p, (colnr_T)0, FALSE); in dump_word()
4132 ? MB_STRNICMP(p, pat, STRLEN(pat)) == 0 in dump_word()
4133 : STRNCMP(p, pat, STRLEN(pat)) == 0) in dump_word()
4134 && ins_compl_add_infercase(p, (int)STRLEN(p), in dump_word()
4265 char_u *p = start; in spell_to_word_end() local
4267 while (*p != NUL && spell_iswordp(p, win)) in spell_to_word_end()
4268 MB_PTR_ADV(p); in spell_to_word_end()
4269 return p; in spell_to_word_end()
4283 char_u *p; in spell_word_start() local
4291 for (p = line + startcol; p > line; ) in spell_word_start()
4293 MB_PTR_BACK(line, p); in spell_word_start()
4294 if (spell_iswordp_nmw(p, curwin)) in spell_word_start()
4299 while (p > line) in spell_word_start()
4301 col = (int)(p - line); in spell_word_start()
4302 MB_PTR_BACK(line, p); in spell_word_start()
4303 if (!spell_iswordp(p, curwin)) in spell_word_start()