1 /* $OpenBSD: cmd.h,v 1.2 2001/01/29 01:58:00 niklas Exp $ */ 2 3 /* 4 * Copyright (c) 1984,1985,1989,1994,1995 Mark Nudelman 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions 9 * are met: 10 * 1. Redistributions of source code must retain the above copyright 11 * notice, this list of conditions and the following disclaimer. 12 * 2. Redistributions in binary form must reproduce the above copyright 13 * notice in the documentation and/or other materials provided with 14 * the distribution. 15 * 16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY 17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 19 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE 20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 22 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 23 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 26 * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 */ 28 29 30 #define MAX_USERCMD 500 31 #define MAX_CMDLEN 16 32 33 #define A_B_LINE 2 34 #define A_B_SCREEN 3 35 #define A_B_SCROLL 4 36 #define A_B_SEARCH 5 37 #define A_DIGIT 6 38 #define A_DISP_OPTION 7 39 #define A_DEBUG 8 40 #define A_EXAMINE 9 41 #define A_FIRSTCMD 10 42 #define A_FREPAINT 11 43 #define A_F_LINE 12 44 #define A_F_SCREEN 13 45 #define A_F_SCROLL 14 46 #define A_F_SEARCH 15 47 #define A_GOEND 16 48 #define A_GOLINE 17 49 #define A_GOMARK 18 50 #define A_HELP 19 51 #define A_NEXT_FILE 20 52 #define A_PERCENT 21 53 #define A_PREFIX 22 54 #define A_PREV_FILE 23 55 #define A_QUIT 24 56 #define A_REPAINT 25 57 #define A_SETMARK 26 58 #define A_SHELL 27 59 #define A_STAT 28 60 #define A_FF_LINE 29 61 #define A_BF_LINE 30 62 #define A_VERSION 31 63 #define A_VISUAL 32 64 #define A_F_WINDOW 33 65 #define A_B_WINDOW 34 66 #define A_F_BRACKET 35 67 #define A_B_BRACKET 36 68 #define A_PIPE 37 69 #define A_INDEX_FILE 38 70 #define A_UNDO_SEARCH 39 71 72 73 74 #define A_AGAIN_SEARCH 43 75 #define A_T_AGAIN_SEARCH 44 76 #define A_REVERSE_SEARCH 45 77 #define A_T_REVERSE_SEARCH 46 78 #define A_OPT_TOGGLE 47 79 #define A_OPT_SET 48 80 #define A_OPT_UNSET 49 81 #define A_F_FOREVER 50 82 #define A_GOPOS 51 83 84 #define A_INVALID 100 85 #define A_NOACTION 101 86 #define A_UINVALID 102 87 #define A_END_LIST 103 88 89 #define A_EXTRA 0200 90 91 92 /* Line editting characters */ 93 94 #define EC_BACKSPACE 1 95 #define EC_LINEKILL 2 96 #define EC_RIGHT 3 97 #define EC_LEFT 4 98 #define EC_W_LEFT 5 99 #define EC_W_RIGHT 6 100 #define EC_INSERT 7 101 #define EC_DELETE 8 102 #define EC_HOME 9 103 #define EC_END 10 104 #define EC_W_BACKSPACE 11 105 #define EC_W_DELETE 12 106 #define EC_UP 13 107 #define EC_DOWN 14 108 #define EC_EXPAND 15 109 #define EC_F_COMPLETE 17 110 #define EC_B_COMPLETE 18 111 #define EC_LITERAL 19 112 113 #define EC_UINVALID 102 114 115 /* Flags for editchar() */ 116 #define EC_PEEK 01 117 #define EC_NOHISTORY 02 118 #define EC_NOCOMPLETE 04 119 120