neozeed ircu2.9.32-linux-hacks.diff
This commit is contained in:
@@ -47,6 +47,7 @@ static char sccsid[] = "@(#)chkconf.c 1.9 1/30/94 (C) 1993 Darren Reed";
|
||||
** but i see h.h isn't included for some reason.. so they're here */
|
||||
char *crule_parse PROTO((char *rule));
|
||||
void crule_free PROTO((char **elem));
|
||||
int dgets PROTO((int, char *, int));
|
||||
|
||||
#undef free
|
||||
#define MyMalloc(x) malloc(x)
|
||||
@@ -62,7 +63,7 @@ static char *configfile = CONFIGFILE;
|
||||
static char nullfield[] = "";
|
||||
static char maxsendq[12];
|
||||
|
||||
main(argc, argv)
|
||||
int main(argc, argv)
|
||||
int argc;
|
||||
char *argv[];
|
||||
{
|
||||
@@ -171,10 +172,10 @@ int opt;
|
||||
aconf->passwd = (char *)NULL;
|
||||
aconf->name = (char *)NULL;
|
||||
aconf->class = (aClass *)NULL;
|
||||
if (tmp = (char *)index(line, '\n'))
|
||||
if ((tmp = (char *)index(line, '\n')))
|
||||
*tmp = 0;
|
||||
else while(dgets(fd, c, sizeof(c) - 1))
|
||||
if (tmp = (char *)index(c, '\n'))
|
||||
if ((tmp = (char *)index(c, '\n')))
|
||||
{
|
||||
*tmp = 0;
|
||||
break;
|
||||
@@ -207,7 +208,7 @@ int opt;
|
||||
if (!*(tmp+1))
|
||||
break;
|
||||
else
|
||||
for (s = tmp; *s = *++s; )
|
||||
for (s = tmp; (*s = *(s+1)); ++s)
|
||||
;
|
||||
tmp++;
|
||||
}
|
||||
@@ -690,7 +691,7 @@ aConfItem *top;
|
||||
{
|
||||
if (aconf->status & CONF_CONNECT_SERVER)
|
||||
otype = CONF_NOCONNECT_SERVER;
|
||||
else if (aconf->status & CONF_NOCONNECT_SERVER)
|
||||
else/* if (aconf->status & CONF_NOCONNECT_SERVER)*/
|
||||
otype = CONF_CONNECT_SERVER;
|
||||
|
||||
for (bconf = top; bconf; bconf = bconf->next)
|
||||
@@ -698,8 +699,8 @@ aConfItem *top;
|
||||
if (bconf == aconf || !(bconf->status & otype))
|
||||
continue;
|
||||
if (bconf->class == aconf->class &&
|
||||
!mycmp(bconf->name, aconf->name) &&
|
||||
!mycmp(bconf->host, aconf->host))
|
||||
!strcasecmp(bconf->name, aconf->name) &&
|
||||
!strcasecmp(bconf->host, aconf->host))
|
||||
{
|
||||
aconf->status |= CONF_MATCH;
|
||||
bconf->status |= CONF_MATCH;
|
||||
@@ -713,7 +714,7 @@ aConfItem *top;
|
||||
if ((bconf == aconf) ||
|
||||
!(bconf->status & CONF_SERVER_MASK))
|
||||
continue;
|
||||
if (!mycmp(bconf->name, aconf->name))
|
||||
if (!strcasecmp(bconf->name, aconf->name))
|
||||
{
|
||||
aconf->status |= CONF_MATCH;
|
||||
break;
|
||||
@@ -746,7 +747,7 @@ u_int status;
|
||||
return '-';
|
||||
}
|
||||
|
||||
outofmemory()
|
||||
void outofmemory()
|
||||
{
|
||||
(void)write(2, "Out of memory\n", 14);
|
||||
exit(-1);
|
||||
|
||||
Reference in New Issue
Block a user