687741cce0ed2ba10ee0d348f724841faf644017
1 /* Header file for command-reading library command.c.
2 Copyright (C) 1986 Free Software Foundation, Inc.
6 BECAUSE THIS PROGRAM IS LICENSED FREE OF CHARGE, WE PROVIDE ABSOLUTELY
7 NO WARRANTY, TO THE EXTENT PERMITTED BY APPLICABLE STATE LAW. EXCEPT
8 WHEN OTHERWISE STATED IN WRITING, FREE SOFTWARE FOUNDATION, INC,
9 RICHARD M. STALLMAN AND/OR OTHER PARTIES PROVIDE THIS PROGRAM "AS IS"
10 WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
11 BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
12 FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY
13 AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE
14 DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
17 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW WILL RICHARD M.
18 STALLMAN, THE FREE SOFTWARE FOUNDATION, INC., AND/OR ANY OTHER PARTY
19 WHO MAY MODIFY AND REDISTRIBUTE THIS PROGRAM AS PERMITTED BELOW, BE
20 LIABLE TO YOU FOR DAMAGES, INCLUDING ANY LOST PROFITS, LOST MONIES, OR
21 OTHER SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
22 USE OR INABILITY TO USE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR
23 DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY THIRD PARTIES OR
24 A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS) THIS
25 PROGRAM, EVEN IF YOU HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH
26 DAMAGES, OR FOR ANY CLAIM BY ANY OTHER PARTY.
28 GENERAL PUBLIC LICENSE TO COPY
30 1. You may copy and distribute verbatim copies of this source file
31 as you receive it, in any medium, provided that you conspicuously and
32 appropriately publish on each copy a valid copyright notice "Copyright
33 (C) 1986 Free Software Foundation, Inc."; and include following the
34 copyright notice a verbatim copy of the above disclaimer of warranty
35 and of this License. You may charge a distribution fee for the
36 physical act of transferring a copy.
38 2. You may modify your copy or copies of this source file or
39 any portion of it, and copy and distribute such modifications under
40 the terms of Paragraph 1 above, provided that you also do the following:
42 a) cause the modified files to carry prominent notices stating
43 that you changed the files and the date of any change; and
45 b) cause the whole of any work that you distribute or publish,
46 that in whole or in part contains or is a derivative of this
47 program or any part thereof, to be licensed at no charge to all
48 third parties on terms identical to those contained in this
49 License Agreement (except that you may choose to grant more
50 extensive warranty protection to third parties, at your option).
52 c) You may charge a distribution fee for the physical act of
53 transferring a copy, and you may at your option offer warranty
54 protection in exchange for a fee.
56 3. You may copy and distribute this program or any portion of it in
57 compiled, executable or object code form under the terms of Paragraphs
58 1 and 2 above provided that you do the following:
60 a) cause each such copy to be accompanied by the
61 corresponding machine-readable source code, which must
62 be distributed under the terms of Paragraphs 1 and 2 above; or,
64 b) cause each such copy to be accompanied by a
65 written offer, with no time limit, to give any third party
66 free (except for a nominal shipping charge) a machine readable
67 copy of the corresponding source code, to be distributed
68 under the terms of Paragraphs 1 and 2 above; or,
70 c) in the case of a recipient of this program in compiled, executable
71 or object code form (without the corresponding source code) you
72 shall cause copies you distribute to be accompanied by a copy
73 of the written offer of source code which you received along
74 with the copy you received.
76 4. You may not copy, sublicense, distribute or transfer this program
77 except as expressly provided under this License Agreement. Any attempt
78 otherwise to copy, sublicense, distribute or transfer this program is void and
79 your rights to use the program under this License agreement shall be
80 automatically terminated. However, parties who have received computer
81 software programs from you with this License Agreement will not have
82 their licenses terminated so long as such parties remain in full compliance.
84 5. If you wish to incorporate parts of this program into other free
85 programs whose distribution conditions are different, write to the Free
86 Software Foundation at 675 Mass Ave, Cambridge, MA 02139. We have not yet
87 worked out a simple rule that can be stated here, but we will often permit
88 this. We will be guided by the two goals of preserving the free status of
89 all derivatives of our free software and of promoting the sharing and reuse of
93 In other words, you are welcome to use, share and improve this program.
94 You are forbidden to forbid anyone else to use, share and improve
95 what you give them. Help stamp out software-hoarding! */
98 /* This structure records one command'd definition. */
100 struct cmd_list_element
102 /* Points to next command in this list. */
103 struct cmd_list_element
*next
;
105 /* Name of this command. */
108 /* Command class; class values are chosen by application program. */
111 /* Function definition of this command.
112 Zero for command class names and for help topics that
113 are not really commands. */
116 /* Documentation of this command (or help topic).
117 First line is brief documentation; remaining lines form, with it,
118 the full documentation. First line should end with a period.
119 Entire string should also end with a period, not a newline. */
122 /* Auxiliary information.
123 It is up to the calling program to decide what this means. */
126 /* Nonzero identifies a prefix command. For them, the address
127 of the variable containing the list of subcommands. */
128 struct cmd_list_element
**prefixlist
;
130 /* For prefix commands only:
131 String containing prefix commands to get here: this one
132 plus any others needed to get to it. Should end in a space.
133 It is used before the word "command" in describing the
134 commands reached through this prefix. */
137 /* For prefix commands only:
138 nonzero means do not get an error if subcommand is not
139 recognized; call the prefix's own function in that case. */
142 /* Nonzero says this is an abbreviation, and should not
143 be mentioned in lists of commands. */
147 /* Forward-declarations of the entry-points of command.c. */
149 extern struct cmd_list_element
*add_cmd ();
150 extern struct cmd_list_element
*add_alias_cmd ();
151 extern struct cmd_list_element
*add_prefix_cmd ();
152 extern struct cmd_list_element
*lookup_cmd ();
153 extern void delete_cmd ();
154 extern void help_cmd ();
This page took 0.032455 seconds and 4 git commands to generate.