neozeed ircu2.9.32-linux-hacks.diff

This commit is contained in:
2023-12-26 16:42:36 -05:00
parent ab64084f63
commit 51650c0d78
40 changed files with 718 additions and 720 deletions

View File

@@ -46,7 +46,7 @@ extern aClient *client, *local[];
#include <string.h>
#define BadPtr(x) (!(x) || (*(x) == '\0'))
#define DupString(x,y) do{x=(char *)MyMalloc(strlen(y)+1);(void)strcpy(x,y);}while(0)
#define mycmp strcasecmp
#define strcasecmp strcasecmp
#endif
#ifndef PROTO
@@ -164,6 +164,8 @@ void *crulearg[];
return (1);
}
return (0);
#else
return 1;
#endif
}
@@ -185,6 +187,8 @@ void *crulearg[];
return (1);
}
return (0);
#else
return 1;
#endif
}
@@ -207,6 +211,8 @@ void *crulearg[];
return (1);
}
return (0);
#else
return 1;
#endif
}
@@ -226,6 +232,8 @@ void *crulearg[];
return (1);
}
return (0);
#else
return 1;
#endif
}
@@ -373,16 +381,20 @@ char *rule;
crule_treeptr ruleroot = NULL;
int errcode = CR_NOERR;
if ((errcode = crule_gettoken (&next_tok, &ruleptr)) == CR_NOERR)
if ((errcode = crule_gettoken (&next_tok, &ruleptr)) == CR_NOERR) {
if ((errcode = crule_parseorexpr (&ruleroot, &next_tok,
&ruleptr)) == CR_NOERR)
if (ruleroot != NULL)
&ruleptr)) == CR_NOERR) {
if (ruleroot != NULL) {
if (next_tok == CR_END)
return ((char *) ruleroot);
else
errcode = CR_UNEXPCTTOK;
else
}
else {
errcode = CR_EXPCTOR;
}
}
}
if (ruleroot != NULL)
crule_free ((char **) &ruleroot);
#if !defined(CR_DEBUG) && !defined(CR_CHKCONF)
@@ -583,7 +595,7 @@ char **ruleptr;
{
for (funcnum = 0; ; funcnum++)
{
if (mycmp (crule_funclist[funcnum].name, funcname) == 0)
if (strcasecmp (crule_funclist[funcnum].name, funcname) == 0)
break;
if (crule_funclist[funcnum].name[0] == '\0')
return (CR_UNKNWFUNC);
@@ -653,7 +665,7 @@ char **ruleptr;
#if !defined(CR_DEBUG) && !defined(CR_CHKCONF)
(void) collapse (currarg);
#endif
if (!BadPtr (currarg))
/*if (!BadPtr (currarg)) -- always true */
{
DupString (argelemp, currarg);
argrootp->arg[argrootp->numargs++] = (void *) argelemp;