diff options
-rw-r--r-- | cmd-source-file.c | 8 | ||||
-rw-r--r-- | key-string.c | 6 |
2 files changed, 9 insertions, 5 deletions
diff --git a/cmd-source-file.c b/cmd-source-file.c index b7e0fd25..ab9a2399 100644 --- a/cmd-source-file.c +++ b/cmd-source-file.c @@ -1,4 +1,4 @@ -/* $Id: cmd-source-file.c,v 1.1 2008-12-15 21:21:56 nicm Exp $ */ +/* $Id: cmd-source-file.c,v 1.2 2008-12-16 08:25:48 nicm Exp $ */ /* * Copyright (c) 2008 Tiago Cunha <me@tiagocunha.org> @@ -39,7 +39,7 @@ struct cmd_source_file_data { const struct cmd_entry cmd_source_file_entry = { "source-file", "source", "path", - CMD_ONEARG, + 0, cmd_source_file_init, cmd_source_file_parse, cmd_source_file_exec, @@ -62,7 +62,7 @@ int cmd_source_file_parse(struct cmd *self, int argc, char **argv, char **cause) { struct cmd_source_file_data *data; - int opt; + int opt; self->entry->init(self, 0); data = self->data; @@ -91,8 +91,8 @@ usage: void cmd_source_file_exec(struct cmd *self, struct cmd_ctx *ctx) { - char *cause; struct cmd_source_file_data *data = self->data; + char *cause; if (load_cfg(data->path, &cause) != 0) { ctx->error(ctx, "%s", cause); diff --git a/key-string.c b/key-string.c index 974c154e..5e45d301 100644 --- a/key-string.c +++ b/key-string.c @@ -1,4 +1,4 @@ -/* $Id: key-string.c,v 1.7 2008-07-23 23:44:50 nicm Exp $ */ +/* $Id: key-string.c,v 1.8 2008-12-16 08:25:48 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -209,6 +209,8 @@ key_string_lookup_string(const char *string) if (string[0] == 'C' && string[1] == '-') { if (string[2] == '\0' || string[3] != '\0') return (KEYC_NONE); + if (string[1] == 32) + return (0); if (string[2] >= 64 && string[2] <= 95) return (string[2] - 64); if (string[2] >= 97 && string[2] <= 122) @@ -219,6 +221,8 @@ key_string_lookup_string(const char *string) if (string[0] == '^') { if (string[1] == '\0' || string[2] != '\0') return (KEYC_NONE); + if (string[1] == 32) + return (0); if (string[1] >= 64 && string[1] <= 95) return (string[1] - 64); if (string[1] >= 97 && string[1] <= 122) |