diff --git a/ChangeLog b/ChangeLog index 7ecab7465cf8d4018354aee9c8a33c16e2e6138b..0242ce932199243b7375f0e3481b8e1ed66f591b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 diff --git a/src/nano.c b/src/nano.c index fb13578719296f09daa05d876576fb0881373818..c6bbb451c3ebe3b595adfd874d334957a11ece0d 100644 --- a/src/nano.c +++ b/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. */