1a78c1965Sedward /* 2*b72553aeSbostic * Copyright (c) 1983, 1993 3*b72553aeSbostic * The Regents of the University of California. All rights reserved. 4bac0d407Sbostic * 58e751acfSbostic * This code is derived from software contributed to Berkeley by 68e751acfSbostic * Edward Wang at The University of California, Berkeley. 78e751acfSbostic * 8122a1d9eSbostic * %sccs.include.redist.c% 9bac0d407Sbostic * 10*b72553aeSbostic * @(#)lcmd.h 8.1 (Berkeley) 06/06/93 11a78c1965Sedward */ 12a78c1965Sedward 13c42e298aSedward #define LCMD_NARG 20 /* maximum number of arguments */ 14c42e298aSedward 15a78c1965Sedward struct lcmd_tab { 16a78c1965Sedward char *lc_name; 17a78c1965Sedward int lc_minlen; 18a78c1965Sedward int (*lc_func)(); 19a78c1965Sedward struct lcmd_arg *lc_arg; 20a78c1965Sedward }; 21a78c1965Sedward 22a78c1965Sedward struct lcmd_arg { 23a78c1965Sedward char *arg_name; 24a78c1965Sedward int arg_minlen; 25adcadf3cSedward int arg_flags; 26a78c1965Sedward }; 27a78c1965Sedward 28adcadf3cSedward /* arg_flags bits */ 29adcadf3cSedward #define ARG_TYPE 0x0f /* type of arg */ 30adcadf3cSedward #define ARG_ANY 0x00 /* any type */ 31adcadf3cSedward #define ARG_NUM 0x01 /* must be a number */ 32adcadf3cSedward #define ARG_STR 0x02 /* must be a string */ 33adcadf3cSedward #define ARG_LIST 0x10 /* this arg can be a list */ 34a78c1965Sedward 35a78c1965Sedward struct lcmd_tab *lcmd_lookup(); 36