files.c,proto.h,text.c: Fix for conflicts with AIX curses variables, from William Jojo <jojowil@hvcc.edu>
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4260 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
506af6fbfb
commit
8b6461fc80
|
@ -1,5 +1,10 @@
|
||||||
2008-05-31 Chris Allegretta <chrisa@asty.org>
|
2008-05-31 Chris Allegretta <chrisa@asty.org>
|
||||||
* global.c: Fix for compile error when --disable-speller is used (Savannah bug 23227 by Mike Frysinger)
|
* files.c,proto.h,text.c: Fix for conflicts with AIX curses
|
||||||
|
variables, from William Jojo <jojowil@hvcc.edu>
|
||||||
|
|
||||||
|
2008-05-31 Chris Allegretta <chrisa@asty.org>
|
||||||
|
* global.c: Fix for compile error when --disable-speller is used
|
||||||
|
(Savannah bug 23227 by Mike Frysinger)
|
||||||
|
|
||||||
2008-05-31 Chris Allegretta <chrisa@asty.org>
|
2008-05-31 Chris Allegretta <chrisa@asty.org>
|
||||||
* Fix for seg fault when window size too small, by
|
* Fix for seg fault when window size too small, by
|
||||||
|
|
12
src/files.c
12
src/files.c
|
@ -2395,7 +2395,7 @@ char *input_tab(char *buf, bool allow_files, size_t *place, bool
|
||||||
} else if (!*lastwastab || num_matches < 2)
|
} else if (!*lastwastab || num_matches < 2)
|
||||||
*lastwastab = TRUE;
|
*lastwastab = TRUE;
|
||||||
else {
|
else {
|
||||||
int longest_name = 0, columns, editline = 0;
|
int longest_name = 0, ncols, editline = 0;
|
||||||
|
|
||||||
/* Now we show a list of the available choices. */
|
/* Now we show a list of the available choices. */
|
||||||
assert(num_matches > 1);
|
assert(num_matches > 1);
|
||||||
|
@ -2420,7 +2420,7 @@ char *input_tab(char *buf, bool allow_files, size_t *place, bool
|
||||||
/* Each column will be (longest_name + 2) columns wide, i.e.
|
/* Each column will be (longest_name + 2) columns wide, i.e.
|
||||||
* two spaces between columns, except that there will be
|
* two spaces between columns, except that there will be
|
||||||
* only one space after the last column. */
|
* only one space after the last column. */
|
||||||
columns = (COLS + 1) / (longest_name + 2);
|
ncols = (COLS + 1) / (longest_name + 2);
|
||||||
|
|
||||||
/* Blank the edit window, and print the matches out
|
/* Blank the edit window, and print the matches out
|
||||||
* there. */
|
* there. */
|
||||||
|
@ -2434,11 +2434,11 @@ char *input_tab(char *buf, bool allow_files, size_t *place, bool
|
||||||
char *disp;
|
char *disp;
|
||||||
|
|
||||||
wmove(edit, editline, (longest_name + 2) *
|
wmove(edit, editline, (longest_name + 2) *
|
||||||
(match % columns));
|
(match % ncols));
|
||||||
|
|
||||||
if (match % columns == 0 &&
|
if (match % ncols == 0 &&
|
||||||
editline == editwinrows - 1 &&
|
editline == editwinrows - 1 &&
|
||||||
num_matches - match > columns) {
|
num_matches - match > ncols) {
|
||||||
waddstr(edit, _("(more)"));
|
waddstr(edit, _("(more)"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -2448,7 +2448,7 @@ char *input_tab(char *buf, bool allow_files, size_t *place, bool
|
||||||
waddstr(edit, disp);
|
waddstr(edit, disp);
|
||||||
free(disp);
|
free(disp);
|
||||||
|
|
||||||
if ((match + 1) % columns == 0)
|
if ((match + 1) % ncols == 0)
|
||||||
editline++;
|
editline++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -632,7 +632,7 @@ bool do_wrap(filestruct *line);
|
||||||
#if !defined(DISABLE_HELP) || !defined(DISABLE_WRAPJUSTIFY)
|
#if !defined(DISABLE_HELP) || !defined(DISABLE_WRAPJUSTIFY)
|
||||||
ssize_t break_line(const char *line, ssize_t goal
|
ssize_t break_line(const char *line, ssize_t goal
|
||||||
#ifndef DISABLE_HELP
|
#ifndef DISABLE_HELP
|
||||||
, bool newline
|
, bool newln
|
||||||
#endif
|
#endif
|
||||||
);
|
);
|
||||||
#endif
|
#endif
|
||||||
|
|
20
src/text.c
20
src/text.c
|
@ -761,7 +761,7 @@ bool do_wrap(filestruct *line)
|
||||||
* blank, as does a '\n' if newline is TRUE. */
|
* blank, as does a '\n' if newline is TRUE. */
|
||||||
ssize_t break_line(const char *line, ssize_t goal
|
ssize_t break_line(const char *line, ssize_t goal
|
||||||
#ifndef DISABLE_HELP
|
#ifndef DISABLE_HELP
|
||||||
, bool newline
|
, bool newln
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
@ -781,13 +781,13 @@ ssize_t break_line(const char *line, ssize_t goal
|
||||||
|
|
||||||
if (is_blank_mbchar(line)
|
if (is_blank_mbchar(line)
|
||||||
#ifndef DISABLE_HELP
|
#ifndef DISABLE_HELP
|
||||||
|| (newline && *line == '\n')
|
|| (newln && *line == '\n')
|
||||||
#endif
|
#endif
|
||||||
) {
|
) {
|
||||||
blank_loc = cur_loc;
|
blank_loc = cur_loc;
|
||||||
|
|
||||||
#ifndef DISABLE_HELP
|
#ifndef DISABLE_HELP
|
||||||
if (newline && *line == '\n')
|
if (newln && *line == '\n')
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -810,7 +810,7 @@ ssize_t break_line(const char *line, ssize_t goal
|
||||||
|
|
||||||
if (is_blank_mbchar(line)
|
if (is_blank_mbchar(line)
|
||||||
#ifndef DISABLE_HELP
|
#ifndef DISABLE_HELP
|
||||||
|| (newline && *line == '\n')
|
|| (newln && *line == '\n')
|
||||||
#endif
|
#endif
|
||||||
) {
|
) {
|
||||||
if (!found_blank)
|
if (!found_blank)
|
||||||
|
@ -834,11 +834,11 @@ ssize_t break_line(const char *line, ssize_t goal
|
||||||
|
|
||||||
while (*line != '\0' && (is_blank_mbchar(line)
|
while (*line != '\0' && (is_blank_mbchar(line)
|
||||||
#ifndef DISABLE_HELP
|
#ifndef DISABLE_HELP
|
||||||
|| (newline && *line == '\n')
|
|| (newln && *line == '\n')
|
||||||
#endif
|
#endif
|
||||||
)) {
|
)) {
|
||||||
#ifndef DISABLE_HELP
|
#ifndef DISABLE_HELP
|
||||||
if (newline && *line == '\n')
|
if (newln && *line == '\n')
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -2365,7 +2365,7 @@ void do_spell(void)
|
||||||
void do_wordlinechar_count(void)
|
void do_wordlinechar_count(void)
|
||||||
{
|
{
|
||||||
size_t words = 0, chars = 0;
|
size_t words = 0, chars = 0;
|
||||||
ssize_t lines = 0;
|
ssize_t nlines = 0;
|
||||||
size_t current_x_save = openfile->current_x;
|
size_t current_x_save = openfile->current_x;
|
||||||
size_t pww_save = openfile->placewewant;
|
size_t pww_save = openfile->placewewant;
|
||||||
filestruct *current_save = openfile->current;
|
filestruct *current_save = openfile->current;
|
||||||
|
@ -2400,7 +2400,7 @@ void do_wordlinechar_count(void)
|
||||||
/* Get the total line and character counts, as "wc -l" and "wc -c"
|
/* Get the total line and character counts, as "wc -l" and "wc -c"
|
||||||
* do, but get the latter in multibyte characters. */
|
* do, but get the latter in multibyte characters. */
|
||||||
if (old_mark_set) {
|
if (old_mark_set) {
|
||||||
lines = openfile->filebot->lineno -
|
nlines = openfile->filebot->lineno -
|
||||||
openfile->fileage->lineno + 1;
|
openfile->fileage->lineno + 1;
|
||||||
chars = get_totsize(openfile->fileage, openfile->filebot);
|
chars = get_totsize(openfile->fileage, openfile->filebot);
|
||||||
|
|
||||||
|
@ -2409,7 +2409,7 @@ void do_wordlinechar_count(void)
|
||||||
unpartition_filestruct(&filepart);
|
unpartition_filestruct(&filepart);
|
||||||
openfile->mark_set = TRUE;
|
openfile->mark_set = TRUE;
|
||||||
} else {
|
} else {
|
||||||
lines = openfile->filebot->lineno;
|
nlines = openfile->filebot->lineno;
|
||||||
chars = openfile->totsize;
|
chars = openfile->totsize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2421,7 +2421,7 @@ void do_wordlinechar_count(void)
|
||||||
/* Display the total word, line, and character counts on the
|
/* Display the total word, line, and character counts on the
|
||||||
* statusbar. */
|
* statusbar. */
|
||||||
statusbar(_("%sWords: %lu Lines: %ld Chars: %lu"), old_mark_set ?
|
statusbar(_("%sWords: %lu Lines: %ld Chars: %lu"), old_mark_set ?
|
||||||
_("In Selection: ") : "", (unsigned long)words, (long)lines,
|
_("In Selection: ") : "", (unsigned long)words, (long)nlines,
|
||||||
(unsigned long)chars);
|
(unsigned long)chars);
|
||||||
}
|
}
|
||||||
#endif /* !NANO_TINY */
|
#endif /* !NANO_TINY */
|
||||||
|
|
Loading…
Reference in New Issue