From 24777c0740717c66b1a0b695133b766477bd891e Mon Sep 17 00:00:00 2001 From: David Lawrence Ramsey Date: Thu, 1 Dec 2005 05:49:08 +0000 Subject: [PATCH] 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 --- ChangeLog | 2 ++ src/prompt.c | 2 +- src/text.c | 2 +- src/winio.c | 4 ---- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index a07272e9..d33221d1 100644 --- 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 index 3d017ad9..3c2c91c3 100644 --- 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 index bdd9050a..487fd744 100644 --- 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 index 2b228cfb..794c8965 100644 --- 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; -- 2.39.5