Lines Matching +full:current +full:- +full:rotate

4 /*-
39 /* ed.inputl -- routines to get a single line from the input. */
44 static Char mismatch[] = { '\\', '-', '%', '\0' };
45 /* don't Strchr() for '\0', obey current history character settings */
56 static int rotate = 0; variable
70 curchoice = -1; in Repair()
71 return (int) (LastChar - InputBuf); in Repair()
103 MacroLvl = -1; /* editor was interrupted during input */ in Inputl()
105 if (imode && imode->vec != NULL) { in Inputl()
106 if (!Strcmp(*(imode->vec), STRinsert)) in Inputl()
108 else if (!Strcmp(*(imode->vec), STRoverwrite)) in Inputl()
165 if (InputLim != &InputBuf[INBUFSIZE - 2])/*FIXBUF*/ in Inputl()
166 xprintf("InputLim != &InputBuf[INBUFSIZE-2]\r\n"); in Inputl()
206 curchoice = -1; in Inputl()
207 curlen = (int) (LastChar - InputBuf); in Inputl()
211 curchoice = -1; in Inputl()
212 curlen = (int) (LastChar - InputBuf); in Inputl()
219 num = (int) (LastChar - InputBuf); /* number characters read */ in Inputl()
224 curchoice = -1; in Inputl()
226 if (crct && crct->vec != NULL && (!Strcmp(*(crct->vec), STRcmd) || in Inputl()
227 !Strcmp(*(crct->vec), STRall))) { in Inputl()
234 if (SpellLine(!Strcmp(*(crct->vec), STRcmd)) == 1) { in Inputl()
242 LastChar = InputBuf; /* Null the current line */ in Inputl()
270 *LastChar-- = '\0'; in Inputl()
281 LastChar = InputBuf; /* Null the current line */ in Inputl()
293 } else if (crct && crct->vec != NULL && in Inputl()
294 !Strcmp(*(crct->vec), STRcomplete)) { in Inputl()
295 if (LastChar > InputBuf && LastChar[-1] == '\n') { in Inputl()
296 LastChar[-1] = '\0'; in Inputl()
297 LastChar--; in Inputl()
303 curlen = (int) (LastChar - InputBuf); in Inputl()
325 curlen = (int) (LastChar - InputBuf); in Inputl()
334 num = (int) (LastChar - InputBuf); in Inputl()
343 if (tenematch(InputBuf, Cursor - InputBuf, SPELL) < 0) in Inputl()
362 curlen = (int) (LastChar - InputBuf); in Inputl()
363 curchoice = -1; in Inputl()
364 rotate = 0; in Inputl()
368 curlen = (int) (LastChar - InputBuf); in Inputl()
369 curchoice = -1; in Inputl()
370 rotate = 0; in Inputl()
375 rotate = 1; in Inputl()
379 curchoice--; in Inputl()
380 rotate = 1; in Inputl()
385 if (InputBuf[curlen] && rotate) { in Inputl()
386 newlen = (int) (LastChar - InputBuf); in Inputl()
387 for (idx = (int) (Cursor - InputBuf); in Inputl()
389 InputBuf[idx - newlen + curlen] = in Inputl()
392 Cursor = Cursor - newlen + curlen; in Inputl()
394 curlen = (int) (LastChar - InputBuf); in Inputl()
406 * Modified by Martin Boyer (gamin@ireq-robot.hydro.qc.ca): in Inputl()
410 expnum = (int) (Cursor - InputBuf); in Inputl()
411 switch (matchval = tenematch(InputBuf, Cursor-InputBuf, fn)){ in Inputl()
414 matchbeep->vec != NULL && in Inputl()
415 (Strcmp(*(matchbeep->vec), STRnotunique) == 0)) in Inputl()
419 if (matchbeep && matchbeep->vec != NULL) { in Inputl()
420 if (Strcmp(*(matchbeep->vec), STRnomatch) == 0 || in Inputl()
421 Strcmp(*(matchbeep->vec), STRambiguous) == 0 || in Inputl()
422 Strcmp(*(matchbeep->vec), STRnotunique) == 0) in Inputl()
430 curchoice = -1; in Inputl()
434 if (matchbeep && matchbeep->vec != NULL) { in Inputl()
435 if ((Strcmp(*(matchbeep->vec), STRambiguous) == 0 || in Inputl()
436 Strcmp(*(matchbeep->vec), STRnotunique) == 0)) in Inputl()
447 if (autol && autol->vec != NULL && in Inputl()
448 (Strcmp(*(autol->vec), STRambiguous) != 0 || in Inputl()
449 expnum == Cursor - InputBuf)) { in Inputl()
460 (void) tenematch(InputBuf, Cursor-InputBuf, fn); in Inputl()
478 if (InputBuf[curlen] && rotate) { in Inputl()
479 newlen = (int) (LastChar - InputBuf); in Inputl()
480 for (idx = (int) (Cursor - InputBuf); in Inputl()
482 InputBuf[idx - newlen + curlen] = in Inputl()
485 Cursor = Cursor - newlen + curlen; in Inputl()
487 curlen = (int) (LastChar - InputBuf); in Inputl()
489 curchoice--; in Inputl()
493 if (tenematch(InputBuf, Cursor - InputBuf, fn) < 0) in Inputl()
502 if (tenematch(InputBuf, Cursor - InputBuf, GLOB) < 0) in Inputl()
508 if (tenematch(InputBuf, Cursor - InputBuf, GLOB_EXPAND) <= 0) in Inputl()
514 if (tenematch(InputBuf, Cursor - InputBuf, PATH_NORMALIZE) <= 0) in Inputl()
520 if (tenematch(InputBuf, Cursor - InputBuf, VARS_EXPAND) <= 0) in Inputl()
526 if (tenematch(InputBuf, Cursor - InputBuf, COMMAND_NORMALIZE) <= 0) in Inputl()
534 (void) tenematch(InputBuf, LastChar - InputBuf, PRINT_HELP); in Inputl()
538 curchoice = -1; in Inputl()
539 curlen = (int) (LastChar - InputBuf); in Inputl()
552 curchoice = -1; in Inputl()
553 curlen = (int) (LastChar - InputBuf); in Inputl()
567 curchoice = -1; in Inputl()
568 curlen = (int) (LastChar - InputBuf); in Inputl()
602 evalvec = state->evalvec; in eval1_cleanup()
603 evalp = state->evalp; in eval1_cleanup()
608 * Like eval, only using the current file descriptors
764 MacroLvl--; in GetNextChar()
769 MacroLvl--; in GetNextChar()
786 while ((num_read = xread(SHIN, cbuf + cbp, 1)) == -1) { in GetNextChar()
787 if (!tried && fixio(SHIN, errno) != -1) in GetNextChar()
798 return -1; in GetNextChar()
806 if (normal_mbtowc(cp, cbuf, cbp) == -1) { in GetNextChar()
826 * SpellLine - do spelling correction on the entire command line
830 * -1: Something was incorrectible, and nothing was corrected
849 *Cursor != '\0' && ((Cursor != argptr && Cursor[-1] == '\\') || in SpellLine()
855 if (LastChar[-1] == '\n') in SpellLine()
856 Cursor--; in SpellLine()
865 if ((Cursor - InputBuf) != 2 || (char)InputBuf[1] != ':') in SpellLine()
870 size_t len = Cursor - InputBuf; in SpellLine()
881 switch (tenematch(InputBuf, Cursor - InputBuf, SPELL)) { in SpellLine()
885 case -1: /* couldn't be corrected */ in SpellLine()
887 matchval = -1; in SpellLine()
895 OldCursor += (LastChar - OldLastChar); in SpellLine()
906 * CompleteLine - do command completion on the entire command line
927 *Cursor != '\0' && ((Cursor != argptr && Cursor[-1] == '\\') || in CompleteLine()
933 if (LastChar[-1] == '\n') in CompleteLine()
934 Cursor--; in CompleteLine()
938 tmatch = tenematch(InputBuf, Cursor - InputBuf, RECOGNIZE); in CompleteLine()
946 OldCursor += (LastChar - OldLastChar); in CompleteLine()