/
roa/
roa/lib/boards/
roa/lib/config/
roa/lib/edits/
roa/lib/help/
roa/lib/misc/
roa/lib/plrobjs/
roa/lib/quests/
roa/lib/socials/
roa/lib/www/
roa/lib/www/LEDSign/
roa/lib/www/LEDSign/fonts/
roa/lib/www/LEDSign/scripts/
roa/src/s_inc/
roa/src/sclient/
roa/src/sclient/binary/
roa/src/sclient/text/
roa/src/util/
/************************************************************************
	Realms of Aurealis 		James Rhone aka Vall of RoA

comm.h				Header file for comm.c

		******** Heavily modified and expanded ********
		*** BE AWARE OF ALL RIGHTS AND RESERVATIONS ***
		******** Heavily modified and expanded ********
		        All rights reserved henceforth. 

    Please note that no guarantees are associated with any code from
Realms of Aurealis.  All code which has been released to the general
public has been done so with an 'as is' pretense.  RoA is based on both
Diku and CircleMUD and ALL licenses from both *MUST* be adhered to as well
as the RoA license.   *** Read, Learn, Understand, Improve ***
*************************************************************************/
#ifndef ROA_COMM_H
#define ROA_COMM_H

#define NUM_RESERVED_DESCS	8

/* comm.c */
void	send_to_all(char *messg);
void	send_to_char(char *messg, struct char_data *ch);
void	send_to_room(char *messg, int room);
void	send_to_outdoor(char *messg);
void	perform_to_all(char *messg, struct char_data *ch);
void	close_socket(struct descriptor_data *d);
void	close_client_socket(struct descriptor_data *d);
void    default_sigs(void);

void	perform_act(char *orig, struct char_data *ch, struct obj_data *obj,
		    void *vict_obj, struct char_data *to, int type);

void	act(char *str, int hide_invisible, chdata *ch, obdata *obj, 
            void *vict_obj, int type);

#define TO_ROOM			1
#define TO_VICT			2
#define TO_NOTVICT		3
#define TO_CHAR			4
#define TO_SNOOP		5
#define TO_SNOOP_HIDE		6
#define TO_ZONE_MORTLOG		7
#define TO_WORLD_MORTLOG	8

#define TO_SLEEP		128	/* to char, even if sleeping */

int	write_to_descriptor(int desc, char *txt);
void    send_to_q(char *messg, struct descriptor_data *d);
void	write_to_q(char *txt, struct txt_q *queue, int aliased);
void	write_to_output(const char *txt, struct descriptor_data *d);
void	page_string(struct descriptor_data *d, char *str, int keep_internal);

#define USING_SMALL(d)	((d)->output == (d)->small_outbuf)
#define USING_LARGE(d)  (!USING_SMALL(d))

typedef RETSIGTYPE sigfunc(int);

/* Function prototypes for brain-dead OS's */

#ifdef __COMM_C__

#ifndef accept
   int accept();
#endif

#ifndef bind
   int bind();
#endif

#ifndef chdir
   int chdir();
#endif

#ifndef close
   int close();
#endif

#ifndef getpeername
   int getpeername();
#endif

#ifndef getrlimit
   int getrlimit();
#endif

#ifndef getsockname
   int getsockname();
#endif

#ifndef htonl
   u_long htonl();
#endif

#ifndef htons
   u_short htons();
#endif

#ifndef listen
   int listen();
#endif

#ifndef ntohl
   u_long ntohl();
#endif

#ifndef read
   int read();
#endif

#ifndef select
   int select();
#endif

#ifndef setitimer
   int setitimer();
#endif

#ifndef setrlimit
   int setrlimit();
#endif

#ifndef setsockopt
   int setsockopt();
#endif

#ifndef socket
   int socket();
#endif

#ifndef write
   int write();
#endif

#endif /* __COMM_C__ */

#endif /* ROA_COMM_H */