/* Copyright (C) 1991, Marcus J. Ranum. All rights reserved. */ /* configure all options BEFORE including system stuff. */ #include "config.h" #include "mud.h" #include "match.h" #include "vars.h" #include "look.h" /* read text off of something. */ /* ARGSUSED */ int cmd_read (int argc, char *argv[], char *who, char *aswho) { char ob[MAXOID]; char *ap; if (matchlocal (who, argv[1], ut_loc (run_actor ()), MTCH_UNIQ | MTCH_MEOK | MTCH_NONLOC, ob)) return (UERR_NOMATCH); /* text ? */ ap = ut_getatt (ob, 0, typ_str, var_text, (char *) 0); if (ap != (char *) 0) { say (who, ap, "\n", (char *) 0); return (UERR_NONE); } /* no text ? desc */ ap = ut_getatt (ob, 0, typ_str, var_desc, (char *) 0); if (ap != (char *) 0) { say (who, ap, "\n", (char *) 0); return (UERR_NONE); } say (who, "You see nothing written there.\n", (char *) 0); return (UERR_NONE); }