From e1bff5432860622327dc8d81b8f9ef374588c5cb Mon Sep 17 00:00:00 2001 From: Brendan Taylor Date: Tue, 30 Nov 2010 20:20:02 -0700 Subject: remove parseenv(). it's not documented, it doesn't do anything that @(echo $X)@ can't, and it's not very efficient (it iterates through the entire environment every time an event is sent) --- src/events.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'src/events.c') diff --git a/src/events.c b/src/events.c index 20e3675..3b42b3f 100644 --- a/src/events.c +++ b/src/events.c @@ -136,24 +136,16 @@ send_event_stdout(GString *msg) { void send_event(int type, const gchar *details, const gchar *custom_event) { GString *event_message = g_string_new(""); - gchar *buf, *p_val = NULL; - - /* expand shell vars */ - if(details) { - buf = g_strdup(details); - p_val = parseenv(buf ? g_strchug(buf) : " "); - g_free(buf); - } /* check for custom events */ if(custom_event) { g_string_printf(event_message, "EVENT [%s] %s %s\n", - uzbl.state.instance_name, custom_event, p_val); + uzbl.state.instance_name, custom_event, details); } /* check wether we support the internal event */ else if(type < LAST_EVENT) { g_string_printf(event_message, "EVENT [%s] %s %s\n", - uzbl.state.instance_name, event_table[type], p_val); + uzbl.state.instance_name, event_table[type], details); } if(event_message->str) { @@ -163,7 +155,6 @@ send_event(int type, const gchar *details, const gchar *custom_event) { g_string_free(event_message, TRUE); } - g_free(p_val); } /* Transform gdk key events to our own events */ -- cgit v1.2.3