[BACK]Return to cmd.h CVS log [TXT][DIR] Up to [local] / src / usr.bin / less

Annotation of src/usr.bin/less/cmd.h, Revision 1.7

1.1       etheisen    1: /*
1.6       shadchin    2:  * Copyright (C) 1984-2012  Mark Nudelman
1.1       etheisen    3:  *
1.3       millert     4:  * You may distribute under the terms of either the GNU General Public
                      5:  * License or the Less License, as specified in the README file.
1.1       etheisen    6:  *
1.6       shadchin    7:  * For more information, see the README file.
1.1       etheisen    8:  */
1.7     ! nicm        9: /*
        !            10:  * Modified for use with illumos.
        !            11:  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
        !            12:  */
1.1       etheisen   13:
1.6       shadchin   14: #define        MAX_USERCMD             1000
1.1       etheisen   15: #define        MAX_CMDLEN              16
                     16:
                     17: #define        A_B_LINE                2
                     18: #define        A_B_SCREEN              3
                     19: #define        A_B_SCROLL              4
                     20: #define        A_B_SEARCH              5
                     21: #define        A_DIGIT                 6
                     22: #define        A_DISP_OPTION           7
                     23: #define        A_DEBUG                 8
                     24: #define        A_EXAMINE               9
                     25: #define        A_FIRSTCMD              10
                     26: #define        A_FREPAINT              11
                     27: #define        A_F_LINE                12
                     28: #define        A_F_SCREEN              13
                     29: #define        A_F_SCROLL              14
                     30: #define        A_F_SEARCH              15
                     31: #define        A_GOEND                 16
                     32: #define        A_GOLINE                17
                     33: #define        A_GOMARK                18
                     34: #define        A_HELP                  19
                     35: #define        A_NEXT_FILE             20
                     36: #define        A_PERCENT               21
                     37: #define        A_PREFIX                22
                     38: #define        A_PREV_FILE             23
                     39: #define        A_QUIT                  24
                     40: #define        A_REPAINT               25
                     41: #define        A_SETMARK               26
                     42: #define        A_SHELL                 27
                     43: #define        A_STAT                  28
                     44: #define        A_FF_LINE               29
                     45: #define        A_BF_LINE               30
                     46: #define        A_VERSION               31
                     47: #define        A_VISUAL                32
                     48: #define        A_F_WINDOW              33
                     49: #define        A_B_WINDOW              34
                     50: #define        A_F_BRACKET             35
                     51: #define        A_B_BRACKET             36
                     52: #define        A_PIPE                  37
                     53: #define        A_INDEX_FILE            38
                     54: #define        A_UNDO_SEARCH           39
1.3       millert    55: #define        A_FF_SCREEN             40
                     56: #define        A_LSHIFT                41
                     57: #define        A_RSHIFT                42
1.1       etheisen   58: #define        A_AGAIN_SEARCH          43
                     59: #define        A_T_AGAIN_SEARCH        44
                     60: #define        A_REVERSE_SEARCH        45
                     61: #define        A_T_REVERSE_SEARCH      46
                     62: #define        A_OPT_TOGGLE            47
                     63: #define        A_OPT_SET               48
                     64: #define        A_OPT_UNSET             49
                     65: #define        A_F_FOREVER             50
                     66: #define        A_GOPOS                 51
1.3       millert    67: #define        A_REMOVE_FILE           52
                     68: #define        A_NEXT_TAG              53
                     69: #define        A_PREV_TAG              54
1.5       shadchin   70: #define        A_FILTER                55
1.6       shadchin   71: #define        A_F_UNTIL_HILITE        56
1.7     ! nicm       72: #define        A_F_SKIP                57
1.1       etheisen   73:
                     74: #define        A_INVALID               100
                     75: #define        A_NOACTION              101
                     76: #define        A_UINVALID              102
                     77: #define        A_END_LIST              103
1.3       millert    78: #define        A_SPECIAL_KEY           104
                     79:
1.7     ! nicm       80: #define        A_SKIP                  127
1.1       etheisen   81:
                     82: #define        A_EXTRA                 0200
                     83:
                     84:
1.4       jmc        85: /* Line editing characters */
1.1       etheisen   86:
                     87: #define        EC_BACKSPACE    1
                     88: #define        EC_LINEKILL     2
                     89: #define        EC_RIGHT        3
                     90: #define        EC_LEFT         4
                     91: #define        EC_W_LEFT       5
                     92: #define        EC_W_RIGHT      6
                     93: #define        EC_INSERT       7
                     94: #define        EC_DELETE       8
                     95: #define        EC_HOME         9
                     96: #define        EC_END          10
                     97: #define        EC_W_BACKSPACE  11
                     98: #define        EC_W_DELETE     12
                     99: #define        EC_UP           13
                    100: #define        EC_DOWN         14
                    101: #define        EC_EXPAND       15
                    102: #define        EC_F_COMPLETE   17
                    103: #define        EC_B_COMPLETE   18
                    104: #define        EC_LITERAL      19
1.5       shadchin  105: #define        EC_ABORT        20
1.1       etheisen  106:
1.3       millert   107: #define        EC_NOACTION     101
1.1       etheisen  108: #define        EC_UINVALID     102
                    109:
                    110: /* Flags for editchar() */
                    111: #define        EC_PEEK         01
                    112: #define        EC_NOHISTORY    02
                    113: #define        EC_NOCOMPLETE   04
1.3       millert   114: #define        EC_NORIGHTLEFT  010
                    115:
                    116: /* Environment variable stuff */
                    117: #define        EV_OK           01
1.1       etheisen  118:
1.3       millert   119: /* Special keys (keys which output different strings on different terminals) */
1.7     ! nicm      120: #define        SK_SPECIAL_KEY          CONTROL('K')
        !           121: #define        SK_RIGHT_ARROW          1
        !           122: #define        SK_LEFT_ARROW           2
        !           123: #define        SK_UP_ARROW             3
        !           124: #define        SK_DOWN_ARROW           4
        !           125: #define        SK_PAGE_UP              5
        !           126: #define        SK_PAGE_DOWN            6
        !           127: #define        SK_HOME                 7
        !           128: #define        SK_END                  8
        !           129: #define        SK_DELETE               9
        !           130: #define        SK_INSERT               10
        !           131: #define        SK_CTL_LEFT_ARROW       11
        !           132: #define        SK_CTL_RIGHT_ARROW      12
        !           133: #define        SK_CTL_DELETE           13
        !           134: #define        SK_F1                   14
        !           135: #define        SK_BACKTAB              15
        !           136: #define        SK_CTL_BACKSPACE        16
        !           137: #define        SK_CONTROL_K            40