commit f86fa86089a6071f25fcbc48061d9689e95674de
parent 5ba7a93b1a4eab8afb0e01e4e9fe41e5e47c6382
Author: Chris Allegretta <chrisa@asty.org>
Date: Wed, 25 Feb 2009 04:32:15 +0000
2009-02-23 Chris Allegretta <chrisa@asty.org>
* 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
Diffstat:
4 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,7 @@
+2009-02-23 Chris Allegretta <chrisa@asty.org>
+ * 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 <chrisa@asty.org>
diff --git 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
@@ -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
@@ -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);