Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix various compile errors in prev. commit

  • Loading branch information...
commit 8844d52345e19e4b124f3fdb108df7d607d2cbff 1 parent 34c4be4
Sound and Fury authored
Showing with 12 additions and 10 deletions.
  1. +1 −1  buffer.c
  2. +4 −4 input.c
  3. +5 −4 irc.c
  4. +1 −0  irc.h
  5. +1 −1  quirc.c
View
2  buffer.c
@@ -51,7 +51,7 @@ int free_buffer(int buf)
{
if(bufs[buf].live)
{
- w_buf_print(b, c_err, "Buffer is still live!", "free_buffer:");
+ w_buf_print(buf, c_err, "Buffer is still live!", "free_buffer:");
return(1);
}
else
View
8 input.c
@@ -423,7 +423,7 @@ int cmd_handle(char *inp, char **qmsg, fd_set *master, int *fdmax) // old state=
printf("%s" CLR "\n", dstr);
resetcol();
printf(CLA "\n");
- int serverhandle=irc_connect(server, portno, nick, username, fname, master, fdmax);
+ int serverhandle=irc_connect(server, portno, master, fdmax);
if(serverhandle)
{
bufs=(buffer *)realloc(bufs, ++nbufs*sizeof(buffer));
@@ -589,7 +589,7 @@ int cmd_handle(char *inp, char **qmsg, fd_set *master, int *fdmax) // old state=
{
if(bufs[cbuf].handle)
{
- if(LIVE(cbuf)
+ if(LIVE(cbuf))
{
char tmsg[8+strlen(bufs[cbuf].bname)];
sprintf(tmsg, "TOPIC %s", bufs[cbuf].bname);
@@ -626,7 +626,7 @@ int cmd_handle(char *inp, char **qmsg, fd_set *master, int *fdmax) // old state=
{
if(bufs[cbuf].handle)
{
- if(LIVE(cbuf)
+ if(LIVE(cbuf))
{
char privmsg[12+strlen(dest)+strlen(text)];
sprintf(privmsg, "PRIVMSG %s :%s", dest, text);
@@ -669,7 +669,7 @@ int cmd_handle(char *inp, char **qmsg, fd_set *master, int *fdmax) // old state=
{
if(bufs[cbuf].handle)
{
- if(LIVE(cbuf)
+ if(LIVE(cbuf))
{
char privmsg[32+strlen(bufs[cbuf].bname)+strlen(args)];
sprintf(privmsg, "PRIVMSG %s :\001ACTION %s\001", bufs[cbuf].bname, args);
View
9 irc.c
@@ -19,7 +19,8 @@ int irc_connect(char *server, char *portno, fd_set *master, int *fdmax)
int rv;
if((rv = getaddrinfo(server, portno, &hints, &servinfo)) != 0)
{
- w_buf_print(0, c_err, gai_strerror(rv), "getaddrinfo: ");
+ char *err=(char *)gai_strerror(rv);
+ w_buf_print(0, c_err, err, "getaddrinfo: ");
return(0); // 0 indicates failure as rv is new serverhandle value
}
char sip[INET_ADDRSTRLEN];
@@ -59,12 +60,12 @@ int irc_connect(char *server, char *portno, fd_set *master, int *fdmax)
FD_SET(serverhandle, master);
*fdmax=max(*fdmax, serverhandle);
- return(serverhandle)
+ return(serverhandle);
}
int irc_conn_rest(int b, char *nick, char *username, char *fullname)
{
- bufs[b].live==true; // mark it as live
+ bufs[b].live=true; // mark it as live
char nickmsg[6+strlen(nick)];
sprintf(nickmsg, "NICK %s", nick);
irc_tx(bufs[b].handle, nickmsg);
@@ -88,7 +89,7 @@ int autoconnect(fd_set *master, int *fdmax)
printf("%s" CLR "\n", cstr);
resetcol();
printf(CLA "\n");
- int serverhandle=irc_connect(server, portno, nick, username, fname, master, fdmax);
+ int serverhandle=irc_connect(server, portno, master, fdmax);
if(serverhandle)
{
bufs=(buffer *)realloc(bufs, ++nbufs*sizeof(buffer));
View
1  irc.h
@@ -13,6 +13,7 @@
#include <stdbool.h>
#include <string.h>
#include <unistd.h>
+#include <fcntl.h>
#include <sys/socket.h>
#include <sys/utsname.h>
#include <netdb.h>
View
2  quirc.c
@@ -201,7 +201,7 @@ int main(int argc, char *argv[])
}
else
{
- irc_conn_rest(b, nick, username, fullname);
+ irc_conn_rest(b, nick, username, fname);
}
in_update(inp);
b=nbufs+1;
Please sign in to comment.
Something went wrong with that request. Please try again.