- nano.c:main() - Silence annoying compiler messages about clobbering and uninitialized variables by moving variable inits to the top of main() and re-initializing them after the sigsetjmp()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1456 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
a0449d92a0
commit
fe1d0722d4
|
@ -16,7 +16,6 @@ CVS code
|
||||||
- Change various const char *s to char *s because Irix curses
|
- Change various const char *s to char *s because Irix curses
|
||||||
waddnstr() complains about const char's, I imagine this is a
|
waddnstr() complains about const char's, I imagine this is a
|
||||||
common System V curses issue.
|
common System V curses issue.
|
||||||
|
|
||||||
- files.c:
|
- files.c:
|
||||||
cwd_tab_completion()
|
cwd_tab_completion()
|
||||||
- Memory leak fix (David Benbennick).
|
- Memory leak fix (David Benbennick).
|
||||||
|
@ -46,6 +45,9 @@ CVS code
|
||||||
main()
|
main()
|
||||||
- Fix nano not compiling with ENABLE_RCFILE and DISABLE_TABCOMP
|
- Fix nano not compiling with ENABLE_RCFILE and DISABLE_TABCOMP
|
||||||
(David Benbennick).
|
(David Benbennick).
|
||||||
|
- Silence annoying compiler messages about clobbering and
|
||||||
|
uninitialized variables by moving variable inits to the top
|
||||||
|
of main() and re-initializing them after the sigsetjmp().
|
||||||
- rcfile.c:
|
- rcfile.c:
|
||||||
colortoint()
|
colortoint()
|
||||||
- Don't bomb after invalid color and print bad color name
|
- Don't bomb after invalid color and print bad color name
|
||||||
|
|
12
nano.c
12
nano.c
|
@ -3019,9 +3019,12 @@ int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
int optchr;
|
int optchr;
|
||||||
int startline = 0; /* Line to try and start at */
|
int startline = 0; /* Line to try and start at */
|
||||||
int modify_control_seq;
|
int modify_control_seq = 0;
|
||||||
int fill_flag_used = 0; /* Was the fill option used? */
|
int fill_flag_used = 0; /* Was the fill option used? */
|
||||||
const shortcut *s;
|
const shortcut *s;
|
||||||
|
int keyhandled = 0; /* Have we handled the keystroke yet? */
|
||||||
|
int kbinput = -1; /* Input from keyboard */
|
||||||
|
|
||||||
#ifdef HAVE_GETOPT_LONG
|
#ifdef HAVE_GETOPT_LONG
|
||||||
int preserveopt = 0; /* Did the cmdline include --preserve? */
|
int preserveopt = 0; /* Did the cmdline include --preserve? */
|
||||||
#endif
|
#endif
|
||||||
|
@ -3471,6 +3474,11 @@ int main(int argc, char *argv[])
|
||||||
/* Return here after a sigwinch */
|
/* Return here after a sigwinch */
|
||||||
sigsetjmp(jmpbuf, 1);
|
sigsetjmp(jmpbuf, 1);
|
||||||
|
|
||||||
|
/* SHUT UP GCC! */
|
||||||
|
startline = 0;
|
||||||
|
fill_flag_used = 0;
|
||||||
|
keyhandled = 0;
|
||||||
|
|
||||||
/* This variable should be initialized after the sigsetjmp(), so we
|
/* This variable should be initialized after the sigsetjmp(), so we
|
||||||
can't do Esc-Esc then quickly resize and muck things up. */
|
can't do Esc-Esc then quickly resize and muck things up. */
|
||||||
modify_control_seq = 0;
|
modify_control_seq = 0;
|
||||||
|
@ -3479,8 +3487,6 @@ int main(int argc, char *argv[])
|
||||||
reset_cursor();
|
reset_cursor();
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
int keyhandled = 0; /* Have we handled the keystroke yet? */
|
|
||||||
int kbinput; /* Input from keyboard */
|
|
||||||
|
|
||||||
if (ISSET(CONSTUPDATE))
|
if (ISSET(CONSTUPDATE))
|
||||||
do_cursorpos(1);
|
do_cursorpos(1);
|
||||||
|
|
Loading…
Reference in New Issue