diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/espik.c | 4 | ||||
-rw-r--r-- | src/espik.h | 18 | ||||
-rw-r--r-- | src/espik_common_handler.c | 4 | ||||
-rw-r--r-- | src/espik_common_handler.h | 5 | ||||
-rw-r--r-- | src/espik_config.h | 12 | ||||
-rw-r--r-- | src/espik_error.c | 4 | ||||
-rw-r--r-- | src/espik_global.h | 4 | ||||
-rw-r--r-- | src/espik_irc.c | 12 | ||||
-rw-r--r-- | src/espik_irc.h | 27 | ||||
-rw-r--r-- | src/espik_net.c | 2 | ||||
-rw-r--r-- | src/espik_net.h | 6 |
11 files changed, 50 insertions, 48 deletions
diff --git a/src/espik.c b/src/espik.c index c19472f..cc7b215 100644 --- a/src/espik.c +++ b/src/espik.c @@ -111,10 +111,12 @@ int main (int argc, char **argv) // ecore_main_loop_quit (); +#if _ESPIK_DEBUG_ printf (" end\n"); +#endif ecore_config_shutdown (); - // ecore_con_shutdown (); + // ecore_con_shutdown (); ecore_shutdown (); return (0); diff --git a/src/espik.h b/src/espik.h index e8fad1c..21a6029 100644 --- a/src/espik.h +++ b/src/espik.h @@ -3,24 +3,24 @@ typedef struct { - char *host; - unsigned short port; + char* host; + unsigned short port; } t_servinfo; typedef struct { - char *nickname; - char *username; - char *realname; /* gecos */ + char* nickname; + char* username; + char* realname; /* gecos */ } t_userinfo; typedef struct { - t_servinfo *server; - t_userinfo *client; + t_servinfo* server; + t_userinfo* client; } t_info; -int del_backslash (char *); -int main (int, char **); +int del_backslash (char*); +int main (int, char**); #endif /* _HAVE_ESPIK_H */ diff --git a/src/espik_common_handler.c b/src/espik_common_handler.c index 86d80f7..61f6ffe 100644 --- a/src/espik_common_handler.c +++ b/src/espik_common_handler.c @@ -22,7 +22,7 @@ int server_data (void* data __UNUSED__, int ev_type __UNUSED__, msg = strdup((char*)ev->data); #if _ESPIK_DEBUG_ - printf ("%s\n", msg); + printf ("%s\n", msg); #endif for (i=0 ; i < strlen(msg) ; i++) @@ -36,7 +36,7 @@ int server_data (void* data __UNUSED__, int ev_type __UNUSED__, espik_raw_send ("PONG guybrush.melee"); } - return (0); + return (0); } int kb_get (void* data __UNUSED__, Ecore_Fd_Handler* fd_handler) diff --git a/src/espik_common_handler.h b/src/espik_common_handler.h index 603ace5..905d98d 100644 --- a/src/espik_common_handler.h +++ b/src/espik_common_handler.h @@ -5,8 +5,7 @@ #include <Ecore_Con.h> #include <Ecore.h> -int server_data (void *__UNUSED__, int __UNUSED__, - Ecore_Con_Event_Server_Data * __UNUSED__); -int kb_get (void *__UNUSED__, Ecore_Fd_Handler *); +int server_data (void *__UNUSED__, int __UNUSED__, Ecore_Con_Event_Server_Data * __UNUSED__); +int kb_get (void *__UNUSED__, Ecore_Fd_Handler *); #endif /* _HAVE_ESPIK_COMMON_HANDLER_H */ diff --git a/src/espik_config.h b/src/espik_config.h index d6eeffa..e6f67c5 100644 --- a/src/espik_config.h +++ b/src/espik_config.h @@ -4,12 +4,12 @@ #include "espik.h" #include "espik_global.h" -t_servinfo *espik_server_config_set (char *, unsigned short); -t_userinfo *espik_user_sysinfo_get (); -void espik_config_default_set (); -void espik_config_init (); -void espik_config_get (t_info * s_info); -void espik_config_set (t_info config); +t_servinfo *espik_server_config_set (char *, unsigned short); +t_userinfo *espik_user_sysinfo_get (); +void espik_config_default_set (); +void espik_config_init (); +void espik_config_get (t_info * s_info); +void espik_config_set (t_info config); #define ESPIK_CONFIG_VERSION 1 diff --git a/src/espik_error.c b/src/espik_error.c index c673946..72ebd66 100644 --- a/src/espik_error.c +++ b/src/espik_error.c @@ -1,4 +1,4 @@ #include "espik_error.h" -#include <stdio.h> /* fprintf */ -#include <stdlib.h> /* exit */ +#include <stdio.h> /* fprintf */ +#include <stdlib.h> /* exit */ diff --git a/src/espik_global.h b/src/espik_global.h index 3bad3be..0dc4f4d 100644 --- a/src/espik_global.h +++ b/src/espik_global.h @@ -6,8 +6,8 @@ #define MAX_LEN 512 -#define _ESPIK_DEBUG_ 1 +#define _ESPIK_DEBUG_ 1 -#define __UNUSED__ __attribute__((unused)) +#define __UNUSED__ __attribute__((unused)) #endif /* _HAVE_ESPIK_GLOBAL_H */ diff --git a/src/espik_irc.c b/src/espik_irc.c index 4da2139..e5c0bd4 100644 --- a/src/espik_irc.c +++ b/src/espik_irc.c @@ -16,8 +16,8 @@ char* current_chan; typedef struct { - char* cmd_name; - char* (*format) (char *dest, char *msg); + char* cmd_name; + char* (*format) (char *dest, char *msg); } cmd_t; typedef struct @@ -193,14 +193,14 @@ char* irc_nick (char* chan __UNUSED__, char* nick) #if 0 Ecore_Con_Server* irc_connect (char* host __UNUSED__, int port __UNUSED__) { - return (NULL); + return (NULL); } void irc_disconnect (Ecore_Con_Server *sock) { - printf ("> irc_disconnect\n"); - ecore_main_loop_quit (); - printf ("< irc_disconnect\n"); + printf ("> irc_disconnect\n"); + ecore_main_loop_quit (); + printf ("< irc_disconnect\n"); } #endif diff --git a/src/espik_irc.h b/src/espik_irc.h index a02387e..aec1a64 100644 --- a/src/espik_irc.h +++ b/src/espik_irc.h @@ -1,20 +1,21 @@ #ifndef _HAVE_ESPIK_IRC_H #define _HAVE_ESPIK_IRC_H -unsigned short sendmsg_len (char *); -char *irc_send (char *); -char *irc_privmsg (char *, char *); +unsigned short sendmsg_len (char*); +char* irc_send (char*); +char* irc_privmsg (char*, char *); -//char *irc_action (char *, char *); -char *irc_join (char *, char *); -char *irc_part (char *, char *); -char *irc_quit (char *, char *); -char *irc_raw (char *, char *); -char* irc_nick(char*, char*); -char **separate_commandline (char *); -void string_upper (char *); +//char* irc_action (char *, char *); +char* irc_join (char*, char*); +char* irc_part (char*, char*); +char* irc_quit (char*, char*); +char* irc_raw (char*, char*); +char* irc_nick(char*, char*); -//Ecore_Con_Server *irc_connect (char *, int); -//void irc_disconnect (Ecore_Con_Server *); +char** separate_commandline (char*); +void string_upper (char*); + +//Ecore_Con_Server* irc_connect (char*, int); +//void irc_disconnect (Ecore_Con_Server*); #endif /* _HAVE_ESPIK_IRC_H */ diff --git a/src/espik_net.c b/src/espik_net.c index 510ead1..8057ae0 100644 --- a/src/espik_net.c +++ b/src/espik_net.c @@ -54,7 +54,7 @@ void espik_raw_send (char *msg) len = strlen (msg) + 3; - out = malloc (sizeof (char) * len); + out = malloc (sizeof (char) * len); snprintf (out, len, "%s\r\n", msg); diff --git a/src/espik_net.h b/src/espik_net.h index 3bc88b2..9e9cbff 100644 --- a/src/espik_net.h +++ b/src/espik_net.h @@ -3,8 +3,8 @@ #include "espik.h" -void espik_raw_send (char *); -void espik_con_init (t_info); -void espik_con_shutdown (); +void espik_raw_send (char*); +void espik_con_init (t_info); +void espik_con_shutdown (); #endif /* _HAVE_ESPIK_NET_H */ |