/ circle3.1 / src / comm.h
comm.h
 1  /* ************************************************************************
 2  *   File: comm.h                                        Part of CircleMUD *
 3  *  Usage: header file: prototypes of public communication functions       *
 4  *                                                                         *
 5  *  All rights reserved.  See license.doc for complete information.        *
 6  *                                                                         *
 7  *  Copyright (C) 1993, 94 by the Trustees of the Johns Hopkins University *
 8  *  CircleMUD is based on DikuMUD, Copyright (C) 1990, 1991.               *
 9  ************************************************************************ */
10  
11  #define NUM_RESERVED_DESCS	8
12  
13  /* comm.c */
14  size_t	send_to_char(struct char_data *ch, const char *messg, ...) __attribute__ ((format (printf, 2, 3)));
15  void	send_to_all(const char *messg, ...) __attribute__ ((format (printf, 1, 2)));
16  void	send_to_room(room_rnum room, const char *messg, ...) __attribute__ ((format (printf, 2, 3)));
17  void	send_to_outdoor(const char *messg, ...) __attribute__ ((format (printf, 1, 2)));
18  void	close_socket(struct descriptor_data *d);
19  
20  void	perform_act(const char *orig, struct char_data *ch,
21  		struct obj_data *obj, const void *vict_obj, const struct char_data *to);
22  
23  void	act(const char *str, int hide_invisible, struct char_data *ch,
24  		struct obj_data *obj, const void *vict_obj, int type);
25  
26  #define TO_ROOM		1
27  #define TO_VICT		2
28  #define TO_NOTVICT	3
29  #define TO_CHAR		4
30  #define TO_SLEEP	128	/* to char, even if sleeping */
31  
32  /* I/O functions */
33  void	write_to_q(const char *txt, struct txt_q *queue, int aliased);
34  int	write_to_descriptor(socket_t desc, const char *txt);
35  size_t	write_to_output(struct descriptor_data *d, const char *txt, ...) __attribute__ ((format (printf, 2, 3)));
36  size_t	vwrite_to_output(struct descriptor_data *d, const char *format, va_list args);
37  void	string_add(struct descriptor_data *d, char *str);
38  void	string_write(struct descriptor_data *d, char **txt, size_t len, long mailto, void *data);
39  
40  #define PAGE_LENGTH	22
41  #define PAGE_WIDTH	80
42  void	page_string(struct descriptor_data *d, char *str, int keep_internal);
43  
44  typedef RETSIGTYPE sigfunc(int);
45