From dc5b6ec60b02f399bdb33412224dba0b13bebd0c Mon Sep 17 00:00:00 2001 From: Thomas Leonard Date: Sun, 13 Jan 2002 17:47:37 +0000 Subject: [PATCH] r1088: Fixed some compile problems on Solaris (Andreas Dehmel). --- ROX-Filer/Help/Changes | 1 + ROX-Filer/src/sc.c | 15 ++++++++++----- ROX-Filer/src/type.c | 6 +----- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/ROX-Filer/Help/Changes b/ROX-Filer/Help/Changes index c931c585..3b4e70ed 100644 --- a/ROX-Filer/Help/Changes +++ b/ROX-Filer/Help/Changes @@ -4,6 +4,7 @@ 13-Jan-2001 ~~~~~~~~~~~ +Fixed some compile problems on Solaris (Andreas Dehmel). Clicking an unscanned item now scans it (instead of reporting an error). Dialog boxes in Gtk+-2.0 now set a default button. Number keys on the keypad couldn't be used for groups (reported by Arnaud diff --git a/ROX-Filer/src/sc.c b/ROX-Filer/src/sc.c index fbaa4649..4b651088 100644 --- a/ROX-Filer/src/sc.c +++ b/ROX-Filer/src/sc.c @@ -365,11 +365,16 @@ gboolean sc_connect(SmClient *client) gchar error_str[256]; gchar *client_id_ret = NULL; SmcConn conn = NULL; - SmcCallbacks callbacks = { { &sc_save_yourself, (SmPointer)client }, - { &sc_die, (SmPointer)client }, - { &sc_save_complete, (SmPointer)client }, - { &sc_shutdown_cancelled, (SmPointer)client } }; - + SmcCallbacks callbacks; + + callbacks.save_yourself.callback = &sc_save_yourself; + callbacks.save_yourself.client_data = (SmPointer)client; + callbacks.die.callback = &sc_die; + callbacks.die.client_data = (SmPointer)client; + callbacks.save_complete.callback = &sc_save_complete; + callbacks.save_complete.client_data = (SmPointer)client; + callbacks.shutdown_cancelled.callback = &sc_shutdown_cancelled; + callbacks.shutdown_cancelled.client_data = (SmPointer)client; if(IceAddConnectionWatch(&ice_watch_fn, client) == 0) { diff --git a/ROX-Filer/src/type.c b/ROX-Filer/src/type.c index b2ec772e..434abd16 100644 --- a/ROX-Filer/src/type.c +++ b/ROX-Filer/src/type.c @@ -282,11 +282,7 @@ static void add_regex(char *type_name, char *reg) slash = strchr(type_name, '/'); g_return_if_fail(slash != NULL); /* XXX: Report nicely */ - pattern = g_new(Pattern, 1); - pattern->buffer.buffer = NULL; - pattern->buffer.allocated = 0; - pattern->buffer.fastmap = NULL; - pattern->buffer.translate = NULL; + pattern = g_new0(Pattern, 1); if (regcomp(&pattern->buffer, reg, REG_EXTENDED | REG_NOSUB)) { -- 2.11.4.GIT