Lines Matching +full:break +full:- +full:control

2  * Copyright (C) 1984-2024  Mark Nudelman
18 #define CONTROL(c) ((c)&037)
19 #define ESC CONTROL('[')
34 { "back-bracket", A_B_BRACKET },
35 { "back-line", A_B_LINE },
36 { "back-line-force", A_BF_LINE },
37 { "back-screen", A_B_SCREEN },
38 { "back-scroll", A_B_SCROLL },
39 { "back-search", A_B_SEARCH },
40 { "back-window", A_B_WINDOW },
41 { "clear-mark", A_CLRMARK },
42 { "clear-search", A_CLR_SEARCH },
45 { "display-flag", A_DISP_OPTION },
46 { "display-option", A_DISP_OPTION },
48 { "end-scroll", A_RRSHIFT },
51 { "first-cmd", A_FIRSTCMD },
53 { "flush-repaint", A_FREPAINT },
54 { "forw-bracket", A_F_BRACKET },
55 { "forw-forever", A_F_FOREVER },
56 { "forw-line", A_F_LINE },
57 { "forw-line-force", A_FF_LINE },
58 { "forw-screen", A_F_SCREEN },
59 { "forw-screen-force", A_FF_SCREEN },
60 { "forw-scroll", A_F_SCROLL },
61 { "forw-search", A_F_SEARCH },
62 { "forw-until-hilite", A_F_UNTIL_HILITE },
63 { "forw-window", A_F_WINDOW },
64 { "goto-end", A_GOEND },
65 { "goto-end-buffered", A_GOEND_BUF },
66 { "goto-line", A_GOLINE },
67 { "goto-mark", A_GOMARK },
69 { "index-file", A_INDEX_FILE },
71 { "left-scroll", A_LSHIFT },
72 { "next-file", A_NEXT_FILE },
73 { "next-tag", A_NEXT_TAG },
74 { "no-scroll", A_LLSHIFT },
76 { "osc8-forw-search", A_OSC8_F_SEARCH },
77 { "osc8-back-search", A_OSC8_B_SEARCH },
78 { "osc8-open", A_OSC8_OPEN },
81 { "prev-file", A_PREV_FILE },
82 { "prev-tag", A_PREV_TAG },
85 { "remove-file", A_REMOVE_FILE },
87 { "repaint-flush", A_FREPAINT },
88 { "repeat-search", A_AGAIN_SEARCH },
89 { "repeat-search-all", A_T_AGAIN_SEARCH },
90 { "reverse-search", A_REVERSE_SEARCH },
91 { "reverse-search-all", A_T_REVERSE_SEARCH },
92 { "right-scroll", A_RSHIFT },
93 { "set-mark", A_SETMARK },
94 { "set-mark-bottom", A_SETMARKBOT },
97 { "toggle-flag", A_OPT_TOGGLE },
98 { "toggle-option", A_OPT_TOGGLE },
99 { "undo-hilite", A_UNDO_SEARCH },
107 { "back-complete", EC_B_COMPLETE },
113 { "forw-complete", EC_F_COMPLETE },
117 { "kill-line", EC_LINEKILL },
123 { "word-backspace", EC_W_BACKSPACE },
124 { "word-delete", EC_W_DELETE },
125 { "word-left", EC_W_LEFT },
126 { "word-right", EC_W_RIGHT },
141 SNPRINTF1(buf+len, sizeof(buf)-len, fmt, arg1);
152 tables->currtable = &tables->cmdtable;
154 tables->cmdtable.names = cmdnames;
155 tables->cmdtable.is_var = 0;
156 xbuf_init(&tables->cmdtable.buf);
158 tables->edittable.names = editnames;
159 tables->edittable.is_var = 0;
160 xbuf_init(&tables->edittable.buf);
162 tables->vartable.names = NULL;
163 tables->vartable.is_var = 1;
164 xbuf_init(&tables->vartable.buf);
219 ch = (char) (8*ch + (*p - '0'));
222 if (xlate && ch == CONTROL('K'))
245 case 'b': ch = SK_BACKSPACE; break;
246 case 'B': ch = SK_CTL_BACKSPACE; break;
247 case 'd': ch = SK_DOWN_ARROW; break;
248 case 'D': ch = SK_PAGE_DOWN; break;
249 case 'e': ch = SK_END; break;
250 case 'h': ch = SK_HOME; break;
251 case 'i': ch = SK_INSERT; break;
252 case 'l': ch = SK_LEFT_ARROW; break;
253 case 'L': ch = SK_CTL_LEFT_ARROW; break;
254 case 'r': ch = SK_RIGHT_ARROW; break;
255 case 'R': ch = SK_CTL_RIGHT_ARROW; break;
256 case 't': ch = SK_BACKTAB; break;
257 case 'u': ch = SK_UP_ARROW; break;
258 case 'U': ch = SK_PAGE_UP; break;
259 case 'x': ch = SK_DELETE; break;
260 case 'X': ch = SK_CTL_DELETE; break;
261 case '1': ch = SK_F1; break;
285 if (xlate && buf[0] == CONTROL('K'))
291 * Caret means CONTROL.
294 char_string(buf, CONTROL(p[1]), 1);
295 if (xlate && buf[0] == CONTROL('K'))
301 if (xlate && buf[0] == CONTROL('K'))
322 * Skip non-space characters in a string.
341 if (s[i] == '#' && (i == 0 || s[i-1] != '\\'))
342 break;
352 xbuf_add_byte(&tables->currtable->buf, c);
357 xbuf_pop(&tables->currtable->buf);
380 case '-': return less_version <= ver;
402 /* Simplify 2-char op to one char. */
405 case '<': if (*s == '=') { s++; op = '-'; } break;
406 case '>': if (*s == '=') { s++; op = '+'; } break;
407 case '=': if (*s == '=') { s++; } break;
408 case '!': if (*s == '=') { s++; } break;
417 parse_error("non-numeric version number in #version line", "");
426 * See if we have a special "control" line.
432 if (PREFIX(s, "#line-edit"))
434 tables->currtable = &tables->edittable;
439 tables->currtable = &tables->cmdtable;
444 tables->currtable = &tables->vartable;
467 for (i = 0; tables->currtable->names[i].cn_name != NULL; i++)
468 if (strcmp(tables->currtable->names[i].cn_name, actname) == 0)
469 return (tables->currtable->names[i].cn_action);
554 if (eq != NULL && eq > line && eq[-1] == '+')
599 * See if it is a control line.
613 if (tables->currtable->is_var)
629 return (-1);
640 if (strcmp(lesskey_file, "-") == 0)
645 errors = -1;
673 lesskey_file = "lesskey-content";
687 if (lx >= sizeof(line)-1) break;