Move the definition of the NotifyItem and NotifyList types from struct.h to notify.h
This change means that struct.h no longer needs to include alist.h, so it will be indirectly included in a lot fewer other files. As a consequence, server.h needs to include notify.h to get the definitions of those data types.
This commit is contained in:
@@ -9,9 +9,34 @@
|
||||
*
|
||||
* @(#)$Id$
|
||||
*/
|
||||
#ifndef NOTIFY_H_
|
||||
#define NOTIFY_H_
|
||||
|
||||
#ifndef __notify_h_
|
||||
#define __notify_h_
|
||||
#include "alist.h"
|
||||
|
||||
/* These types pun the Array_item and Array types from alist.h respectively */
|
||||
typedef struct notify_stru
|
||||
{
|
||||
char *nick; /* Who are we watching? */
|
||||
u_32int_t hash;
|
||||
char *host;
|
||||
char *looking;
|
||||
int times;
|
||||
time_t lastseen;
|
||||
time_t period;
|
||||
time_t added;
|
||||
int flag; /* Is the person on irc? */
|
||||
} NotifyItem;
|
||||
|
||||
typedef struct notify_alist
|
||||
{
|
||||
struct notify_stru **list;
|
||||
int max;
|
||||
int max_alloc;
|
||||
alist_func func;
|
||||
hash_type hash;
|
||||
char *ison;
|
||||
} NotifyList;
|
||||
|
||||
void show_notify_list (int);
|
||||
BUILT_IN_COMMAND(notify);
|
||||
@@ -34,4 +59,4 @@ extern char *get_notify_nicks (int, int, char *, int);
|
||||
void send_watch (int);
|
||||
char *get_watch_nicks (int, int, char *, int);
|
||||
|
||||
#endif /* __notify_h_ */
|
||||
#endif /* NOTIFY_H_ */
|
||||
|
||||
@@ -9,15 +9,15 @@
|
||||
*
|
||||
* @(#)$Id$
|
||||
*/
|
||||
|
||||
#ifndef __server_h_
|
||||
#define __server_h_
|
||||
#ifndef SERVER_H_
|
||||
#define SERVER_H_
|
||||
|
||||
/* for ChannelList */
|
||||
#include "who.h"
|
||||
#include "names.h"
|
||||
#include "struct.h"
|
||||
#include "ssl.h"
|
||||
#include "notify.h"
|
||||
|
||||
/*
|
||||
* type definition to distinguish different
|
||||
@@ -373,7 +373,6 @@ void password_sendline (char *data, char *line);
|
||||
int get_server_local_port (int);
|
||||
struct sockaddr_foobar get_server_local_addr (int);
|
||||
struct sockaddr_foobar get_server_uh_addr (int);
|
||||
NotifyItem *get_server_notify_list (int);
|
||||
void BX_send_msg_to_nicks (ChannelList *, int, char *);
|
||||
void BX_send_msg_to_channels (int, const char *);
|
||||
int BX_is_server_queue (void);
|
||||
@@ -428,4 +427,4 @@ extern const char *umodes;
|
||||
#define LLOOK_SPLIT 0
|
||||
#define CHAN_SPLIT 1
|
||||
|
||||
#endif /* __server_h_ */
|
||||
#endif /* SERVER_H_ */
|
||||
|
||||
@@ -7,15 +7,13 @@
|
||||
* Copyright(c) 1997
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __struct_h_
|
||||
#define __struct_h_
|
||||
#ifndef STRUCT_H_
|
||||
#define STRUCT_H_
|
||||
|
||||
#ifdef WINNT
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#include "alist.h"
|
||||
#include "hash.h"
|
||||
#include "config.h"
|
||||
#include "ssl.h"
|
||||
@@ -1139,30 +1137,6 @@ typedef struct AliasItemStru
|
||||
ArgList *arglist;
|
||||
} Alias;
|
||||
|
||||
typedef struct notify_stru
|
||||
{
|
||||
char *nick; /* Who are we watching? */
|
||||
u_32int_t hash;
|
||||
char *host;
|
||||
char *looking;
|
||||
int times;
|
||||
time_t lastseen;
|
||||
time_t period;
|
||||
time_t added;
|
||||
int flag; /* Is the person on irc? */
|
||||
} NotifyItem;
|
||||
|
||||
|
||||
typedef struct notify_alist
|
||||
{
|
||||
struct notify_stru **list;
|
||||
int max;
|
||||
int max_alloc;
|
||||
alist_func func;
|
||||
hash_type hash;
|
||||
char * ison;
|
||||
} NotifyList;
|
||||
|
||||
typedef Window *(*window_func) (Window *, char **args, char *usage);
|
||||
|
||||
typedef struct window_ops_T {
|
||||
@@ -1226,4 +1200,4 @@ typedef struct _dcc_struct_type {
|
||||
u_32int_t struct_type;
|
||||
} dcc_struct_type;
|
||||
|
||||
#endif /* __struct_h_ */
|
||||
#endif /* STRUCT_H_ */
|
||||
|
||||
Reference in New Issue
Block a user