#ifndef RCS_PRNT_HH
#define RCS_PRNT_HH
#ifdef __cplusplus
extern "C" {
#endif
#include <stdarg.h>
#ifdef __cplusplus
}
#endif
#ifdef __cplusplus
class LinkedList;
extern LinkedList *get_rcs_print_list();
#endif
#ifdef __cplusplus
extern "C" {
#endif
extern void clean_print_list(void);
extern void output_print_list(int output_func(const char *));
extern int count_characters_in_print_list(void);
extern int count_lines_in_print_list(void);
extern void convert_print_list_to_lines(void);
extern void update_lines_table(void);
extern int rcs_vprint(const char *_fmt, va_list va_args, int save_string);
extern int rcs_print(const char *_fmt, ...) __attribute__((format(printf,1,2)));
extern int rcs_print_debug(long, const char *_fmt, ...) __attribute__((format(printf,2,3)));
#ifdef DO_NOT_USE_RCS_PRINT_ERROR_NEW
extern int rcs_print_error(const char *_fmt, ...) __attribute__((format(printf,1,2)));
#else
extern int set_print_rcs_error_info(const char *file, int line);
extern int print_rcs_error_new(const char *_fmt, ...) __attribute__((format(printf,1,2)));
#define rcs_print_error set_print_rcs_error_info( __FILE__, __LINE__); print_rcs_error_new
#endif
extern void set_rcs_print_flag(long flags_to_set);
extern void clear_rcs_print_flag(long flags_to_set);
extern char *strip_control_characters(char *_dest, char *_src);
extern int separate_words(char **_dest, int _max, char *_src);
extern int rcs_puts(const char *);
extern int rcs_fputs(const char *);
extern char **get_rcs_lines_table(void);
extern int get_rcs_print_list_size(void);
typedef void (*RCS_PRINT_NOTIFY_FUNC_PTR) (void);
extern void set_rcs_print_notify(RCS_PRINT_NOTIFY_FUNC_PTR);
extern int set_rcs_print_file(const char *_file_name);
extern void close_rcs_printing(void);
#ifdef __cplusplus
}
#endif
#define PRINT_RCS_ERRORS 0x00000001
#define PRINT_NODE_CONSTRUCTORS 0x00000002
#define PRINT_NODE_DESTRUCTORS 0x00000004
#define PRINT_CMS_CONSTRUCTORS 0x00000008
#define PRINT_CMS_DESTRUCTORS 0x00000010
#define PRINT_NML_CONSTRUCTORS 0x00000020
#define PRINT_NML_DESTRUCTORS 0x00000040
#define PRINT_COMMANDS_RECIEVED 0x00000100
#define PRINT_COMMANDS_SENT 0x00000200
#define PRINT_STATUS_RECIEVED 0x00000400
#define PRINT_STATUS_SENT 0x00000800
#define PRINT_NODE_CYCLES 0x00001000
#define PRINT_NODE_MISSED_CYCLES 0x00002000
#define PRINT_NODE_CYCLE_TIMES 0x00004000
#define PRINT_NODE_PROCESS_TIMES 0x00008000
#define PRINT_NEW_WM 0x00010000
#define PRINT_NODE_ABORT 0x00020000
#define PRINT_CMS_CONFIG_INFO 0x00040000
#define PRINT_SOCKET_READ_SIZE 0x00080000
#define PRINT_SOCKET_WRITE_SIZE 0x00100000
#define PRINT_INTERFACE_LOADING 0x00200000
#define PRINT_RPC_SERVER_CALL 0x00400000
#define PRINT_SEMAPHORE_ACTIVITY 0x00800000
#define PRINT_SOCKET_CONNECT 0x01000000
#define PRINT_SERVER_THREAD_ACTIVITY 0x02000000
#define PRINT_SERVER_SUBSCRIPTION_ACTIVITY 0x04000000
#define PRINT_SHARED_MEMORY_ACTIVITY 0x08000000
#define PRINT_ALL_SOCKET_REQUESTS 0x10000000
#define PRINT_EVERYTHING 0xFFFFFFFF
#ifdef __cplusplus
enum RCS_PRINT_DESTINATION_TYPE {
#else
typedef enum {
#endif
RCS_PRINT_TO_STDOUT,
RCS_PRINT_TO_STDERR,
RCS_PRINT_TO_NULL,
RCS_PRINT_TO_LIST,
RCS_PRINT_TO_FILE,
RCS_PRINT_TO_MESSAGE_BOX,
RCS_PRINT_TO_LOGGER
#ifdef __cplusplus
};
#else
} RCS_PRINT_DESTINATION_TYPE;
#endif
#ifdef __cplusplus
extern "C" {
#endif
extern void set_rcs_print_destination(RCS_PRINT_DESTINATION_TYPE);
extern RCS_PRINT_DESTINATION_TYPE get_rcs_print_destination(void);
extern int rcs_print_sys_error(int error_source, const char *_fmt, ...) __attribute__((format(printf,2,3)));
#ifdef __cplusplus
enum RCS_PRINT_ERROR_SOURCE_TYPE {
#else
typedef enum {
#endif
ERRNO_ERROR_SOURCE = 1,
GETLASTERROR_ERROR_SOURCE,
WSAGETLASTERROR_ERROR_SOURCE
#ifdef __cplusplus
};
#else
} RCS_PRINT_ERROR_SOURCE_TYPE;
#endif
#ifdef __cplusplus
};
#endif
extern int max_rcs_errors_to_print;
extern int rcs_errors_printed;
extern char last_error_bufs[4][100];
extern int last_error_buf_filled;
#endif