diff options
author | DuClare <akarinotengoku@gmail.com> | 2009-05-29 23:16:21 +0300 |
---|---|---|
committer | DuClare <akarinotengoku@gmail.com> | 2009-05-29 23:16:21 +0300 |
commit | 816fa0aaf162542eaedfcad4ec91a966bc349523 (patch) | |
tree | a68ca3cf6a90f9ac43c1f87566bb49cec4480800 /uzbl.c | |
parent | d1c6ba765827f985507283080bf67a2b012f2e17 (diff) |
Make parse_cmd_line parse as actions
Diffstat (limited to 'uzbl.c')
-rw-r--r-- | uzbl.c | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -1602,9 +1602,16 @@ parse_cmd_line(const char *ctl_line) { || (ctl_line[0] == ' ') || (ctl_line[0] == '\n')) ; /* ignore these lines */ - else - printf("Command not understood (%s)\n", ctl_line); - + else { + gchar *ctlstrip; + if (ctl_line[strlen(ctl_line) - 1] == '\n') + ctlstrip = g_strndup(ctl_line, strlen(ctl_line) - 1); + else ctlstrip = g_strdup(ctl_line); + tokens = g_strsplit(ctlstrip, " ", 2); + + parse_command(tokens[0], tokens[1]); + g_free(ctlstrip); + } if(tokens) g_strfreev(tokens); } |