From e864107046b4f6cc650ef71e77fadbfd5e2d2be4 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Wed, 29 Jan 2020 10:53:05 +0100 Subject: [PATCH] tweaks: move a function to right before the one that calls it --- src/nano.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/nano.c b/src/nano.c index 774cf1a3..658b803f 100644 --- a/src/nano.c +++ b/src/nano.c @@ -95,20 +95,6 @@ linestruct *make_new_node(linestruct *prevnode) return newnode; } -/* Make a copy of a linestruct node. */ -linestruct *copy_node(const linestruct *src) -{ - linestruct *dst = nmalloc(sizeof(linestruct)); - - dst->data = copy_of(src->data); - dst->lineno = src->lineno; -#ifdef ENABLE_COLOR - dst->multidata = NULL; -#endif - - return dst; -} - /* Splice a new node into an existing linked list of linestructs. */ void splice_node(linestruct *afterthis, linestruct *newnode) { @@ -153,6 +139,20 @@ void delete_node(linestruct *line) free(line); } +/* Make a copy of a linestruct node. */ +linestruct *copy_node(const linestruct *src) +{ + linestruct *dst = nmalloc(sizeof(linestruct)); + + dst->data = copy_of(src->data); +#ifdef ENABLE_COLOR + dst->multidata = NULL; +#endif + dst->lineno = src->lineno; + + return dst; +} + /* Duplicate an entire linked list of linestructs. */ linestruct *copy_buffer(const linestruct *src) {