+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().
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. */
/* 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. */
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;
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
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;
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);
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;
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:
/* 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