mirror of
https://github.com/anope/anope.git
synced 2026-07-06 23:23:13 +02:00
Various g++ fixes. Compiles, doesn't link.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1180 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
+9
-9
@@ -1029,9 +1029,9 @@ E void notice_server(char *source, Server * s, char *fmt, ...)
|
||||
E void notice_user(char *source, User *u, const char *fmt, ...)
|
||||
FORMAT(printf,3,4);
|
||||
|
||||
E void notice_list(char *source, char *dest, char **text);
|
||||
E void notice_lang(char *source, User *dest, int message, ...);
|
||||
E void notice_help(char *source, User *dest, int message, ...);
|
||||
E void notice_list(const char *source, const char *dest, char **text);
|
||||
E void notice_lang(const char *source, User *dest, int message, ...);
|
||||
E void notice_help(const char *source, User *dest, int message, ...);
|
||||
|
||||
|
||||
/**** servers.c ****/
|
||||
@@ -1251,16 +1251,16 @@ E void anope_cmd_nick(char *nick, char *name, char *mode); /* NICK */
|
||||
E void anope_cmd_chg_nick(char *oldnick, char *newnick); /* NICK */
|
||||
E void anope_cmd_bot_nick(char *nick, char *user,char *host,char *real,char *modes); /* NICK */
|
||||
E void anope_cmd_guest_nick(char *nick, char *user,char *host,char *real,char *modes); /* NICK */
|
||||
E void anope_cmd_notice(char *source, char *dest, const char *fmt, ...); /* NOTICE */
|
||||
E void anope_cmd_notice_ops(char *source, char *dest, const char *fmt, ...); /* NOTICE */
|
||||
E void anope_cmd_notice2(char *source, char *dest, char *msg); /* NOTICE */
|
||||
E void anope_cmd_notice(const char *source, const char *dest, const char *fmt, ...); /* NOTICE */
|
||||
E void anope_cmd_notice_ops(const char *source, const char *dest, const char *fmt, ...); /* NOTICE */
|
||||
E void anope_cmd_notice2(const char *source, const char *dest, const char *msg); /* NOTICE */
|
||||
E void anope_cmd_serv_notice(char *source, char *dest, char *msg); /* NOTICE */
|
||||
E void anope_cmd_part(const char *nick, const char *chan, const char *fmt, ...); /* PART */
|
||||
E void anope_cmd_pass(char *pass); /* PASS */
|
||||
E void anope_cmd_pong(char *servname, char *who); /* PONG */
|
||||
E void anope_cmd_privmsg(char *source, char *dest, const char *fmt, ...); /* PRIVMSG */
|
||||
E void anope_cmd_action(char *source, char *dest, const char *fmt, ...); /* PRIVMSG */
|
||||
E void anope_cmd_privmsg2(char *source, char *dest, char *msg); /* PRIVMSG */
|
||||
E void anope_cmd_privmsg(const char *source, const char *dest, const char *fmt, ...); /* PRIVMSG */
|
||||
E void anope_cmd_action(const char *source, const char *dest, const char *fmt, ...); /* PRIVMSG */
|
||||
E void anope_cmd_privmsg2(const char *source, const char *dest, const char *msg); /* PRIVMSG */
|
||||
E void anope_cmd_serv_privmsg(char *source, char *dest, char *msg); /* PRIVMSG */
|
||||
E void anope_cmd_protoctl(); /* PROTOCTL */
|
||||
E void anope_cmd_quit(char *source, const char *fmt, ...); /* QUIT */
|
||||
|
||||
+3
-3
@@ -74,7 +74,7 @@ void add_ignore(const char *nick, time_t delta)
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Check if we already got an identical entry. */
|
||||
for (ign = ignore; ign; ign = ign->next)
|
||||
if (stricmp(ign->mask, mask) == 0)
|
||||
@@ -263,12 +263,12 @@ int split_buf(char *buf, char ***argv, int colon_special)
|
||||
/* We only got a nick.. */
|
||||
snprintf(tmp, sizeof(tmp), "%s!*@*", nick);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
for (ign = ignore; ign; ign = ign->next)
|
||||
|
||||
if (stricmp(ign->mask, tmp) == 0)
|
||||
if (stricmp(ign->mask, tmp) == 0)
|
||||
|
||||
break;
|
||||
|
||||
|
||||
+1
-1
@@ -167,7 +167,7 @@ void notice_list(char *source, char *dest, char **text)
|
||||
* @param ... any number of parameters
|
||||
* @return void
|
||||
*/
|
||||
void notice_lang(char *source, User * dest, int message, ...)
|
||||
void notice_lang(const char *source, User * dest, int message, ...)
|
||||
{
|
||||
va_list args;
|
||||
char buf[4096]; /* because messages can be really big */
|
||||
|
||||
+1
-1
@@ -122,7 +122,7 @@ Server *new_server(Server * uplink, const char *name, const char *desc,
|
||||
{
|
||||
Server *serv;
|
||||
|
||||
serv = scalloc(sizeof(Server), 1);
|
||||
serv = (Server *)scalloc(sizeof(Server), 1);
|
||||
if (!name)
|
||||
name = "";
|
||||
serv->name = sstrdup(name);
|
||||
|
||||
+6
-6
@@ -251,7 +251,7 @@ int add_session(char *nick, char *host, char *hostip)
|
||||
}
|
||||
|
||||
nsessions++;
|
||||
session = scalloc(sizeof(Session), 1);
|
||||
session = (Session *)scalloc(sizeof(Session), 1);
|
||||
session->host = sstrdup(host);
|
||||
list = &sessionlist[HASH(session->host)];
|
||||
session->next = *list;
|
||||
@@ -343,7 +343,7 @@ void expire_exceptions(void)
|
||||
nexceptions--;
|
||||
memmove(exceptions + i, exceptions + i + 1,
|
||||
sizeof(Exception) * (nexceptions - i));
|
||||
exceptions = srealloc(exceptions, sizeof(Exception) * nexceptions);
|
||||
exceptions = (Exception *)srealloc(exceptions, sizeof(Exception) * nexceptions);
|
||||
i--;
|
||||
}
|
||||
}
|
||||
@@ -409,7 +409,7 @@ void load_exceptions()
|
||||
case 7:
|
||||
SAFE(read_int16(&n, f));
|
||||
nexceptions = n;
|
||||
exceptions = scalloc(sizeof(Exception) * nexceptions, 1);
|
||||
exceptions = (Exception *)scalloc(sizeof(Exception) * nexceptions, 1);
|
||||
if (!nexceptions) {
|
||||
close_db(f);
|
||||
return;
|
||||
@@ -532,7 +532,7 @@ int exception_add(User * u, const char *mask, const int limit,
|
||||
}
|
||||
|
||||
nexceptions++;
|
||||
exceptions = srealloc(exceptions, sizeof(Exception) * nexceptions);
|
||||
exceptions = (Exception *)srealloc(exceptions, sizeof(Exception) * nexceptions);
|
||||
|
||||
exceptions[nexceptions - 1].mask = sstrdup(mask);
|
||||
exceptions[nexceptions - 1].limit = limit;
|
||||
@@ -557,7 +557,7 @@ static int exception_del(const int index)
|
||||
nexceptions--;
|
||||
memmove(exceptions + index, exceptions + index + 1,
|
||||
sizeof(Exception) * (nexceptions - index));
|
||||
exceptions = srealloc(exceptions, sizeof(Exception) * nexceptions);
|
||||
exceptions = (Exception *)srealloc(exceptions, sizeof(Exception) * nexceptions);
|
||||
|
||||
return 1;
|
||||
}
|
||||
@@ -802,7 +802,7 @@ int do_exception(User * u)
|
||||
|
||||
if ((n1 >= 0 && n1 < nexceptions) && (n2 >= 0 && n2 < nexceptions)
|
||||
&& (n1 != n2)) {
|
||||
exception = scalloc(sizeof(Exception), 1);
|
||||
exception = (Exception *)scalloc(sizeof(Exception), 1);
|
||||
memcpy(exception, &exceptions[n1], sizeof(Exception));
|
||||
|
||||
if (n1 < n2) {
|
||||
|
||||
+1
-1
@@ -384,7 +384,7 @@ int slist_setcapacity(SList * slist, int16 capacity)
|
||||
slist->capacity = capacity;
|
||||
if (slist->capacity)
|
||||
slist->list =
|
||||
srealloc(slist->list, sizeof(void *) * slist->capacity);
|
||||
(void **)srealloc(slist->list, sizeof(void *) * slist->capacity);
|
||||
else {
|
||||
free(slist->list);
|
||||
slist->list = NULL;
|
||||
|
||||
+1
-1
@@ -93,7 +93,7 @@ void check_timeouts(void)
|
||||
|
||||
Timeout *add_timeout(int delay, void (*code) (Timeout *), int repeat)
|
||||
{
|
||||
Timeout *t = scalloc(sizeof(Timeout), 1);
|
||||
Timeout *t = (Timeout *)scalloc(sizeof(Timeout), 1);
|
||||
t->settime = time(NULL);
|
||||
t->timeout = t->settime + delay;
|
||||
t->code = code;
|
||||
|
||||
+6
-6
@@ -35,7 +35,7 @@ static User *new_user(const char *nick)
|
||||
{
|
||||
User *user, **list;
|
||||
|
||||
user = scalloc(sizeof(User), 1);
|
||||
user = (User *)scalloc(sizeof(User), 1);
|
||||
if (!nick)
|
||||
nick = "";
|
||||
strscpy(user->nick, nick, NICKMAX);
|
||||
@@ -111,7 +111,7 @@ void update_host(User * user)
|
||||
free(user->na->last_usermask);
|
||||
|
||||
user->na->last_usermask =
|
||||
smalloc(strlen(common_get_vident(user)) +
|
||||
(char *)smalloc(strlen(common_get_vident(user)) +
|
||||
strlen(common_get_vhost(user)) + 2);
|
||||
sprintf(user->na->last_usermask, "%s@%s", common_get_vident(user),
|
||||
common_get_vhost(user));
|
||||
@@ -180,7 +180,7 @@ void change_user_username(User * user, const char *username)
|
||||
free(user->na->last_usermask);
|
||||
|
||||
user->na->last_usermask =
|
||||
smalloc(strlen(common_get_vident(user)) +
|
||||
(char *)smalloc(strlen(common_get_vident(user)) +
|
||||
strlen(common_get_vhost(user)) + 2);
|
||||
sprintf(user->na->last_usermask, "%s@%s", common_get_vident(user),
|
||||
common_get_vhost(user));
|
||||
@@ -435,7 +435,7 @@ Uid *new_uid(const char *nick, char *uid)
|
||||
{
|
||||
Uid *u, **list;
|
||||
|
||||
u = scalloc(sizeof(Uid), 1);
|
||||
u = (Uid *)scalloc(sizeof(Uid), 1);
|
||||
if (!nick || !uid) {
|
||||
return NULL;
|
||||
}
|
||||
@@ -750,7 +750,7 @@ User *do_nick(const char *source, char *nick, char *username, char *host,
|
||||
if (user->na->last_usermask)
|
||||
free(user->na->last_usermask);
|
||||
user->na->last_usermask =
|
||||
smalloc(strlen(common_get_vident(user)) +
|
||||
(char *)smalloc(strlen(common_get_vident(user)) +
|
||||
strlen(common_get_vhost(user)) + 2);
|
||||
sprintf(user->na->last_usermask, "%s@%s",
|
||||
common_get_vident(user), common_get_vhost(user));
|
||||
@@ -1089,7 +1089,7 @@ char *create_mask(User * u)
|
||||
* will never be longer than this (and will often be shorter), thus we
|
||||
* can use strcpy() and sprintf() safely.
|
||||
*/
|
||||
end = mask = smalloc(ulen + strlen(common_get_vhost(u)) + 3);
|
||||
end = mask = (char *)smalloc(ulen + strlen(common_get_vhost(u)) + 3);
|
||||
end += sprintf(end, "%s%s@",
|
||||
(ulen <
|
||||
(*(common_get_vident(u)) ==
|
||||
|
||||
Reference in New Issue
Block a user