#include "whowas.h"
-/*
-** 'offsetof' is defined in ANSI-C. The following definition
-** is not absolutely portable (I have been told), but so far
-** it has worked on all machines I have needed it. The type
-** should be size_t but... --msa
-*/
-#ifndef offsetof
-#define offsetof(t,m) (int)((&((t *)0L)->m))
-#endif
-
+#include <stddef.h> /* For offsetof macro */
#define elementsof(x) (sizeof(x)/sizeof(x[0]))
/*
Link *lp;
int member;
- /* Moved check here, kinda faster.
- * Note IsULine only uses the other parameter. -Donwulff */
if (IsULine (cptr, cptr) || IsServer (cptr) || IsSRoot (cptr))
return 0;
return (CANNOT_SEND_NOPRIVMSGS);
if (chptr->mode.mode & MODE_NOCOLORS)
- if (strchr (msgtext, 3) != (char) NULL ||
- strchr (msgtext, 27) != (char) NULL)
+ if (strchr (msgtext, 3) != (char *) NULL ||
+ strchr (msgtext, 27) != (char *) NULL)
return (CANNOT_SEND_NOCOLORS);
if ((!lp || !(lp->flags & (CHFL_CHANOP | CHFL_VOICE)) ||
/* If the channel is mode +c, we'll need to block colored part
reasons */
if ((chptr->mode.mode & MODE_NOCOLORS) && comment)
- if (strchr (comment, 3) != (char) NULL ||
- strchr (comment, 27) != (char) NULL)
+ if (strchr (comment, 3) != (char *) NULL ||
+ strchr (comment, 27) != (char *) NULL)
ColorStrip = 1;
/* Do not use IsMember here: zombies must be able to part too */
int check_for_target_limit (aClient * sptr, void *target, const char *name)
{
u_char *p;
-#ifdef __alpha
- u_long tmp = ((u_long) target & 0xffff00) >> 8;
-#else
u_int tmp = ((u_int) target & 0xffff00) >> 8;
-#endif
u_char hash = (tmp * tmp) >> 12;
if (IsAnOper (sptr))