Removing the unused parameter 'file_bot' from copy_from_filestruct().

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4767 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
Benno Schulenberg 2014-04-14 09:14:39 +00:00
parent 9cc64380e5
commit c8fbc7d1a1
5 changed files with 18 additions and 15 deletions

View File

@ -1,3 +1,7 @@
2014-04-14 Benno Schulenberg <bensberg@justemail.net>
* src/{proto.h,cut.c,nano.c,text.c}: Remove the unused parameter
'file_bot' from copy_from_filestruct(), and rename the other.
2014-04-13 Benno Schulenberg <bensberg@justemail.net>
* proto.h, global.c, rcfile.c: Remove the unused parameter 'menu'
from strtosc().

View File

@ -189,10 +189,10 @@ void do_cut_text(
if (cutbuffer != NULL) {
if (cb_save != NULL) {
cb_save->data += cb_save_len;
copy_from_filestruct(cb_save, cutbottom);
copy_from_filestruct(cb_save);
cb_save->data -= cb_save_len;
} else
copy_from_filestruct(cutbuffer, cutbottom);
copy_from_filestruct(cutbuffer);
/* Set the current place we want to where the text from the
* cutbuffer ends. */
@ -269,7 +269,7 @@ void do_uncut_text(void)
/* Add a copy of the text in the cutbuffer to the current filestruct
* at the current cursor position. */
copy_from_filestruct(cutbuffer, cutbottom);
copy_from_filestruct(cutbuffer);
/* Set the current place we want to where the text from the
* cutbuffer ends. */

View File

@ -411,10 +411,9 @@ void move_to_filestruct(filestruct **file_top, filestruct **file_bot,
new_magicline();
}
/* Copy all the text from the filestruct beginning with file_top and
* ending with file_bot to the current filestruct at the current cursor
* position. */
void copy_from_filestruct(filestruct *file_top, filestruct *file_bot)
/* Copy all text from the given filestruct to the current filestruct
* at the current cursor position. */
void copy_from_filestruct(filestruct *somebuffer)
{
filestruct *top_save;
size_t current_x_save = openfile->current_x;
@ -423,7 +422,7 @@ void copy_from_filestruct(filestruct *file_top, filestruct *file_bot)
bool right_side_up = FALSE, single_line = FALSE;
#endif
assert(file_top != NULL && file_bot != NULL);
assert(somebuffer != NULL);
#ifndef NANO_TINY
/* Keep track of whether the mark begins inside the partition and
@ -446,9 +445,9 @@ void copy_from_filestruct(filestruct *file_top, filestruct *file_bot)
openfile->current_x, openfile->current, openfile->current_x);
edittop_inside = (openfile->edittop == openfile->fileage);
/* Put the top and bottom of the filestruct at copies of file_top
* and file_bot. */
openfile->fileage = copy_filestruct(file_top);
/* Put the top and bottom of the current filestruct at the top and
* bottom of a copy of the passed buffer. */
openfile->fileage = copy_filestruct(somebuffer);
openfile->filebot = openfile->fileage;
while (openfile->filebot->next != NULL)
openfile->filebot = openfile->filebot->next;

View File

@ -430,7 +430,7 @@ partition *partition_filestruct(filestruct *top, size_t top_x,
void unpartition_filestruct(partition **p);
void move_to_filestruct(filestruct **file_top, filestruct **file_bot,
filestruct *top, size_t top_x, filestruct *bot, size_t bot_x);
void copy_from_filestruct(filestruct *file_top, filestruct *file_bot);
void copy_from_filestruct(filestruct *somebuffer);
openfilestruct *make_new_opennode(void);
void splice_opennode(openfilestruct *begin, openfilestruct *newnode,
openfilestruct *end);

View File

@ -378,7 +378,7 @@ void undo_cut(undo *u)
else
do_gotolinecolumn(u->lineno, u->begin+1, FALSE, FALSE, FALSE, FALSE);
copy_from_filestruct(cutbuffer, cutbottom);
copy_from_filestruct(cutbuffer);
free_filestruct(cutbuffer);
cutbuffer = NULL;
@ -663,7 +663,7 @@ void do_redo(void)
case INSERT:
undidmsg = _("text insert");
do_gotolinecolumn(u->lineno, u->begin+1, FALSE, FALSE, FALSE, FALSE);
copy_from_filestruct(u->cutbuffer, u->cutbottom);
copy_from_filestruct(u->cutbuffer);
openfile->placewewant = xplustabs();
break;
default:
@ -1810,7 +1810,7 @@ void backup_lines(filestruct *first_line, size_t par_len)
/* Copy the paragraph back to the current buffer's filestruct from
* the justify buffer. */
copy_from_filestruct(jusbuffer, jusbottom);
copy_from_filestruct(jusbuffer);
/* Move upward from the last line of the paragraph to the first
* line, putting first_line, edittop, current, and mark_begin at the