summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2000-05-09 11:42:42 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2000-05-09 11:42:42 +0000
commit93d603215114093b92837df0604c5fe285cc04a6 (patch)
treef128c498946922199a426d46574612b22c539f66 /src
parent90ff30fcd01cd15323a6d2d5fd9797660021b475 (diff)
downloadirssi-93d603215114093b92837df0604c5fe285cc04a6.zip
- Compiling fixes
- GNOME version isn't anymore build here so you don't need all that GTK and GNOME crap to compile irssi-text. - Some fixes to compile with -ansi -pedantic git-svn-id: http://svn.irssi.org/repos/irssi/trunk@200 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am7
-rw-r--r--src/core/commands.c6
-rw-r--r--src/core/misc.c2
-rw-r--r--src/core/settings.h2
-rw-r--r--src/core/special-vars.c4
-rw-r--r--src/fe-common/core/module-formats.h2
-rw-r--r--src/fe-common/core/printformat.h25
-rw-r--r--src/fe-common/core/printtext.h26
-rw-r--r--src/fe-common/core/windows.c11
-rw-r--r--src/fe-common/core/windows.h5
-rw-r--r--src/fe-common/irc/dcc/module-formats.h4
-rw-r--r--src/fe-common/irc/fe-ctcp.c6
-rw-r--r--src/fe-common/irc/flood/module-formats.h2
-rw-r--r--src/fe-common/irc/module-formats.h2
-rw-r--r--src/fe-common/irc/notifylist/module-formats.h2
-rw-r--r--src/fe-none/Makefile.am8
-rw-r--r--src/fe-text/Makefile.am7
-rw-r--r--src/fe-text/gui-statusbar.c237
-rw-r--r--src/fe-text/module-formats.h2
-rw-r--r--src/fe-text/screen.h14
-rw-r--r--src/fe-text/statusbar.c8
-rw-r--r--src/irc/core/irc.h2
-rw-r--r--src/lib-config/iconfig.h2
-rw-r--r--src/lib-config/set.c4
24 files changed, 84 insertions, 306 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 49aa359d..fbd0dc31 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -2,11 +2,6 @@ if BUILD_TEXTUI
TEXTUI=fe-text
endif
-if BUILD_GNOMEUI
-#GNOMEUI=fe-gnome
-GNOMEUI=
-endif
-
if BUILD_IRSSIBOT
BOTUI=fe-none
endif
@@ -20,4 +15,4 @@ noinst_HEADERS = \
common.h \
common-setup.h
-SUBDIRS = lib-popt lib-config core irc fe-common $(PERLDIR) $(GNOMEUI) $(TEXTUI) $(BOTUI)
+SUBDIRS = lib-popt lib-config core irc fe-common $(PERLDIR) $(TEXTUI) $(BOTUI)
diff --git a/src/core/commands.c b/src/core/commands.c
index e7f2560a..8f02db89 100644
--- a/src/core/commands.c
+++ b/src/core/commands.c
@@ -310,7 +310,7 @@ char *cmd_get_callfuncs(const char *data, int *count, va_list *args)
ret = g_strdup(data);
for (tmp = cmdget_funcs; tmp != NULL; tmp = tmp->next) {
- func = tmp->data;
+ func = (CMD_GET_FUNC) tmp->data;
old = ret;
ret = func(ret, count, args);
@@ -361,12 +361,12 @@ char *cmd_get_params(const char *data, int count, ...)
void cmd_get_add_func(CMD_GET_FUNC func)
{
- cmdget_funcs = g_slist_prepend(cmdget_funcs, func);
+ cmdget_funcs = g_slist_prepend(cmdget_funcs, (void *) func);
}
void cmd_get_remove_func(CMD_GET_FUNC func)
{
- cmdget_funcs = g_slist_prepend(cmdget_funcs, func);
+ cmdget_funcs = g_slist_prepend(cmdget_funcs, (void *) func);
}
static void parse_outgoing(const char *line, SERVER_REC *server, void *item)
diff --git a/src/core/misc.c b/src/core/misc.c
index 28aaae84..516c6dc3 100644
--- a/src/core/misc.c
+++ b/src/core/misc.c
@@ -377,7 +377,7 @@ int match_wildcards(const char *cmask, const char *data)
char *mask, *newmask, *p1, *p2;
int ret;
- newmask = mask = strdup(cmask);
+ newmask = mask = g_strdup(cmask);
for (; *mask != '\0' && *data != '\0'; mask++) {
if (*mask == '?' || toupper(*mask) == toupper(*data)) {
data++;
diff --git a/src/core/settings.h b/src/core/settings.h
index 9198bba9..81599db3 100644
--- a/src/core/settings.h
+++ b/src/core/settings.h
@@ -8,7 +8,7 @@ typedef struct _config_rec CONFIG_REC;
enum {
SETTING_TYPE_STRING,
SETTING_TYPE_INT,
- SETTING_TYPE_BOOLEAN,
+ SETTING_TYPE_BOOLEAN
};
typedef struct {
diff --git a/src/core/special-vars.c b/src/core/special-vars.c
index 26788a65..7d51bca1 100644
--- a/src/core/special-vars.c
+++ b/src/core/special-vars.c
@@ -108,7 +108,7 @@ static char *get_long_variable_value(const char *key, void *server, void *item,
*free_ret = FALSE;
/* expando? */
- func = g_hash_table_lookup(expandos, key);
+ func = (EXPANDO_FUNC) g_hash_table_lookup(expandos, key);
if (func != NULL)
return func(server, item, free_ret);
@@ -502,7 +502,7 @@ void expando_create(const char *key, EXPANDO_FUNC func)
g_free(origkey);
g_hash_table_remove(expandos, key);
}
- g_hash_table_insert(expandos, g_strdup(key), func);
+ g_hash_table_insert(expandos, g_strdup(key), (void *) func);
}
/* Destroy expando */
diff --git a/src/fe-common/core/module-formats.h b/src/fe-common/core/module-formats.h
index 8b9a6375..94392763 100644
--- a/src/fe-common/core/module-formats.h
+++ b/src/fe-common/core/module-formats.h
@@ -66,3 +66,5 @@ enum {
extern FORMAT_REC fecommon_core_formats[];
#define MODULE_FORMATS fecommon_core_formats
+
+#include "printformat.h"
diff --git a/src/fe-common/core/printformat.h b/src/fe-common/core/printformat.h
new file mode 100644
index 00000000..e1dcf761
--- /dev/null
+++ b/src/fe-common/core/printformat.h
@@ -0,0 +1,25 @@
+/* printformat(...) = printformat_format(module_formats, ...)
+
+ Could this be any harder? :) With GNU C compiler and C99 compilers,
+ use #define. With others use either inline functions if they are
+ supported or static functions if they are not..
+ */
+#if defined (__GNUC__) && !defined (__STRICT_ANSI__)
+/* GCC */
+# define printformat(server, channel, level, formatnum...) \
+ printformat_format(MODULE_FORMATS, server, channel, level, ##formatnum)
+#elif defined (_ISOC99_SOURCE)
+/* C99 */
+# define printformat(server, channel, level, formatnum, ...) \
+ printformat_format(MODULE_FORMATS, server, channel, level, formatnum, __VA_ARGS__)
+#else
+/* inline/static */
+static
+#ifdef G_CAN_INLINE
+inline
+#endif
+void printformat(void *server, const char *channel, int level, int formatnum, ...)
+{
+ printformat_format(MODULE_FORMATS, server, channel, level, formatnum);
+}
+#endif
diff --git a/src/fe-common/core/printtext.h b/src/fe-common/core/printtext.h
index 18f3246e..acd6a03e 100644
--- a/src/fe-common/core/printtext.h
+++ b/src/fe-common/core/printtext.h
@@ -24,32 +24,6 @@ typedef struct {
#define PRINTFLAG_MIRC_COLOR 0x20
#define PRINTFLAG_INDENT 0x40
-/* printformat(...) = printformat_format(module_formats, ...)
-
- Could this be any harder? :) With GNU C compiler and C99 compilers,
- use #define. With others use either inline functions if they are
- supported or static functions if they are not..
- */
-#ifdef __GNUC__
-/* GCC */
-# define printformat(server, channel, level, formatnum...) \
- printformat_format(MODULE_FORMATS, server, channel, level, ##formatnum)
-#elif defined (_ISOC99_SOURCE)
-/* C99 */
-# define printformat(server, channel, level, formatnum, ...) \
- printformat_format(MODULE_FORMATS, server, channel, level, formatnum, __VA_ARGS__)
-#else
-/* inline/static */
-#ifdef G_CAN_INLINE
-inline
-#else
-static
-#endif
-void printformat(void *server, const char *channel, int level, int formatnum, ...)
-{
- printformat_format(MODULE_FORMATS, server, channel, level, ##formatnum);
-}
-#endif
void printformat_format(FORMAT_REC *formats, void *server, const char *channel, int level, int formatnum, ...);
void printtext(void *server, const char *channel, int level, const char *str, ...);
diff --git a/src/fe-common/core/windows.c b/src/fe-common/core/windows.c
index 538b63ac..bcfaa38c 100644
--- a/src/fe-common/core/windows.c
+++ b/src/fe-common/core/windows.c
@@ -181,6 +181,17 @@ void window_set_level(WINDOW_REC *window, int level)
signal_emit("window level changed", 1, window);
}
+/* return active item's name, or if none is active, window's name */
+char *window_get_active_name(WINDOW_REC *window)
+{
+ g_return_val_if_fail(window != NULL, NULL);
+
+ if (window->active != NULL)
+ return window->active->name;
+
+ return window->name;
+}
+
WINDOW_REC *window_find_level(void *server, int level)
{
WINDOW_REC *match;
diff --git a/src/fe-common/core/windows.h b/src/fe-common/core/windows.h
index a3b06d86..2b13101b 100644
--- a/src/fe-common/core/windows.h
+++ b/src/fe-common/core/windows.h
@@ -58,8 +58,11 @@ void window_change_server(WINDOW_REC *window, void *server);
void window_set_refnum(WINDOW_REC *window, int refnum);
void window_set_name(WINDOW_REC *window, const char *name);
-
void window_set_level(WINDOW_REC *window, int level);
+
+/* return active item's name, or if none is active, window's name */
+char *window_get_active_name(WINDOW_REC *window);
+
WINDOW_REC *window_find_level(void *server, int level);
WINDOW_REC *window_find_closest(void *server, const char *name, int level);
WINDOW_REC *window_find_refnum(int refnum);
diff --git a/src/fe-common/irc/dcc/module-formats.h b/src/fe-common/irc/dcc/module-formats.h
index bc58035e..de01511f 100644
--- a/src/fe-common/irc/dcc/module-formats.h
+++ b/src/fe-common/irc/dcc/module-formats.h
@@ -32,8 +32,10 @@ enum {
IRCTXT_DCC_CONNECT_ERROR,
IRCTXT_DCC_CANT_CREATE,
IRCTXT_DCC_REJECTED,
- IRCTXT_DCC_CLOSE,
+ IRCTXT_DCC_CLOSE
};
extern FORMAT_REC fecommon_irc_dcc_formats[];
#define MODULE_FORMATS fecommon_irc_dcc_formats
+
+#include "printformat.h"
diff --git a/src/fe-common/irc/fe-ctcp.c b/src/fe-common/irc/fe-ctcp.c
index a8d9a1c5..d06e1185 100644
--- a/src/fe-common/irc/fe-ctcp.c
+++ b/src/fe-common/irc/fe-ctcp.c
@@ -47,17 +47,17 @@ static void ctcp_print(const char *pre, const char *data, IRC_SERVER_REC *server
static void ctcp_default_msg(const char *data, IRC_SERVER_REC *server, const char *nick, const char *addr, const char *target)
{
- return ctcp_print("unknown CTCP", data, server, nick, addr, target);
+ ctcp_print("unknown CTCP", data, server, nick, addr, target);
}
static void ctcp_ping_msg(const char *data, IRC_SERVER_REC *server, const char *nick, const char *addr, const char *target)
{
- return ctcp_print("CTCP PING", data, server, nick, addr, target);
+ ctcp_print("CTCP PING", data, server, nick, addr, target);
}
static void ctcp_version_msg(const char *data, IRC_SERVER_REC *server, const char *nick, const char *addr, const char *target)
{
- return ctcp_print("CTCP VERSION", data, server, nick, addr, target);
+ ctcp_print("CTCP VERSION", data, server, nick, addr, target);
}
static void ctcp_default_reply(const char *data, IRC_SERVER_REC *server, const char *nick, const char *addr, const char *target)
diff --git a/src/fe-common/irc/flood/module-formats.h b/src/fe-common/irc/flood/module-formats.h
index b435a752..8311b021 100644
--- a/src/fe-common/irc/flood/module-formats.h
+++ b/src/fe-common/irc/flood/module-formats.h
@@ -11,3 +11,5 @@ enum {
extern FORMAT_REC fecommon_irc_flood_formats[];
#define MODULE_FORMATS fecommon_irc_flood_formats
+
+#include "printformat.h"
diff --git a/src/fe-common/irc/module-formats.h b/src/fe-common/irc/module-formats.h
index c7dc5bf8..d75ca9c4 100644
--- a/src/fe-common/irc/module-formats.h
+++ b/src/fe-common/irc/module-formats.h
@@ -162,3 +162,5 @@ enum {
extern FORMAT_REC fecommon_irc_formats[];
#define MODULE_FORMATS fecommon_irc_formats
+
+#include "printformat.h"
diff --git a/src/fe-common/irc/notifylist/module-formats.h b/src/fe-common/irc/notifylist/module-formats.h
index 77b40cc2..f5f855dc 100644
--- a/src/fe-common/irc/notifylist/module-formats.h
+++ b/src/fe-common/irc/notifylist/module-formats.h
@@ -17,3 +17,5 @@ enum {
extern FORMAT_REC fecommon_irc_notifylist_formats[];
#define MODULE_FORMATS fecommon_irc_notifylist_formats
+
+#include "printformat.h"
diff --git a/src/fe-none/Makefile.am b/src/fe-none/Makefile.am
index b61f4dd2..5fbc6a40 100644
--- a/src/fe-none/Makefile.am
+++ b/src/fe-none/Makefile.am
@@ -8,13 +8,11 @@ INCLUDES = \
-I$(top_srcdir)/src/core/ \
-I$(top_srcdir)/src/irc/core/
-irssi_bot_DEPENDENCIES = @IRC_LIBS@ @CORE_LIBS@
+irssi_bot_DEPENDENCIES = @COMMON_NOUI_LIBS@
irssi_bot_LDADD = \
- @IRC_LIBS@ \
- @CORE_LIBS@ \
- $(PROG_LIBS) \
- $(INTLLIBS) \
+ @COMMON_NOUI_LIBS@ \
+ $(PROG_LIBS) \
$(PERL_LDFLAGS)
irssi_bot_SOURCES = \
diff --git a/src/fe-text/Makefile.am b/src/fe-text/Makefile.am
index 0120a4d9..fc8d7302 100644
--- a/src/fe-text/Makefile.am
+++ b/src/fe-text/Makefile.am
@@ -13,10 +13,9 @@ irssi_text_DEPENDENCIES = @COMMON_LIBS@
irssi_text_LDADD = \
@COMMON_LIBS@ \
- $(PROG_LIBS) \
- $(CURSES_LIBS) \
- $(INTLLIBS) \
- $(PERL_LDFLAGS)
+ $(PROG_LIBS) \
+ $(PERL_LDFLAGS) \
+ $(CURSES_LIBS)
irssi_text_SOURCES = \
gui-entry.c \
diff --git a/src/fe-text/gui-statusbar.c b/src/fe-text/gui-statusbar.c
deleted file mode 100644
index 130993c2..00000000
--- a/src/fe-text/gui-statusbar.c
+++ /dev/null
@@ -1,237 +0,0 @@
-/*
- gui-statusbar.c : irssi
-
- Copyright (C) 1999 Timo Sirainen
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
-
-#include "module.h"
-#include "signals.h"
-#include "server.h"
-
-#include "windows.h"
-
-#include "screen.h"
-#include "gui-statusbar.h"
-#include "gui-mainwindows.h"
-#include "gui-windows.h"
-
-typedef struct
-{
- gint tag;
-
- gint xpos, ypos;
- gint size;
- gboolean right_justify, up;
- STATUSBAR_FUNC func;
-}
-STATUSBAR_REC;
-
-static GList *sbars;
-static gint sbars_tag;
-
-static void gui_statusbar_redraw_line(gboolean up, gint ypos)
-{
- GList *tmp;
- gint xpos, rxpos;
-
- xpos = 1;
- for (tmp = sbars; tmp != NULL; tmp = tmp->next)
- {
- STATUSBAR_REC *rec = tmp->data;
-
- if (!rec->right_justify)
- {
- if (rec->up == up && rec->ypos == ypos && xpos+rec->size < COLS)
- {
- rec->xpos = xpos;
- rec->func(xpos, rec->ypos + (rec->up ? 0 : last_text_line), rec->size);
- if (rec->size > 0) xpos += rec->size+1;
- }
- }
- }
-
- rxpos = COLS-1;
- for (tmp = sbars; tmp != NULL; tmp = tmp->next)
- {
- STATUSBAR_REC *rec = tmp->data;
-
- if (rec->right_justify)
- {
- if (rec->up == up && rec->ypos == ypos && rxpos-rec->size > xpos)
- {
- rec->xpos = rxpos-rec->size;
- rec->func(rec->xpos, rec->ypos + (rec->up ? 0 : last_text_line), rec->size);
- if (rec->size > 0) rxpos -= rec->size+1;
- }
- }
- }
-}
-
-static void gui_statusbar_redraw_all(void)
-{
- gint n;
-
- screen_refresh_freeze();
- set_bg((1<<4)+15);
- for (n = 0; n < first_text_line; n++)
- {
- move(n, 0); clrtoeol();
- }
- for (n = last_text_line; n < LINES-1; n++)
- {
- move(n, 0); clrtoeol();
- }
- set_bg(0);
-
- for (n = 0; n < LINES-1; n++)
- {
- gui_statusbar_redraw_line(FALSE, n);
- gui_statusbar_redraw_line(TRUE, n);
- }
- screen_refresh_thaw();
-}
-
-void gui_statusbar_redraw(gint tag)
-{
- GList *tmp;
-
- if (tag == -1)
- {
- gui_statusbar_redraw_all();
- return;
- }
-
- for (tmp = sbars; tmp != NULL; tmp = tmp->next)
- {
- STATUSBAR_REC *rec = tmp->data;
-
- if (rec->tag == tag)
- {
- rec->func(rec->xpos, rec->ypos + (rec->up ? 0 : last_text_line), rec->size);
- break;
- }
- }
-}
-
-/* create new statusbar, return position */
-gint gui_statusbar_create(gboolean up)
-{
- gint pos;
-
- pos = up ? first_text_line++ :
- (LINES-2)-last_text_line--;
-
- set_bg((1<<4)+15);
- move(up ? pos : last_text_line+pos, 0); clrtoeol();
- set_bg(0);
-
- gui_windows_resize(-1, FALSE);
- return pos;
-}
-
-void gui_statusbar_delete(gboolean up, gint ypos)
-{
- GList *tmp, *next;
-
- if (up && first_text_line > 0)
- first_text_line--;
- else if (!up && last_text_line < LINES-1)
- last_text_line++;
-
- for (tmp = sbars; tmp != NULL; tmp = next)
- {
- STATUSBAR_REC *rec = tmp->data;
-
- next = tmp->next;
- if (rec->up == up && rec->ypos == ypos)
- gui_statusbar_remove(rec->tag);
- else if (rec->up == up && rec->ypos > ypos)
- rec->ypos--;
- }
-
- gui_windows_resize(1, FALSE);
-}
-
-/* allocate area in statusbar, returns tag or -1 if failed */
-gint gui_statusbar_allocate(gint size, gboolean right_justify, gboolean up, gint ypos, STATUSBAR_FUNC func)
-{
- STATUSBAR_REC *rec;
-
- g_return_val_if_fail(func != NULL, -1);
-
- rec = g_new0(STATUSBAR_REC, 1);
- sbars = g_list_append(sbars, rec);
-
- rec->tag = ++sbars_tag;
- rec->xpos = -1;
- rec->up = up;
- rec->ypos = ypos;
- rec->size = size;
- rec->right_justify = right_justify;
- rec->func = func;
-
- gui_statusbar_redraw_all();
- return rec->tag;
-}
-
-void gui_statusbar_resize(gint tag, gint size)
-{
- GList *tmp;
-
- for (tmp = sbars; tmp != NULL; tmp = tmp->next)
- {
- STATUSBAR_REC *rec = tmp->data;
-
- if (rec->tag == tag)
- {
- rec->size = size;
- gui_statusbar_redraw_all();
- break;
- }
- }
-}
-
-void gui_statusbar_remove(gint tag)
-{
- GList *tmp;
-
- for (tmp = sbars; tmp != NULL; tmp = tmp->next)
- {
- STATUSBAR_REC *rec = tmp->data;
-
- if (rec->tag == tag)
- {
- g_free(rec);
- sbars = g_list_remove(sbars, rec);
- if (!quitting) gui_statusbar_redraw_all();
- break;
- }
- }
-}
-
-void gui_statusbar_init(void)
-{
- sbars = NULL;
- sbars_tag = 0;
-
- gui_statusbar_create(FALSE);
-}
-
-void gui_statusbar_deinit(void)
-{
- gui_statusbar_delete(FALSE, 0);
-}
diff --git a/src/fe-text/module-formats.h b/src/fe-text/module-formats.h
index 32f219e2..39d29182 100644
--- a/src/fe-text/module-formats.h
+++ b/src/fe-text/module-formats.h
@@ -12,3 +12,5 @@ enum {
extern FORMAT_REC gui_text_formats[];
#define MODULE_FORMATS gui_text_formats
+
+#include "printformat.h"
diff --git a/src/fe-text/screen.h b/src/fe-text/screen.h
index 3fc5694e..cdb543c1 100644
--- a/src/fe-text/screen.h
+++ b/src/fe-text/screen.h
@@ -11,18 +11,16 @@
#define ATTR_COLOR8 0x200
#define ATTR_REVERSE 0x400
-extern gboolean use_colors;
-
-gint init_screen(void); /* Initialize screen, detect screen length */
+int init_screen(void); /* Initialize screen, detect screen length */
void deinit_screen(void); /* Deinitialize screen */
-void set_color(gint col);
-void set_bg(gint col);
+void set_color(int col);
+void set_bg(int col);
-void scroll_up(gint y1, gint y2); /* Scroll area up */
-void scroll_down(gint y1, gint y2); /* Scroll area down */
+void scroll_up(int y1, int y2); /* Scroll area up */
+void scroll_down(int y1, int y2); /* Scroll area down */
-void move_cursor(gint y, gint x);
+void move_cursor(int y, int x);
void screen_refresh_freeze(void);
void screen_refresh_thaw(void);
diff --git a/src/fe-text/statusbar.c b/src/fe-text/statusbar.c
index 24e89107..9e83438c 100644
--- a/src/fe-text/statusbar.c
+++ b/src/fe-text/statusbar.c
@@ -58,7 +58,7 @@ static void statusbar_redraw_line(STATUSBAR_REC *bar)
if (!rec->right_justify && xpos+rec->size < COLS) {
rec->xpos = xpos;
- func = rec->func;
+ func = (STATUSBAR_FUNC) rec->func;
func(rec, bar->ypos);
if (resized) break;
@@ -73,7 +73,7 @@ static void statusbar_redraw_line(STATUSBAR_REC *bar)
if (rec->right_justify && rxpos-rec->size > xpos) {
rec->xpos = rxpos-rec->size;
- func = rec->func;
+ func = (STATUSBAR_FUNC) rec->func;
func(rec, bar->ypos);
if (resized) break;
@@ -131,7 +131,7 @@ void statusbar_item_redraw(SBAR_ITEM_REC *item)
g_return_if_fail(item != NULL);
- func = item->func;
+ func = (STATUSBAR_FUNC) item->func;
func(item, item->bar->ypos);
}
@@ -215,7 +215,7 @@ SBAR_ITEM_REC *statusbar_item_create(STATUSBAR_REC *bar, int size, int right_jus
rec->xpos = -1;
rec->size = size;
rec->right_justify = right_justify;
- rec->func = func;
+ rec->func = (void *) func;
return rec;
}
diff --git a/src/irc/core/irc.h b/src/irc/core/irc.h
index aa5fbc9d..a971670c 100644
--- a/src/irc/core/irc.h
+++ b/src/irc/core/irc.h
@@ -61,7 +61,7 @@ extern char *current_server_event; /* current server event being processed */
/* Send command to IRC server */
void irc_send_cmd(IRC_SERVER_REC *server, const char *cmd);
-void irc_send_cmdv(IRC_SERVER_REC *server, const char *cmd, ...) G_GNUC_PRINTF (2, 3);;
+void irc_send_cmdv(IRC_SERVER_REC *server, const char *cmd, ...) G_GNUC_PRINTF (2, 3);
/* Send command to IRC server, split to multiple commands if necessary so
that command will never have more target nicks than `max_nicks'. Nicks
are separated with commas. (works with /msg, /kick, ...) */
diff --git a/src/lib-config/iconfig.h b/src/lib-config/iconfig.h
index 320b0629..a45ffdec 100644
--- a/src/lib-config/iconfig.h
+++ b/src/lib-config/iconfig.h
@@ -6,7 +6,7 @@ enum {
NODE_TYPE_VALUE,
NODE_TYPE_BLOCK,
NODE_TYPE_LIST,
- NODE_TYPE_COMMENT,
+ NODE_TYPE_COMMENT
};
#define has_node_value(a) \
diff --git a/src/lib-config/set.c b/src/lib-config/set.c
index 6748fce9..ce078f38 100644
--- a/src/lib-config/set.c
+++ b/src/lib-config/set.c
@@ -102,12 +102,12 @@ void config_node_set_int(CONFIG_NODE *parent, const char *key, int value)
char str[MAX_INT_STRLEN];
g_snprintf(str, sizeof(str), "%d", value);
- return config_node_set_str(parent, key, str);
+ config_node_set_str(parent, key, str);
}
void config_node_set_bool(CONFIG_NODE *parent, const char *key, int value)
{
- return config_node_set_str(parent, key, value ? "yes" : "no");
+ config_node_set_str(parent, key, value ? "yes" : "no");
}
int config_set_str(CONFIG_REC *rec, const char *section, const char *key, const char *value)