From f86fa86089a6071f25fcbc48061d9689e95674de Mon Sep 17 00:00:00 2001 From: Chris Allegretta Date: Wed, 25 Feb 2009 04:32:15 +0000 Subject: [PATCH] 2009-02-23 Chris Allegretta * rcfile.c (parse_keybinding) - Define a var before tryung to use it. Whoops! * fix some redefinitions causing compiler warnings, from Eitan Adler. Other (hopefully) fixes for uncasted malloc()s, reported by the same. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4385 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ChangeLog | 4 ++++ src/global.c | 4 ++-- src/proto.h | 7 +------ src/rcfile.c | 2 +- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index b161ceb0..b1b9b204 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-02-23 Chris Allegretta + * rcfile.c (parse_keybinding) - Define a var before tryung to use it. Whoops! + * fix some redefinitions causing compiler warnings, from Eitan Adler. Other + (hopefully) fixes for uncasted malloc()s, reported by the same. GNU nano 2.1.9 - 2009.02.16 2009-02-16 Chris Allegretta diff --git a/src/global.c b/src/global.c index 54b337d6..1816b52c 100644 --- a/src/global.c +++ b/src/global.c @@ -232,7 +232,7 @@ void add_to_funcs(short func, int menus, const char *desc, const char *help, subnfunc *f; if (allfuncs == NULL) { - allfuncs = nmalloc(sizeof(subnfunc)); + allfuncs = (subnfunc *) nmalloc(sizeof(subnfunc)); f = allfuncs; } else { for (f = allfuncs; f->next != NULL; f = f->next) @@ -292,7 +292,7 @@ void add_to_sclist(int menu, char *scstring, short func, int toggle, int execute sc *s; if (sclist == NULL) { - sclist = nmalloc(sizeof(sc)); + sclist = (sc *) nmalloc(sizeof(sc)); s = sclist; s->next = NULL; } else { diff --git a/src/proto.h b/src/proto.h index e29055fb..ba59e51e 100644 --- a/src/proto.h +++ b/src/proto.h @@ -76,7 +76,7 @@ extern char *quoteerr; extern size_t quotelen; #endif #endif -bool nodelay_mode; +extern bool nodelay_mode; extern char *answer; extern ssize_t tabsize; @@ -811,11 +811,6 @@ const char *mac_format_msg; const char *append_msg; const char *prepend_msg; const char *backup_file_msg; -const char *dos_format_msg; -const char *mac_format_msg; -const char *append_msg; -const char *prepend_msg; -const char *backup_file_msg; const char *gototext_msg; const char *new_buffer_msg; void iso_me_harder_funcmap(short func); diff --git a/src/rcfile.c b/src/rcfile.c index 4704e85e..6c5916a8 100644 --- a/src/rcfile.c +++ b/src/rcfile.c @@ -416,6 +416,7 @@ void parse_keybinding(char *ptr) return; } + menu = strtomenu(menuptr); newsc = strtosc(menu, funcptr); if (newsc == NULL) { rcfile_error( @@ -423,7 +424,6 @@ void parse_keybinding(char *ptr) return; } - menu = strtomenu(menuptr); if (menu < 1) { rcfile_error( N_("Could not map name \"%s\" to a menu"), menuptr); -- 2.39.5