Commit c8fbc7d1 authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

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
parent 9cc64380
Showing with 18 additions and 15 deletions
+18 -15
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> 2014-04-13 Benno Schulenberg <bensberg@justemail.net>
* proto.h, global.c, rcfile.c: Remove the unused parameter 'menu' * proto.h, global.c, rcfile.c: Remove the unused parameter 'menu'
from strtosc(). from strtosc().
......
...@@ -189,10 +189,10 @@ void do_cut_text( ...@@ -189,10 +189,10 @@ void do_cut_text(
if (cutbuffer != NULL) { if (cutbuffer != NULL) {
if (cb_save != NULL) { if (cb_save != NULL) {
cb_save->data += cb_save_len; cb_save->data += cb_save_len;
copy_from_filestruct(cb_save, cutbottom); copy_from_filestruct(cb_save);
cb_save->data -= cb_save_len; cb_save->data -= cb_save_len;
} else } else
copy_from_filestruct(cutbuffer, cutbottom); copy_from_filestruct(cutbuffer);
/* Set the current place we want to where the text from the /* Set the current place we want to where the text from the
* cutbuffer ends. */ * cutbuffer ends. */
...@@ -269,7 +269,7 @@ void do_uncut_text(void) ...@@ -269,7 +269,7 @@ void do_uncut_text(void)
/* Add a copy of the text in the cutbuffer to the current filestruct /* Add a copy of the text in the cutbuffer to the current filestruct
* at the current cursor position. */ * 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 /* Set the current place we want to where the text from the
* cutbuffer ends. */ * cutbuffer ends. */
......
...@@ -411,10 +411,9 @@ void move_to_filestruct(filestruct **file_top, filestruct **file_bot, ...@@ -411,10 +411,9 @@ void move_to_filestruct(filestruct **file_top, filestruct **file_bot,
new_magicline(); new_magicline();
} }
/* Copy all the text from the filestruct beginning with file_top and /* Copy all text from the given filestruct to the current filestruct
* ending with file_bot to the current filestruct at the current cursor * at the current cursor position. */
* position. */ void copy_from_filestruct(filestruct *somebuffer)
void copy_from_filestruct(filestruct *file_top, filestruct *file_bot)
{ {
filestruct *top_save; filestruct *top_save;
size_t current_x_save = openfile->current_x; size_t current_x_save = openfile->current_x;
...@@ -423,7 +422,7 @@ void copy_from_filestruct(filestruct *file_top, filestruct *file_bot) ...@@ -423,7 +422,7 @@ void copy_from_filestruct(filestruct *file_top, filestruct *file_bot)
bool right_side_up = FALSE, single_line = FALSE; bool right_side_up = FALSE, single_line = FALSE;
#endif #endif
assert(file_top != NULL && file_bot != NULL); assert(somebuffer != NULL);
#ifndef NANO_TINY #ifndef NANO_TINY
/* Keep track of whether the mark begins inside the partition and /* 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) ...@@ -446,9 +445,9 @@ void copy_from_filestruct(filestruct *file_top, filestruct *file_bot)
openfile->current_x, openfile->current, openfile->current_x); openfile->current_x, openfile->current, openfile->current_x);
edittop_inside = (openfile->edittop == openfile->fileage); edittop_inside = (openfile->edittop == openfile->fileage);
/* Put the top and bottom of the filestruct at copies of file_top /* Put the top and bottom of the current filestruct at the top and
* and file_bot. */ * bottom of a copy of the passed buffer. */
openfile->fileage = copy_filestruct(file_top); openfile->fileage = copy_filestruct(somebuffer);
openfile->filebot = openfile->fileage; openfile->filebot = openfile->fileage;
while (openfile->filebot->next != NULL) while (openfile->filebot->next != NULL)
openfile->filebot = openfile->filebot->next; openfile->filebot = openfile->filebot->next;
......
...@@ -430,7 +430,7 @@ partition *partition_filestruct(filestruct *top, size_t top_x, ...@@ -430,7 +430,7 @@ partition *partition_filestruct(filestruct *top, size_t top_x,
void unpartition_filestruct(partition **p); void unpartition_filestruct(partition **p);
void move_to_filestruct(filestruct **file_top, filestruct **file_bot, void move_to_filestruct(filestruct **file_top, filestruct **file_bot,
filestruct *top, size_t top_x, filestruct *bot, size_t bot_x); 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); openfilestruct *make_new_opennode(void);
void splice_opennode(openfilestruct *begin, openfilestruct *newnode, void splice_opennode(openfilestruct *begin, openfilestruct *newnode,
openfilestruct *end); openfilestruct *end);
......
...@@ -378,7 +378,7 @@ void undo_cut(undo *u) ...@@ -378,7 +378,7 @@ void undo_cut(undo *u)
else else
do_gotolinecolumn(u->lineno, u->begin+1, FALSE, FALSE, FALSE, FALSE); do_gotolinecolumn(u->lineno, u->begin+1, FALSE, FALSE, FALSE, FALSE);
copy_from_filestruct(cutbuffer, cutbottom); copy_from_filestruct(cutbuffer);
free_filestruct(cutbuffer); free_filestruct(cutbuffer);
cutbuffer = NULL; cutbuffer = NULL;
...@@ -663,7 +663,7 @@ void do_redo(void) ...@@ -663,7 +663,7 @@ void do_redo(void)
case INSERT: case INSERT:
undidmsg = _("text insert"); undidmsg = _("text insert");
do_gotolinecolumn(u->lineno, u->begin+1, FALSE, FALSE, FALSE, FALSE); 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(); openfile->placewewant = xplustabs();
break; break;
default: default:
...@@ -1810,7 +1810,7 @@ void backup_lines(filestruct *first_line, size_t par_len) ...@@ -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 /* Copy the paragraph back to the current buffer's filestruct from
* the justify buffer. */ * the justify buffer. */
copy_from_filestruct(jusbuffer, jusbottom); copy_from_filestruct(jusbuffer);
/* Move upward from the last line of the paragraph to the first /* Move upward from the last line of the paragraph to the first
* line, putting first_line, edittop, current, and mark_begin at the * line, putting first_line, edittop, current, and mark_begin at the
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment