mirror of
https://github.com/weechat/weechat.git
synced 2026-07-10 19:53:13 +02:00
f5038bccbc
At the moment, building WeeChat triggers several thousand -Wstrict-prototypes diagnostics. This is due to its source code using an empty argument list for functions and function pointers that take no arguments, instead of explicitly declaring that they take no arguments by using a void list. This commit replaces all empty argument lists with a void list. Note that Ruby's headers also suffer the same problem, which WeeChat can't do anything to fix. Thus, building WeeChat with the Ruby plugin enabled will still issue approximately 30 such diagnostics.
69 lines
2.8 KiB
C
69 lines
2.8 KiB
C
/*
|
|
* Copyright (C) 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
|
|
*
|
|
* This file is part of WeeChat, the extensible chat client.
|
|
*
|
|
* WeeChat is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* WeeChat is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with WeeChat. If not, see <https://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#ifndef WEECHAT_PLUGIN_RELAY_RAW_H
|
|
#define WEECHAT_PLUGIN_RELAY_RAW_H
|
|
|
|
#include <time.h>
|
|
|
|
#include "relay-client.h"
|
|
|
|
#define RELAY_RAW_BUFFER_NAME "relay_raw"
|
|
#define RELAY_RAW_PREFIX_RECV "-->"
|
|
#define RELAY_RAW_PREFIX_SEND "<--"
|
|
|
|
#define RELAY_RAW_FLAG_RECV (1 << 0)
|
|
#define RELAY_RAW_FLAG_SEND (1 << 1)
|
|
#define RELAY_RAW_FLAG_BINARY (1 << 2)
|
|
|
|
struct t_relay_remote;
|
|
|
|
struct t_relay_raw_message
|
|
{
|
|
time_t date; /* date/time of message */
|
|
int date_usec; /* microseconds of date */
|
|
char *prefix; /* prefix */
|
|
char *message; /* message */
|
|
struct t_relay_raw_message *prev_message; /* pointer to prev. message */
|
|
struct t_relay_raw_message *next_message; /* pointer to next message */
|
|
};
|
|
|
|
struct t_relay_client;
|
|
|
|
extern struct t_gui_buffer *relay_raw_buffer;
|
|
extern int irc_relay_messages_count;
|
|
extern struct t_relay_raw_message *relay_raw_messages, *last_relay_raw_message;
|
|
|
|
extern void relay_raw_open (int switch_to_buffer);
|
|
extern struct t_relay_raw_message *relay_raw_message_add_to_list (time_t date,
|
|
int date_usec,
|
|
const char *prefix,
|
|
const char *message);
|
|
extern void relay_raw_print_client (struct t_relay_client *client,
|
|
enum t_relay_msg_type msg_type, int flags,
|
|
const char *data, int data_size);
|
|
extern void relay_raw_print_remote (struct t_relay_remote *remote,
|
|
enum t_relay_msg_type msg_type, int flags,
|
|
const char *data, int data_size);
|
|
extern void relay_raw_message_free_all (void);
|
|
extern int relay_raw_add_to_infolist (struct t_infolist *infolist,
|
|
struct t_relay_raw_message *raw_message);
|
|
|
|
#endif /* WEECHAT_PLUGIN_RELAY_RAW_H */
|