Fix C-space and M-space.

pull/1/head
Nicholas Marriott 2008-12-16 08:25:48 +00:00
parent 5445918b3e
commit c9912c20b3
2 changed files with 9 additions and 5 deletions

View File

@ -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);

View File

@ -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)