mirror of
git://git.sv.gnu.org/nano.git
synced 2024-12-24 03:16:52 +03:00
make the former flag same_line_wrap use TRUE and FALSE, add missing part
of DB's do_wrap() tweaks (the initialization of new_line_wrap to 0), and wrap a few overly long comments git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1813 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
parent
973a96be62
commit
85529b37c6
@ -110,6 +110,8 @@ CVS code -
|
||||
brackets used to control justification, via the rcfile
|
||||
entries "punct" and "brackets". (DLR)
|
||||
- Translation updates (see po/ChangeLog for details).
|
||||
- Make the former flag same_line_wrap use TRUE and FALSE
|
||||
instead of 1 and 0. (DLR)
|
||||
- files.c:
|
||||
add_open_file()
|
||||
- Rearrange the NANO_SMALL #ifdef so that the code to set the
|
||||
|
13
src/nano.c
13
src/nano.c
@ -61,15 +61,17 @@
|
||||
static int fill = 0; /* Fill - where to wrap lines, basically */
|
||||
#endif
|
||||
#ifndef DISABLE_WRAPPING
|
||||
static int same_line_wrap = 0; /* Whether wrapped text should be
|
||||
prepended to the next line */
|
||||
static int same_line_wrap = FALSE; /* Whether wrapped text should
|
||||
be prepended to the next
|
||||
line */
|
||||
#endif
|
||||
|
||||
static struct termios oldterm; /* The user's original term settings */
|
||||
static struct sigaction act; /* For all our fun signal handlers */
|
||||
|
||||
#ifndef NANO_SMALL
|
||||
static sigjmp_buf jmpbuf; /* Used to return to mainloop after SIGWINCH */
|
||||
static sigjmp_buf jmpbuf; /* Used to return to mainloop after
|
||||
SIGWINCH */
|
||||
#endif
|
||||
|
||||
/* What we do when we're all set to exit. */
|
||||
@ -1253,7 +1255,7 @@ int do_mark(void)
|
||||
#ifndef DISABLE_WRAPPING
|
||||
void wrap_reset(void)
|
||||
{
|
||||
same_line_wrap = 0;
|
||||
same_line_wrap = FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -1371,6 +1373,7 @@ int do_wrap(filestruct *inptr)
|
||||
|
||||
/* Now we allocate the new line and copy into it. */
|
||||
newline = charalloc(new_line_len + 1); /* +1 for \0 */
|
||||
new_line_len = 0;
|
||||
*newline = '\0';
|
||||
|
||||
#ifndef NANO_SMALL
|
||||
@ -1423,7 +1426,7 @@ int do_wrap(filestruct *inptr)
|
||||
* some other sundry things. */
|
||||
|
||||
/* later wraps of this line will be prepended to the next line. */
|
||||
same_line_wrap = 1;
|
||||
same_line_wrap = TRUE;
|
||||
|
||||
/* Each line knows its line number. We recalculate these if we
|
||||
* inserted a new line. */
|
||||
|
Loading…
Reference in New Issue
Block a user