1
1

tweaks: move another function to before the one that calls it

Этот коммит содержится в:
Benno Schulenberg 2020-01-29 10:54:30 +01:00
родитель e864107046
Коммит 67e5913edf

Просмотреть файл

@ -109,21 +109,6 @@ void splice_node(linestruct *afterthis, linestruct *newnode)
openfile->filebot = newnode;
}
/* Disconnect a node from a linked list of linestructs and delete it. */
void unlink_node(linestruct *line)
{
if (line->prev != NULL)
line->prev->next = line->next;
if (line->next != NULL)
line->next->prev = line->prev;
/* Update filebot when removing a node at the end of file. */
if (openfile && openfile->filebot == line)
openfile->filebot = line->prev;
delete_node(line);
}
/* Free the data structures in the given node. */
void delete_node(linestruct *line)
{
@ -139,6 +124,21 @@ void delete_node(linestruct *line)
free(line);
}
/* Disconnect a node from a linked list of linestructs and delete it. */
void unlink_node(linestruct *line)
{
if (line->prev != NULL)
line->prev->next = line->next;
if (line->next != NULL)
line->next->prev = line->prev;
/* Update filebot when removing a node at the end of file. */
if (openfile && openfile->filebot == line)
openfile->filebot = line->prev;
delete_node(line);
}
/* Make a copy of a linestruct node. */
linestruct *copy_node(const linestruct *src)
{