commit 24777c0740717c66b1a0b695133b766477bd891e
parent a685468a1805795701887853351f5448f05bcf00
Author: David Lawrence Ramsey <pooka109@gmail.com>
Date: Thu, 1 Dec 2005 05:49:08 +0000
fix compilation with --enable-debug, and remove unneeded assert
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3234 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Diffstat:
4 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -245,6 +245,8 @@ CVS code -
edit_add()
- Rename to edit_draw(), and rename parameter yval to line.
(DLR)
+ do_cursorpos()
+ - Remove unneeded assert. (DLR)
do_yesno()
- Make mouse clicks on the Yes/No/All shortcuts work properly
when the MORE_SPACE flag is set. (DLR)
diff --git a/src/prompt.c b/src/prompt.c
@@ -779,7 +779,7 @@ void update_statusbar_line(const char *curranswer, size_t index)
size_t start_col, page_start;
char *expanded;
- assert(prompt != NULL && index <= strlen(buf));
+ assert(prompt != NULL && index <= strlen(curranswer));
start_col = strlenpt(prompt) + 1;
index = strnlenpt(curranswer, index);
diff --git a/src/text.c b/src/text.c
@@ -1019,7 +1019,7 @@ void backup_lines(filestruct *first_line, size_t par_len)
* current and filebot if filebot is the last line in the
* paragraph. */
assert(par_len > 0 && openfile->current->lineno + par_len <=
- filebot->lineno + 1);
+ openfile->filebot->lineno + 1);
/* Move bot down par_len lines to the line after the last line of
* the paragraph, if there is one. */
diff --git a/src/winio.c b/src/winio.c
@@ -2901,10 +2901,6 @@ void do_cursorpos(bool constant)
openfile->current->data[openfile->current_x] = c;
openfile->current->next = f;
- /* Check whether totsize is correct. If it isn't, there is a bug
- * somewhere. */
- assert(openfile->current != openfile->filebot || i == openfile->totsize);
-
if (constant && disable_cursorpos) {
disable_cursorpos = FALSE;
return;