nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit e864107046b4f6cc650ef71e77fadbfd5e2d2be4
parent 7984ea4eb61ebeb0dfed6672c9003d7e458e09d6
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Wed, 29 Jan 2020 10:53:05 +0100

tweaks: move a function to right before the one that calls it

Diffstat:
Msrc/nano.c | 28++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)

diff --git 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) {