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

Renaming a variable for clarity.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5438 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
No related merge requests found
Showing with 10 additions and 9 deletions
+10 -9
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
on the command line does not exist. This fixes Savannah bug #46503. on the command line does not exist. This fixes Savannah bug #46503.
* src/nano.c (splice_node): Inserting a new node into a linked list * src/nano.c (splice_node): Inserting a new node into a linked list
requires just two parameters: the insertion point and the new node. requires just two parameters: the insertion point and the new node.
* src/nano.c (splice_node): Rename a variable for clarity.
2015-11-23 Benno Schulenberg <bensberg@justemail.net> 2015-11-23 Benno Schulenberg <bensberg@justemail.net>
* src/nano.c (main), src/winio.c (parse_kbinput): Make Ctrl+Left and * src/nano.c (main), src/winio.c (parse_kbinput): Make Ctrl+Left and
......
...@@ -94,16 +94,16 @@ filestruct *copy_node(const filestruct *src) ...@@ -94,16 +94,16 @@ filestruct *copy_node(const filestruct *src)
return dst; return dst;
} }
/* Splice a node into an existing filestruct. */ /* Splice a new node into an existing linked list of filestructs. */
void splice_node(filestruct *begin, filestruct *newnode) void splice_node(filestruct *afterthis, filestruct *newnode)
{ {
assert(newnode != NULL && begin != NULL); assert(afterthis != NULL && newnode != NULL);
newnode->next = begin->next; newnode->next = afterthis->next;
newnode->prev = begin; newnode->prev = afterthis;
if (begin->next != NULL) if (afterthis->next != NULL)
begin->next->prev = newnode; afterthis->next->prev = newnode;
begin->next = newnode; afterthis->next = newnode;
} }
/* Unlink a node from the rest of the filestruct and delete it. */ /* Unlink a node from the rest of the filestruct and delete it. */
......
...@@ -432,7 +432,7 @@ void do_right(void); ...@@ -432,7 +432,7 @@ void do_right(void);
/* All functions in nano.c. */ /* All functions in nano.c. */
filestruct *make_new_node(filestruct *prevnode); filestruct *make_new_node(filestruct *prevnode);
filestruct *copy_node(const filestruct *src); filestruct *copy_node(const filestruct *src);
void splice_node(filestruct *begin, filestruct *newnode); void splice_node(filestruct *afterthis, filestruct *newnode);
void unlink_node(filestruct *fileptr); void unlink_node(filestruct *fileptr);
void delete_node(filestruct *fileptr); void delete_node(filestruct *fileptr);
filestruct *copy_filestruct(const filestruct *src); filestruct *copy_filestruct(const filestruct *src);
......
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