Commit | Line | Data |
---|---|---|
39dc458a | 1 | /* |
46e9ea25 KB |
2 | * Copyright (c) 1983 Regents of the University of California. |
3 | * All rights reserved. | |
4 | * | |
3dd3a9e5 KB |
5 | * This code is derived from software contributed to Berkeley by |
6 | * Edward Wang at The University of California, Berkeley. | |
7 | * | |
87f529ec | 8 | * %sccs.include.redist.c% |
46e9ea25 | 9 | * |
3dd3a9e5 | 10 | * @(#)lcmd.h 3.9 (Berkeley) %G% |
39dc458a EW |
11 | */ |
12 | ||
4222244b EW |
13 | #define LCMD_NARG 20 /* maximum number of arguments */ |
14 | ||
39dc458a EW |
15 | struct lcmd_tab { |
16 | char *lc_name; | |
17 | int lc_minlen; | |
18 | int (*lc_func)(); | |
19 | struct lcmd_arg *lc_arg; | |
20 | }; | |
21 | ||
22 | struct lcmd_arg { | |
23 | char *arg_name; | |
24 | int arg_minlen; | |
855d0f8f | 25 | int arg_flags; |
39dc458a | 26 | }; |
39dc458a | 27 | |
855d0f8f EW |
28 | /* arg_flags bits */ |
29 | #define ARG_TYPE 0x0f /* type of arg */ | |
30 | #define ARG_ANY 0x00 /* any type */ | |
31 | #define ARG_NUM 0x01 /* must be a number */ | |
32 | #define ARG_STR 0x02 /* must be a string */ | |
33 | #define ARG_LIST 0x10 /* this arg can be a list */ | |
39dc458a EW |
34 | |
35 | struct lcmd_tab *lcmd_lookup(); |