/* Copyright (C) 1991, Marcus J. Ranum. All rights reserved. */ /* configure all options BEFORE including system stuff. */ #include "config.h" #include "mud.h" /* HIGH-level miscellaneous functions. */ /* dump the contents of the file to the player */ int say_file (who, nam) char *who; char *nam; { FILE *ifp; char buf[BUFSIZ]; if ((ifp = fopen (nam, "rb")) == (FILE *) 0) return (1); while (fgets (buf, sizeof (buf), ifp) != (char *) 0) say (who, buf, (char *) 0); (void) fclose (ifp); return (0); } /* oif an object to the given player. */ void oiftowho (Obj * o, char *who, char *nam) { int a; say (who, "object ", nam, "\n", (char *) 0); for (a = 0; a < (int) o->ocnt; a++) say (who, o->oap[a], "\n", (char *) 0); say (who, "endobj\n", (char *) 0); }