4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
22 /* Copyright (c) 1988 AT&T */
23 /* All Rights Reserved */
27 * Copyright (c) 1999 by Sun Microsystems, Inc.
28 * All rights reserved.
31 #pragma ident "%Z%%M% %I% %E% SMI"
34 * cscope - interactive C symbol cross-reference
40 #include <curses.h> /* LINES */
42 #define MAXHELP 50 /* maximum number of help strings */
47 char **ep
, *s
, **tp
, *text
[MAXHELP
];
53 *tp
++ = "Point with the mouse and click button 1 to "
54 "move to the desired input field,\n";
55 *tp
++ = "type the pattern to search for, and then "
56 "press the RETURN key. For the first 5\n";
57 *tp
++ = "and last 2 input fields, the pattern can be "
58 "a regcmp(3X) regular expression.\n";
59 *tp
++ = "If the search is successful, you can edit "
60 "the file containing a displayed line\n";
61 *tp
++ = "by pointing with the mouse and clicking "
63 *tp
++ = "\nYou can either use the button 2 menu or "
64 "these command characters:\n\n";
66 *tp
++ = "Press the TAB key repeatedly to move to the "
67 "desired input field, type the\n";
68 *tp
++ = "pattern to search for, and then press the "
69 "RETURN key. For the first 4 and\n";
70 *tp
++ = "last 2 input fields, the pattern can be a "
71 "regcmp(3X) regular expression.\n";
72 *tp
++ = "If the search is successful, you can use "
73 "these command characters:\n\n";
74 *tp
++ = "1-9\tEdit the file containing the displayed "
77 *tp
++ = "space\tDisplay next lines.\n";
78 *tp
++ = "+\tDisplay next lines.\n";
79 *tp
++ = "-\tDisplay previous lines.\n";
80 *tp
++ = "^E\tEdit all lines.\n";
81 *tp
++ = ">\tWrite all lines to a file.\n";
82 *tp
++ = ">>\tAppend all lines to a file.\n";
83 *tp
++ = "<\tRead lines from a file.\n";
84 *tp
++ = "^\tFilter all lines through a shell command.\n";
85 *tp
++ = "|\tPipe all lines to a shell command.\n";
86 *tp
++ = "\nAt any time you can use these command "
89 *tp
++ = "^P\tMove to the previous input field.\n";
91 *tp
++ = "^A\tSearch again with the last pattern typed.\n";
92 *tp
++ = "^B\tRecall previous input field and search pattern.\n";
93 *tp
++ = "^F\tRecall next input field and search pattern.\n";
94 *tp
++ = "^C\tToggle ignore/use letter case when searching.\n";
95 *tp
++ = "^R\tRebuild the symbol database.\n";
96 *tp
++ = "!\tStart an interactive shell (type ^D to return "
98 *tp
++ = "^L\tRedraw the screen.\n";
99 *tp
++ = "?\tDisplay this list of commands.\n";
100 *tp
++ = "^D\tExit cscope.\n";
101 *tp
++ = "\nNote: If the first character of the pattern you "
102 "want to search for matches\n";
103 *tp
++ = "a command, type a \\ character first.\n";
106 *tp
++ = "Point with the mouse and click button 1 "
107 "to mark or unmark the line to be\n";
108 *tp
++ = "changed. You can also use the button 2 "
109 "menu or these command characters:\n\n";
111 *tp
++ = "When changing text, you can use these "
112 "command characters:\n\n";
113 *tp
++ = "1-9\tMark or unmark the line to be changed.\n";
115 *tp
++ = "*\tMark or unmark all displayed lines to be "
117 *tp
++ = "space\tDisplay next lines.\n";
118 *tp
++ = "+\tDisplay next lines.\n";
119 *tp
++ = "-\tDisplay previous lines.\n";
120 *tp
++ = "a\tMark or unmark all lines to be changed.\n";
121 *tp
++ = "^D\tChange the marked lines and exit.\n";
122 *tp
++ = "RETURN\tExit without changing the marked lines.\n";
123 *tp
++ = "!\tStart an interactive shell (type ^D to return "
125 *tp
++ = "^L\tRedraw the screen.\n";
126 *tp
++ = "?\tDisplay this list of commands.\n";
128 /* print help, a screen at a time */
131 for (tp
= text
; tp
< ep
; ) {
132 if (line
< LINES
- 1) {
133 for (s
= *tp
; *s
!= '\0'; ++s
) {
138 (void) addstr(*tp
++);