Permalink
Browse files

Delete register keyword

Found by: michaelortmann
Patch by: michaelortmann
  • Loading branch information...
michaelortmann authored and vanosg committed Aug 28, 2018
1 parent 409d456 commit fbd763ae75928975ba5043e6aed3996e450b8e2f
View
@@ -787,7 +787,7 @@ static void bot_trace(int idx, char *par)
*/
static void bot_traced(int idx, char *par)
{
char *to, *p;
char *to, *p, *c;
int i, sock;
to = newsplit(&par);
@@ -823,7 +823,7 @@ static void bot_traced(int idx, char *par)
int j = 0;
{
register char *c = p;
c = p;
for (; *c != '\0'; c++)
if (*c == ':')
@@ -1302,6 +1302,7 @@ static void bot_part(int idx, char *par)
struct userrec *u;
int sock, partyidx;
int silent = 0;
int chan;
if (bot_flags(dcc[idx].user) & BOT_ISOLATE)
return;
@@ -1330,7 +1331,7 @@ static void bot_part(int idx, char *par)
if (party[partyidx].chan >= 0)
check_tcl_chpt(bot, nick, sock, party[partyidx].chan);
if ((b_numver(idx) >= NEAT_BOTNET) && !silent) {
register int chan = party[partyidx].chan;
chan = party[partyidx].chan;
if (par[0])
chanout_but(-1, chan, "*** (%s) %s %s %s (%s).\n", bot, nick,
View
@@ -737,7 +737,7 @@ void tell_bottree(int idx, int showver)
*/
void dump_links(int z)
{
register int i, l;
int i, l;
char x[1024];
tand_t *bot;
@@ -876,7 +876,7 @@ int users_in_subtree(tand_t *bot)
int botunlink(int idx, char *nick, char *reason, char *from)
{
char s[20];
register int i;
int i;
int bots, users;
tand_t *bot;
@@ -985,7 +985,7 @@ int botlink(char *linker, int idx, char *nick)
{
struct bot_addr *bi;
struct userrec *u;
register int i;
int i;
u = get_user_by_handle(userlist, nick);
if (!u || !(u->flags & USER_BOT)) {
@@ -1151,7 +1151,7 @@ static void tandem_relay_resolve_success(int);
/* Relay to another tandembot
*/
void tandem_relay(int idx, char *nick, register int i)
void tandem_relay(int idx, char *nick, int i)
{
struct userrec *u;
struct bot_addr *bi;
@@ -1224,7 +1224,7 @@ void tandem_relay(int idx, char *nick, register int i)
static void tandem_relay_resolve_failure(int idx)
{
struct chat_info *ci;
register int uidx = -1, i;
int uidx = -1, i;
for (i = 0; i < dcc_total; i++)
if ((dcc[i].type == &DCC_PRE_RELAY) &&
@@ -1286,9 +1286,9 @@ static void tandem_relay_resolve_success(int i)
/* Input from user before connect is ready
*/
static void pre_relay(int idx, char *buf, register int i)
static void pre_relay(int idx, char *buf, int i)
{
register int tidx = -1;
int tidx = -1;
for (i = 0; i < dcc_total; i++)
if ((dcc[i].type == &DCC_FORK_RELAY) &&
@@ -1334,7 +1334,7 @@ static void pre_relay(int idx, char *buf, register int i)
*/
static void failed_pre_relay(int idx)
{
register int tidx = -1, i;
int tidx = -1, i;
for (i = 0; i < dcc_total; i++)
if ((dcc[i].type == &DCC_FORK_RELAY) &&
@@ -1376,9 +1376,9 @@ static void failed_pre_relay(int idx)
lostdcc(idx);
}
static void cont_tandem_relay(int idx, char *buf, register int i)
static void cont_tandem_relay(int idx, char *buf, int i)
{
register int uidx = -1;
int uidx = -1;
struct relay_info *ri;
for (i = 0; i < dcc_total; i++)
@@ -1417,7 +1417,7 @@ static void cont_tandem_relay(int idx, char *buf, register int i)
static void eof_dcc_relay(int idx)
{
register int j;
int j;
struct chat_info *ci;
for (j = 0; j < dcc_total; j++)
@@ -1454,7 +1454,7 @@ static void eof_dcc_relay(int idx)
static void eof_dcc_relaying(int idx)
{
register int j, x = dcc[idx].u.relay->sock;
int j, x = dcc[idx].u.relay->sock;
putlog(LOG_MISC, "*", "%s [%s]%s/%d", BOT_LOSTDCCUSER, dcc[idx].nick,
dcc[idx].host, dcc[idx].port);
@@ -1569,7 +1569,7 @@ static void display_pre_relay(int i, char *other)
static int expmem_relay(void *x)
{
register struct relay_info *p = (struct relay_info *) x;
struct relay_info *p = (struct relay_info *) x;
int tot = sizeof(struct relay_info);
if (p->chat)
@@ -1579,7 +1579,7 @@ static int expmem_relay(void *x)
static void kill_relay(int idx, void *x)
{
register struct relay_info *p = (struct relay_info *) x;
struct relay_info *p = (struct relay_info *) x;
if (p->chat)
DCC_CHAT.kill(idx, p->chat);
@@ -1601,7 +1601,7 @@ struct dcc_table DCC_RELAY = {
static void out_relay(int idx, char *buf, void *x)
{
register struct relay_info *p = (struct relay_info *) x;
struct relay_info *p = (struct relay_info *) x;
if (p && p->chat)
DCC_CHAT.output(idx, buf, p->chat);
View
@@ -70,7 +70,7 @@ char owner[121] = ""; /* Permanent botowner(s) */
*/
void rmspace(char *s)
{
register char *p = NULL, *q = NULL;
char *p = NULL, *q = NULL;
if (!s || !*s)
return;
@@ -91,7 +91,7 @@ void rmspace(char *s)
*/
memberlist *ismember(struct chanset_t *chan, char *nick)
{
register memberlist *x;
memberlist *x;
for (x = chan->channel.member; x && x->nick[0]; x = x->next)
if (!rfc_casecmp(x->nick, nick))
@@ -103,7 +103,7 @@ memberlist *ismember(struct chanset_t *chan, char *nick)
*/
struct chanset_t *findchan(const char *name)
{
register struct chanset_t *chan;
struct chanset_t *chan;
for (chan = chanset; chan; chan = chan->next)
if (!rfc_casecmp(chan->name, name))
@@ -115,7 +115,7 @@ struct chanset_t *findchan(const char *name)
*/
struct chanset_t *findchan_by_dname(const char *name)
{
register struct chanset_t *chan;
struct chanset_t *chan;
for (chan = chanset; chan; chan = chan->next)
if (!rfc_casecmp(chan->dname, name))
@@ -134,8 +134,8 @@ struct chanset_t *findchan_by_dname(const char *name)
struct userrec *check_chanlist(const char *host)
{
char *nick, *uhost, buf[UHOSTLEN];
register memberlist *m;
register struct chanset_t *chan;
memberlist *m;
struct chanset_t *chan;
strncpyz(buf, host, sizeof buf);
uhost = buf;
@@ -151,8 +151,8 @@ struct userrec *check_chanlist(const char *host)
*/
struct userrec *check_chanlist_hand(const char *hand)
{
register struct chanset_t *chan;
register memberlist *m;
struct chanset_t *chan;
memberlist *m;
for (chan = chanset; chan; chan = chan->next)
for (m = chan->channel.member; m && m->nick[0]; m = m->next)
@@ -168,8 +168,8 @@ struct userrec *check_chanlist_hand(const char *hand)
*/
void clear_chanlist(void)
{
register memberlist *m;
register struct chanset_t *chan;
memberlist *m;
struct chanset_t *chan;
for (chan = chanset; chan; chan = chan->next)
for (m = chan->channel.member; m && m->nick[0]; m = m->next) {
@@ -185,8 +185,8 @@ void clear_chanlist(void)
*/
void clear_chanlist_member(const char *nick)
{
register memberlist *m;
register struct chanset_t *chan;
memberlist *m;
struct chanset_t *chan;
for (chan = chanset; chan; chan = chan->next)
for (m = chan->channel.member; m && m->nick[0]; m = m->next)
@@ -202,8 +202,8 @@ void clear_chanlist_member(const char *nick)
void set_chanlist(const char *host, struct userrec *rec)
{
char *nick, *uhost, buf[UHOSTLEN];
register memberlist *m;
register struct chanset_t *chan;
memberlist *m;
struct chanset_t *chan;
strncpyz(buf, host, sizeof buf);
uhost = buf;
@@ -218,8 +218,8 @@ void set_chanlist(const char *host, struct userrec *rec)
*/
int expmem_chanprog()
{
register int tot = 0;
register tcl_timer_t *t;
int tot = 0;
tcl_timer_t *t;
for (t = timer; t; t = t->next)
tot += sizeof(tcl_timer_t) + strlen(t->cmd) + 1;
@@ -674,7 +674,7 @@ void list_timers(Tcl_Interp *irp, tcl_timer_t *stack)
*/
int isowner(char *name)
{
register char *ptr = NULL, *s = NULL, *n = NULL;
char *ptr = NULL, *s = NULL, *n = NULL;
if (!name)
return 0;
View
@@ -104,12 +104,12 @@ const char *cp;
struct in_addr *addr;
{
static const u_32bit_t max[4] = { 0xffffffff, 0xffffff, 0xffff, 0xff };
register u_32bit_t val; /* changed from u_long --david */
register int base;
register int n;
register char c;
u_32bit_t val; /* changed from u_long --david */
int base;
int n;
char c;
u_32bit_t parts[4];
register u_32bit_t *pp = parts;
u_32bit_t *pp = parts;
egg_bzero(parts, sizeof(parts));
View
@@ -793,7 +793,7 @@ static void display_dcc_chat_pass(int idx, char *buf)
static int expmem_dcc_general(void *x)
{
register struct chat_info *p = (struct chat_info *) x;
struct chat_info *p = (struct chat_info *) x;
int tot = sizeof(struct chat_info);
if (p->away)
@@ -815,7 +815,7 @@ static int expmem_dcc_general(void *x)
static void kill_dcc_general(int idx, void *x)
{
register struct chat_info *p = (struct chat_info *) x;
struct chat_info *p = (struct chat_info *) x;
if (p) {
if (p->buffer) {
@@ -961,7 +961,7 @@ static void append_line(int idx, char *line)
static void out_dcc_general(int idx, char *buf, void *x)
{
register struct chat_info *p = (struct chat_info *) x;
struct chat_info *p = (struct chat_info *) x;
char *y = buf;
strip_mirc_codes(p->strip_flags, buf);
@@ -1490,7 +1490,7 @@ static void display_dupwait(int idx, char *buf)
static int expmem_dupwait(void *x)
{
register struct dupwait_info *p = (struct dupwait_info *) x;
struct dupwait_info *p = (struct dupwait_info *) x;
int tot = sizeof(struct dupwait_info);
if (p && p->chat && DCC_CHAT.expmem)
@@ -1500,7 +1500,7 @@ static int expmem_dupwait(void *x)
static void kill_dupwait(int idx, void *x)
{
register struct dupwait_info *p = (struct dupwait_info *) x;
struct dupwait_info *p = (struct dupwait_info *) x;
if (p) {
if (p->chat && DCC_CHAT.kill)
@@ -1528,7 +1528,7 @@ struct dcc_table DCC_DUPWAIT = {
*/
void dupwait_notify(char *who)
{
register int idx;
int idx;
Assert(who);
for (idx = 0; idx < dcc_total; idx++)
@@ -2134,7 +2134,7 @@ static void display_dcc_script(int idx, char *buf)
static int expmem_dcc_script(void *x)
{
register struct script_info *p = (struct script_info *) x;
struct script_info *p = (struct script_info *) x;
int tot = sizeof(struct script_info);
if (p->type && p->u.other)
@@ -2144,7 +2144,7 @@ static int expmem_dcc_script(void *x)
static void kill_dcc_script(int idx, void *x)
{
register struct script_info *p = (struct script_info *) x;
struct script_info *p = (struct script_info *) x;
if (p->type && p->u.other)
p->type->kill(idx, p->u.other);
@@ -2153,7 +2153,7 @@ static void kill_dcc_script(int idx, void *x)
static void out_dcc_script(int idx, char *buf, void *x)
{
register struct script_info *p = (struct script_info *) x;
struct script_info *p = (struct script_info *) x;
if (p && p->type && p->u.other)
p->type->output(idx, buf, p->u.other);
View
@@ -116,9 +116,9 @@ int findidx(int z)
return -1;
}
int findanyidx(register int z)
int findanyidx(int z)
{
register int j;
int j;
for (j = 0; j < dcc_total; j++)
if (dcc[j].sock == z)
View
@@ -67,7 +67,7 @@ static void display_dcc_dnswait(int idx, char *buf)
static int expmem_dcc_dnswait(void *x)
{
register struct dns_info *p = (struct dns_info *) x;
struct dns_info *p = (struct dns_info *) x;
int size = 0;
if (p) {
@@ -82,7 +82,7 @@ static int expmem_dcc_dnswait(void *x)
static void kill_dcc_dnswait(int idx, void *x)
{
register struct dns_info *p = (struct dns_info *) x;
struct dns_info *p = (struct dns_info *) x;
if (p) {
if (p->host)
Oops, something went wrong.

0 comments on commit fbd763a

Please sign in to comment.