/* Copyright (C) 1991, Marcus J. Ranum. All rights reserved. */ #ifndef lint static char RCSid[] = "$Header: /usr/users/mjr/hacks/umud/CMD/RCS/read.c,v 1.3 91/09/19 12:55:43 mjr Exp $"; #endif /* 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 */ cmd_read(argc,argv,who,aswho) 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(1); /* text ? */ ap = ut_getatt(ob,0,typ_str,var_text,(char *)0); if(ap != (char *)0) { say(who,ap,"\n",(char *)0); return(0); } /* 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(0); } say(who,"You see nothing written there.\n",(char *)0); return(0); }