Lines Matching refs:ncursor
4171 int ncursor; in vi_cmd() local
4283 if ((ncursor = domove(argcnt, &cmd[1], 1)) < 0) in vi_cmd()
4288 --ncursor; in vi_cmd()
4289 } while (ctype(vs->cbuf[ncursor], C_SPACE)); in vi_cmd()
4290 ncursor++; in vi_cmd()
4292 if (ncursor > vs->cursor) { in vi_cmd()
4294 c2 = ncursor; in vi_cmd()
4296 c1 = ncursor; in vi_cmd()
4676 int ncursor = 0, i = 0, t; in domove() local
4683 ncursor = backword(argcnt); in domove()
4689 ncursor = Backword(argcnt); in domove()
4695 ncursor = endword(argcnt); in domove()
4696 if (sub && ncursor < vs->linelen) in domove()
4697 ncursor++; in domove()
4703 ncursor = Endword(argcnt); in domove()
4704 if (sub && ncursor < vs->linelen) in domove()
4705 ncursor++; in domove()
4723 if ((ncursor = findch(fsavech, argcnt, tobool(t), in domove()
4727 ncursor++; in domove()
4734 ncursor = vs->cursor - argcnt; in domove()
4735 if (ncursor < 0) in domove()
4736 ncursor = 0; in domove()
4744 ncursor = vs->cursor + argcnt; in domove()
4745 if (ncursor > vs->linelen) in domove()
4746 ncursor = vs->linelen; in domove()
4753 ncursor = forwword(argcnt); in domove()
4759 ncursor = Forwword(argcnt); in domove()
4763 ncursor = 0; in domove()
4767 ncursor = domovebeg(); in domove()
4771 ncursor = argcnt; in domove()
4772 if (ncursor > vs->linelen) in domove()
4773 ncursor = vs->linelen; in domove()
4774 if (ncursor) in domove()
4775 ncursor--; in domove()
4780 ncursor = vs->linelen; in domove()
4782 ncursor = 0; in domove()
4786 ncursor = vs->cursor; in domove()
4787 while (ncursor < vs->linelen && in domove()
4788 (i = bracktype(vs->cbuf[ncursor])) == 0) in domove()
4789 ncursor++; in domove()
4790 if (ncursor == vs->linelen) in domove()
4795 if (++ncursor >= vs->linelen) in domove()
4798 if (--ncursor < 0) in domove()
4801 t = bracktype(vs->cbuf[ncursor]); in domove()
4808 ncursor++; in domove()
4814 return (ncursor); in domove()
4820 int ncursor = 0; in domovebeg() local
4822 while (ncursor < vs->linelen - 1 && in domovebeg()
4823 ctype(vs->cbuf[ncursor], C_SPACE)) in domovebeg()
4824 ncursor++; in domovebeg()
4825 return (ncursor); in domovebeg()
4971 int ncursor; in findch() local
4975 ncursor = vs->cursor; in findch()
4979 if (++ncursor == vs->linelen) in findch()
4982 if (--ncursor < 0) in findch()
4985 } while (vs->cbuf[ncursor] != ch); in findch()
4989 ncursor--; in findch()
4991 ncursor++; in findch()
4993 return (ncursor); in findch()
4999 int ncursor; in forwword() local
5001 ncursor = vs->cursor; in forwword()
5002 while (ncursor < vs->linelen && argcnt--) { in forwword()
5003 if (ctype(vs->cbuf[ncursor], C_ALNUX)) in forwword()
5004 while (ncursor < vs->linelen && in forwword()
5005 ctype(vs->cbuf[ncursor], C_ALNUX)) in forwword()
5006 ncursor++; in forwword()
5007 else if (!ctype(vs->cbuf[ncursor], C_SPACE)) in forwword()
5008 while (ncursor < vs->linelen && in forwword()
5009 !ctype(vs->cbuf[ncursor], C_ALNUX | C_SPACE)) in forwword()
5010 ncursor++; in forwword()
5011 while (ncursor < vs->linelen && in forwword()
5012 ctype(vs->cbuf[ncursor], C_SPACE)) in forwword()
5013 ncursor++; in forwword()
5015 return (ncursor); in forwword()
5021 int ncursor; in backword() local
5023 ncursor = vs->cursor; in backword()
5024 while (ncursor > 0 && argcnt--) { in backword()
5025 while (--ncursor > 0 && ctype(vs->cbuf[ncursor], C_SPACE)) in backword()
5027 if (ncursor > 0) { in backword()
5028 if (ctype(vs->cbuf[ncursor], C_ALNUX)) in backword()
5029 while (--ncursor >= 0 && in backword()
5030 ctype(vs->cbuf[ncursor], C_ALNUX)) in backword()
5033 while (--ncursor >= 0 && in backword()
5034 !ctype(vs->cbuf[ncursor], C_ALNUX | C_SPACE)) in backword()
5036 ncursor++; in backword()
5039 return (ncursor); in backword()
5045 int ncursor; in endword() local
5047 ncursor = vs->cursor; in endword()
5048 while (ncursor < vs->linelen && argcnt--) { in endword()
5049 while (++ncursor < vs->linelen - 1 && in endword()
5050 ctype(vs->cbuf[ncursor], C_SPACE)) in endword()
5052 if (ncursor < vs->linelen - 1) { in endword()
5053 if (ctype(vs->cbuf[ncursor], C_ALNUX)) in endword()
5054 while (++ncursor < vs->linelen && in endword()
5055 ctype(vs->cbuf[ncursor], C_ALNUX)) in endword()
5058 while (++ncursor < vs->linelen && in endword()
5059 !ctype(vs->cbuf[ncursor], C_ALNUX | C_SPACE)) in endword()
5061 ncursor--; in endword()
5064 return (ncursor); in endword()
5070 int ncursor; in Forwword() local
5072 ncursor = vs->cursor; in Forwword()
5073 while (ncursor < vs->linelen && argcnt--) { in Forwword()
5074 while (ncursor < vs->linelen && in Forwword()
5075 !ctype(vs->cbuf[ncursor], C_SPACE)) in Forwword()
5076 ncursor++; in Forwword()
5077 while (ncursor < vs->linelen && in Forwword()
5078 ctype(vs->cbuf[ncursor], C_SPACE)) in Forwword()
5079 ncursor++; in Forwword()
5081 return (ncursor); in Forwword()
5087 int ncursor; in Backword() local
5089 ncursor = vs->cursor; in Backword()
5090 while (ncursor > 0 && argcnt--) { in Backword()
5091 while (--ncursor >= 0 && ctype(vs->cbuf[ncursor], C_SPACE)) in Backword()
5093 while (ncursor >= 0 && !ctype(vs->cbuf[ncursor], C_SPACE)) in Backword()
5094 ncursor--; in Backword()
5095 ncursor++; in Backword()
5097 return (ncursor); in Backword()
5103 int ncursor; in Endword() local
5105 ncursor = vs->cursor; in Endword()
5106 while (ncursor < vs->linelen - 1 && argcnt--) { in Endword()
5107 while (++ncursor < vs->linelen - 1 && in Endword()
5108 ctype(vs->cbuf[ncursor], C_SPACE)) in Endword()
5110 if (ncursor < vs->linelen - 1) { in Endword()
5111 while (++ncursor < vs->linelen && in Endword()
5112 !ctype(vs->cbuf[ncursor], C_SPACE)) in Endword()
5114 ncursor--; in Endword()
5117 return (ncursor); in Endword()