aboutsummaryrefslogtreecommitdiffhomepage
path: root/uzbl.c
diff options
context:
space:
mode:
Diffstat (limited to 'uzbl.c')
-rw-r--r--uzbl.c30
1 files changed, 13 insertions, 17 deletions
diff --git a/uzbl.c b/uzbl.c
index 4c80f6c..538698b 100644
--- a/uzbl.c
+++ b/uzbl.c
@@ -259,27 +259,23 @@ parse_command(const char *cmd) {
gchar * command_param = strtok (NULL, " ,");
if((c = g_hash_table_lookup(commands, command_name)) != NULL){
- if (c != NULL) {
- if (c->func_2_params != NULL) {
- if (command_param != NULL) {
+ if (c->func_2_params != NULL) {
+ if (command_param != NULL) {
printf ("command executing: \"%s %s\"\n", command_name, command_param);
c->func_2_params (web_view, command_param);
- } else {
- if (c->func_1_param != NULL) {
- printf ("command executing: \"%s\"\n", command_name);
- c->func_1_param (web_view);
- } else {
- fprintf (stderr, "command needs a parameter. \"%s\" is not complete\n", command_name);
- }
- }
- } else if (c->func_1_param != NULL) {
- printf ("command executing: \"%s\"\n", command_name);
- c->func_1_param (web_view);
+ } else {
+ if (c->func_1_param != NULL) {
+ printf ("command executing: \"%s\"\n", command_name);
+ c->func_1_param (web_view);
+ } else
+ fprintf (stderr, "command needs a parameter. \"%s\" is not complete\n", command_name);
}
- } else {
- fprintf (stderr, "command \"%s\" not understood. ignoring.\n", cmd);
+ } else if (c->func_1_param != NULL) {
+ printf ("command executing: \"%s\"\n", command_name);
+ c->func_1_param (web_view);
}
- }
+ } else
+ fprintf (stderr, "command \"%s\" not understood. ignoring.\n", cmd);
}
static void