| 1 | /* |
| 2 | * Copyright (c) 1983 Regents of the University of California. |
| 3 | * All rights reserved. |
| 4 | * |
| 5 | * This code is derived from software contributed to Berkeley by |
| 6 | * Edward Wang at The University of California, Berkeley. |
| 7 | * |
| 8 | * %sccs.include.redist.c% |
| 9 | * |
| 10 | * @(#)lcmd.h 3.9 (Berkeley) %G% |
| 11 | */ |
| 12 | |
| 13 | #define LCMD_NARG 20 /* maximum number of arguments */ |
| 14 | |
| 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; |
| 25 | int arg_flags; |
| 26 | }; |
| 27 | |
| 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 */ |
| 34 | |
| 35 | struct lcmd_tab *lcmd_lookup(); |