tweaks: move a function to right before the one that calls it
parent
7984ea4eb6
commit
e864107046
28
src/nano.c
28
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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue