#include "config.h" #include "mud.h" #include "u.h" extern int ub_echo (); extern int ub_err (); extern int ub_minv (); extern int ub_mloc (); extern int ub_mobj (); extern int ub_mply (); extern int ub_cmd (); extern int ub_mWHO (); extern int ub_int (); extern int ub_oid (); extern int ub_rnd (); extern int ub_str (); extern int ub_strlen (); extern int ub_ladd (); extern int ub_ldel (); extern int ub_llok (); extern int ub_lcnt (); extern int ub_litem (); extern int ub_time (); extern int ub_ctime (); extern int ub_world (); static Bltin bltab[] = { {"echo", 0, BLT_NOFLGS, ub_echo}, {"error", 1, BLT_FIXARG, ub_err}, {"listadd", 1, BLT_NOFLGS, ub_ladd}, {"listdel", 1, BLT_NOFLGS, ub_ldel}, {"listlook", 1, BLT_NOFLGS, ub_llok}, {"listcnt", 1, BLT_FIXARG, ub_lcnt}, {"listitem", 2, BLT_FIXARG, ub_litem}, {"matchinv", 1, BLT_NOFLGS, ub_minv}, {"matchloc", 1, BLT_NOFLGS, ub_mloc}, {"matchobj", 1, BLT_NOFLGS, ub_mobj}, {"matchply", 1, BLT_NOFLGS, ub_mply}, {"matchWHO", 1, BLT_FIXARG, ub_mWHO}, {"time", 0, BLT_FIXARG, ub_time}, {"ctime", 0, BLT_NOFLGS, ub_ctime}, {"int", 1, BLT_FIXARG, ub_int}, {"oid", 1, BLT_FIXARG, ub_oid}, {"rnd", 1, BLT_FIXARG, ub_rnd}, {"str", 1, BLT_FIXARG, ub_str}, {"strlen", 1, BLT_FIXARG, ub_strlen}, {"cmd", 1, BLT_FIXARG, ub_cmd}, {"world", 1, BLT_FIXARG, ub_world}, {NULL, 0, 0, NULL} }; Bltin *u_bltlookup (char *s) { Bltin *ret; for (ret = bltab; ret->nam != (char *) 0; ret++) if (!strcmp (s, ret->nam)) return (ret); return ((Bltin *) 0); }