fix erroneous #ifdef that caused a compilation problem when

--enable-nanorc wasn't used and --enable-extra was, and make sure we put
back the keystroke that breaks us out of the credits (if any)


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2607 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
David Lawrence Ramsey 2005-06-07 03:20:35 +00:00
parent f47f150c82
commit 3925bdafda
3 changed files with 18 additions and 5 deletions

View File

@ -54,6 +54,11 @@ CVS code -
and NANO_APPEND_KEY are. Changes to shortcut_init(), usage(),
main(), search_init(), nanorc.sample, nano.1, nanorc.5,
nano.texi, etc. (DLR)
- chars.c:
make_mbstring()
- Change erroneous ENABLE_EXTRA #ifdef to NANO_EXTRA to fix a
compilation problem when --enable-nanorc isn't used and
--enable-extra is. (DLR)
- cut.c:
cut_line()
- Set placewewant properly after cutting a line, to avoid a
@ -178,6 +183,11 @@ CVS code -
total_update()
- Simplify to call clearok(TRUE) and wrefresh() on edit, which
updates the entire screen in fewer function calls. (DLR)
do_credits()
- Save the keystroke that breaks us out of the credits (if any)
and put it back so that it isn't lost. This is especially
needed if the keystroke is part of a multibyte character.
(DLR)
- configure.ac:
- Minor tweaks to some of the test blocks to avoid XSI:isms.
(DLR, adapted from a Debian patch for GNU ed by David

View File

@ -301,7 +301,7 @@ char *make_mbchar(int chr, int *chr_mb_len)
return chr_mb;
}
#if defined(ENABLE_NANORC) || defined(ENABLE_EXTRA)
#if defined(ENABLE_NANORC) || defined(NANO_EXTRA)
/* Convert the string str to a valid multibyte string with the same wide
* character values as str. Return the (dynamically allocated)
* multibyte string. */

View File

@ -4020,7 +4020,7 @@ void dump_buffer_reverse(void)
/* Easter egg: Display credits. Assume nodelay(edit) is FALSE. */
void do_credits(void)
{
int crpos = 0, xlpos = 0;
int kbinput = ERR, crpos = 0, xlpos = 0;
const char *credits[CREDIT_LEN] = {
NULL, /* "The nano text editor" */
NULL, /* "version" */
@ -4101,7 +4101,7 @@ void do_credits(void)
wrefresh(bottomwin);
for (crpos = 0; crpos < CREDIT_LEN + editwinrows / 2; crpos++) {
if (wgetch(edit) != ERR)
if ((kbinput = wgetch(edit)) != ERR)
break;
if (crpos < CREDIT_LEN) {
@ -4129,16 +4129,19 @@ void do_credits(void)
napms(700);
scroll(edit);
wrefresh(edit);
if (wgetch(edit) != ERR)
if ((kbinput = wgetch(edit)) != ERR)
break;
napms(700);
scroll(edit);
wrefresh(edit);
}
if (kbinput != ERR)
ungetch(kbinput);
curs_set(1);
scrollok(edit, FALSE);
nodelay(edit, FALSE);
curs_set(1);
total_refresh();
}
#endif