/*
Copyright (C) 1991, Marcus J. Ranum. All rights reserved.
*/
#ifndef lint
static char RCSid[] = "$Header: /usr/users/mjr/hacks/umud/RCS/misc2.c,v 1.1 91/07/04 17:32:28 mjr Rel $";
#endif
/* configure all options BEFORE including system stuff. */
#include "config.h"
#include <stdio.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,"r")) == (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(o,who,nam)
Obj *o;
char *who;
char *nam;
{
int a;
say(who,"object ",nam,"\n",(char *)0);
for(a = 0; a < o->ocnt; a++)
say(who,o->oap[a],"\n",(char *)0);
say(who,"endobj\n",(char *)0);
}