/* vi:set ts=8 sts=4 sw=4 noet:
*
* VIM - Vi IMproved by Bram Moolenaar
*
* Do ":help uganda" in Vim to read copying and usage conditions.
* Do ":help credits" in Vim to see a list of people who contributed.
* See README.txt for an overview of the Vim source code.
*/
/*
* list.c: List support
*/
#include "vim.h"
#if defined(FEAT_EVAL) || defined(PROTO)
/* List heads for garbage collection. */
static list_T *first_list = NULL; /* list of all lists */
/*
* Add a watcher to a list.
*/
void
list_add_watch(list_T *l, listwatch_T *lw)
{
lw->lw_next = l->lv_watch;
l->lv_watch = lw;
}
/*
* Remove a watcher from a list.
* No warning when it isn't found...
*/
void
list_rem_watch(list_T *l, listwatch_T *lwrem)
{
listwatch_T