• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-12-stable/contrib/tcsh/

Lines Matching refs:Cursor

169     if (Cursor < LastChar) {	/* if I must move chars */
170 for (cp = LastChar; cp >= Cursor; cp--)
172 if (Mark && Mark > Cursor)
183 if (num > LastChar - Cursor)
184 num = (int) (LastChar - Cursor); /* bounds check */
191 UndoPtr = Cursor;
192 for (cp = Cursor; cp <= LastChar; cp++) {
198 for (cp = Cursor; cp + num <= LastChar; cp++)
202 if (Mark && Mark > Cursor && Mark <= Cursor+num)
203 Mark = Cursor;
205 else if (Mark && Mark > Cursor)
224 if (num > Cursor - InputBuf)
225 num = (int) (Cursor - InputBuf); /* bounds check */
232 UndoPtr = Cursor - num;
233 for (cp = Cursor - num; cp <= LastChar; cp++) {
239 for (cp = Cursor - num; cp + num <= LastChar; cp++)
242 Cursor -= num;
244 if (Mark && Mark > Cursor && Mark <= Cursor+num)
245 Mark = Cursor;
247 else if (Mark && Mark > Cursor)
511 *q != ' ' && *q != '\t' && *q != ':' && q < Cursor; q++) {
665 Cursor += buf_len - (q - op);
716 while (*p != HIST && p < Cursor)
722 if (p >= Cursor) /* all done */
742 for (p = Cursor - 1;
773 if (Cursor > ActionPos) {
774 Size = (int) (Cursor-ActionPos);
778 else if (Cursor < ActionPos) {
779 Size = (int)(ActionPos-Cursor);
786 UndoPtr = Cursor;
955 CursSaved = Cursor - InputBuf;
975 Cursor = InputBuf;
978 Cursor = LastChar;
1022 Cursor = InputBuf;
1025 Cursor = LastChar;
1039 for (cp = Cursor; cp >= InputBuf; cp--)
1042 Cursor = cp;
1047 for (cp = Cursor; *cp != '\0' && cp < InputLim; cp++)
1050 Cursor = cp;
1066 *oldCursor = Cursor,
1146 Cursor += patbuf.len - 1;
1147 cp = c_next_word(Cursor, LastChar, 1);
1148 while (Cursor < cp && *Cursor != '\n') {
1153 Strbuf_append1(&patbuf, *Cursor);
1154 *LastChar++ = *Cursor++;
1156 Cursor = oldCursor;
1199 Cursor = newdir == F_UP_SEARCH_HIST ?
1202 Cursor += newdir == F_UP_SEARCH_HIST ? -1 : 1;
1206 if (Cursor < InputBuf || Cursor > LastChar ||
1212 Cursor = newdir == F_UP_SEARCH_HIST ?
1225 Cursor = oldCursor;
1250 Cursor = oldCursor;
1273 oldc = Cursor;
1278 Cursor = InputBuf;
1282 *Cursor++ = '\n';
1283 *Cursor++ = dir == F_UP_SEARCH_HIST ? '?' : '/';
1294 *Cursor-- = '\0';
1295 LastChar = Cursor;
1301 Cursor = oldc;
1321 *Cursor++ = ch;
1322 LastChar = Cursor;
1337 Cursor = InputBuf;
1361 Cursor = LastChar = InputBuf;
1395 if (UndoPtr > Cursor)
1396 UndoSize = (int)(UndoPtr - Cursor);
1398 UndoSize = (int)(Cursor - UndoPtr);
1407 if (Cursor > InputBuf)
1408 Cursor--;
1439 *Cursor++ = c[i];
1462 UndoBuf[UndoSize++] = *Cursor;
1468 *Cursor++ = (Char) c;
1476 UndoBuf[UndoSize++] = Cursor[i];
1485 *Cursor++ = (Char) c;
1507 *Cursor++ = *s++;
1516 if (Cursor >= &InputBuf[n]) {
1542 UndoBuf[UndoSize++] = *Cursor;
1547 *Cursor++ = (Char) c;
1588 Cursor = InputBuf;
1695 if (Cursor < LastChar)
1696 Cursor++;
1753 Cursor = InputBuf;
1756 Cursor = LastChar;
1830 Strbuf_appendn(&patbuf, InputBuf, Cursor - InputBuf);
1837 xprintf("Cursor %d LastChar %d\n", Cursor - InputBuf, LastChar - InputBuf);
2163 cp = c_preword(Cursor, InputBuf, 1, STRshwordsep);
2164 if (cp == Cursor || Isspace(*cp))
2171 Cursor == oldcursor && patbuf.len > 0
2189 Strbuf_appendn(&patbuf, cp, Cursor - cp);
2217 if (len != (size_t)(Cursor - start)
2224 if (LastChar + len - (Cursor - start) >= InputLim)
2226 DeleteBack(Cursor - start);
2229 *Cursor++ = *cp++;
2230 oldcursor = Cursor;
2254 cp = Cursor; /* for speed */
2261 Mark = Cursor; /* mark at beginning, cursor at end */
2262 Cursor = cp;
2302 if (Cursor > Mark) {
2303 del_len = Cursor - Mark;
2306 del_len = Mark - Cursor;
2318 cp = Cursor; /* for speed */
2325 Mark = Cursor; /* mark at beginning, cursor at end */
2326 Cursor = cp;
2349 if (Argument <= Cursor - InsertPos) {
2362 if (Cursor > InputBuf) {
2378 if (Cursor == InputBuf)
2382 cp = c_prev_word(Cursor, InputBuf, Argument);
2384 c_push_kill(cp, Cursor); /* save the text */
2386 c_delbefore((int)(Cursor - cp)); /* delete before dot */
2423 if (Cursor == LastChar) {/* if I'm at the end */
2428 if (Cursor != InputBuf)
2429 Cursor--;
2435 if (Cursor > LastChar)
2436 Cursor = LastChar; /* bounds check */
2446 if (Cursor == LastChar) {/* if I'm at the end */
2448 if (Cursor == InputBuf) {
2458 if (Cursor != InputBuf)
2459 Cursor--;
2465 if (Cursor > LastChar)
2466 Cursor = LastChar; /* bounds check */
2475 if (Cursor == LastChar) { /* if I'm at the end */
2482 if (Cursor > LastChar)
2483 Cursor = LastChar; /* bounds check */
2493 if (Cursor == LastChar) { /* if I'm at the end */
2494 if (Cursor == InputBuf) { /* if I'm also at the beginning */
2507 if (Cursor > LastChar)
2508 Cursor = LastChar; /* bounds check */
2520 if (Cursor == LastChar && Cursor == InputBuf) {
2540 if (Cursor == LastChar)
2544 cp = c_next_word(Cursor, LastChar, Argument);
2546 c_push_kill(Cursor, cp); /* save the text */
2548 c_delafter((int)(cp - Cursor)); /* delete after dot */
2549 if (Cursor > LastChar)
2550 Cursor = LastChar; /* bounds check */
2559 Cursor = LastChar;
2574 Cursor = InputBuf;
2577 while (Isspace(*Cursor)) /* We want FIRST non space character */
2578 Cursor++;
2594 c_push_kill(Cursor, LastChar); /* copy it */
2595 LastChar = Cursor; /* zap! -- delete to end */
2596 if (Mark > Cursor)
2597 Mark = Cursor;
2608 c_push_kill(InputBuf, Cursor); /* copy it */
2609 c_delbefore((int)(Cursor - InputBuf));
2610 if (Mark && Mark > Cursor)
2611 Mark -= Cursor-InputBuf;
2621 Cursor = Mark = LastChar = InputBuf; /* zap! -- delete all of it */
2634 if (Mark > Cursor) {
2635 c_push_kill(Cursor, Mark); /* copy it */
2636 c_delafter((int)(Mark - Cursor)); /* delete it - UNUSED BY VI mode */
2637 Mark = Cursor;
2640 c_push_kill(Mark, Cursor); /* copy it */
2641 c_delbefore((int)(Cursor - Mark));
2659 if (Mark > Cursor) {
2660 c_push_kill(Cursor, Mark); /* copy it */
2663 c_push_kill(Mark, Cursor); /* copy it */
2677 if (Cursor == &InputBuf[0] || LastChar == &InputBuf[1]) {
2681 if (Cursor < LastChar) {
2682 Cursor++;
2684 c = Cursor[-2];
2685 Cursor[-2] = Cursor[-1];
2686 Cursor[-1] = c;
2697 if (Cursor > &InputBuf[1]) {/* must have at least two chars entered */
2698 c = Cursor[-2];
2699 Cursor[-2] = Cursor[-1];
2700 Cursor[-1] = c;
2713 if (Cursor > InputBuf) {
2714 if (Argument > Cursor - InputBuf)
2715 Cursor = InputBuf;
2717 Cursor -= Argument;
2738 if (Cursor == InputBuf)
2742 Cursor = c_preword(Cursor, InputBuf, Argument, STRshwspace); /* bounds check */
2758 if (Cursor == InputBuf)
2762 Cursor = c_prev_word(Cursor, InputBuf, Argument); /* bounds check */
2779 if (Cursor < LastChar) {
2780 Cursor += Argument;
2781 if (Cursor > LastChar)
2782 Cursor = LastChar;
2803 if (Cursor == LastChar)
2807 Cursor = c_next_word(Cursor, LastChar, Argument);
2824 if (Cursor == LastChar)
2828 Cursor = c_nexword(Cursor, LastChar, Argument);
2845 if (Cursor == LastChar)
2849 Cursor = c_next_word(Cursor, LastChar, Argument);
2850 if (Cursor < LastChar)
2851 Cursor++;
2893 cp = Cursor;
2907 Cursor = cp;
2910 Cursor++;
2924 cp = Cursor;
2938 Cursor = cp;
2941 Cursor++;
2969 Cursor = InputBuf;
2978 ActionPos = Cursor;
2998 cp = &Cursor[0];
3017 end = c_next_word(Cursor, LastChar, Argument);
3019 for (cp = Cursor; cp < end; cp++) /* PWP: was cp=begin */
3023 Cursor = end;
3024 if (Cursor > LastChar)
3025 Cursor = LastChar;
3037 end = c_next_word(Cursor, LastChar, Argument);
3039 cp = Cursor;
3052 Cursor = end;
3053 if (Cursor > LastChar)
3054 Cursor = LastChar;
3065 end = c_next_word(Cursor, LastChar, Argument);
3067 for (cp = Cursor; cp < end; cp++)
3071 Cursor = end;
3072 if (Cursor > LastChar)
3073 Cursor = LastChar;
3083 if (adrof(STRhighlight) && MarkIsSet && Mark != Cursor) {
3088 Mark = Cursor;
3100 cp = Cursor;
3101 Cursor = Mark;
3170 Cursor = InputBuf;
3171 InsertPos = Cursor;
3173 UndoPtr = Cursor;
3189 UndoPtr = Cursor;
3202 UndoPtr = Cursor;
3244 InsertPos = Cursor;
3245 UndoPtr = Cursor;
3257 if (Cursor < LastChar)
3259 Cursor++;
3260 if (Cursor > LastChar)
3261 Cursor = LastChar;
3265 InsertPos = Cursor;
3266 UndoPtr = Cursor;
3278 Cursor = LastChar;
3295 if (Cursor < LastChar) {
3297 c = *Cursor;
3299 c = CHAR & *Cursor;
3302 *Cursor++ = Tolower(c);
3304 *Cursor++ = Toupper(c);
3306 Cursor++;
3535 if (Cursor == InputBuf)
3539 oldc = Cursor;
3541 cp = c_prev_word(Cursor, InputBuf, Argument);
3547 Cursor = dp; /* put cursor at end */
3604 if (Cursor == LastChar)
3608 Cursor = c_endword(Cursor, LastChar, Argument, STRshwspace);
3612 Cursor++;
3626 if (Cursor == LastChar)
3630 Cursor = c_eword(Cursor, LastChar, Argument);
3633 Cursor++;
3749 Cursor = UndoPtr;
3757 Cursor = UndoPtr;
3769 Cursor = UndoPtr;
3771 size = (int)(Cursor-LastChar); /* NOT NSL independant */
3871 Cursor = Cursor + n;
3872 if (Cursor < InputBuf)
3873 Cursor = InputBuf;
3874 if (Cursor > LastChar)
3875 Cursor = LastChar;
3882 return(Cursor);
3890 Cursor = p;