root/maint/gnulib/lib/gl_linked_list.c

/* [previous][next][first][last][top][bottom][index][help] */
   1 /* Sequential list data type implemented by a linked list.
   2    Copyright (C) 2006, 2008-2021 Free Software Foundation, Inc.
   3    Written by Bruno Haible <bruno@clisp.org>, 2006.
   4 
   5    This file is free software: you can redistribute it and/or modify
   6    it under the terms of the GNU Lesser General Public License as
   7    published by the Free Software Foundation; either version 2.1 of the
   8    License, or (at your option) any later version.
   9 
  10    This file is distributed in the hope that it will be useful,
  11    but WITHOUT ANY WARRANTY; without even the implied warranty of
  12    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13    GNU Lesser General Public License for more details.
  14 
  15    You should have received a copy of the GNU Lesser General Public License
  16    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
  17 
  18 #include <config.h>
  19 
  20 /* Specification.  */
  21 #include "gl_linked_list.h"
  22 
  23 #include <stdlib.h>
  24 
  25 /* -------------------------- gl_list_t Data Type -------------------------- */
  26 
  27 /* Generic linked list code.  */
  28 #include "gl_anylinked_list1.h"
  29 #include "gl_anylinked_list2.h"
  30 
  31 
  32 const struct gl_list_implementation gl_linked_list_implementation =
  33   {
  34     gl_linked_nx_create_empty,
  35     gl_linked_nx_create,
  36     gl_linked_size,
  37     gl_linked_node_value,
  38     gl_linked_node_nx_set_value,
  39     gl_linked_next_node,
  40     gl_linked_previous_node,
  41     gl_linked_first_node,
  42     gl_linked_last_node,
  43     gl_linked_get_at,
  44     gl_linked_nx_set_at,
  45     gl_linked_search_from_to,
  46     gl_linked_indexof_from_to,
  47     gl_linked_nx_add_first,
  48     gl_linked_nx_add_last,
  49     gl_linked_nx_add_before,
  50     gl_linked_nx_add_after,
  51     gl_linked_nx_add_at,
  52     gl_linked_remove_node,
  53     gl_linked_remove_at,
  54     gl_linked_remove,
  55     gl_linked_list_free,
  56     gl_linked_iterator,
  57     gl_linked_iterator_from_to,
  58     gl_linked_iterator_next,
  59     gl_linked_iterator_free,
  60     gl_linked_sortedlist_search,
  61     gl_linked_sortedlist_search_from_to,
  62     gl_linked_sortedlist_indexof,
  63     gl_linked_sortedlist_indexof_from_to,
  64     gl_linked_sortedlist_nx_add,
  65     gl_linked_sortedlist_remove
  66   };

/* [previous][next][first][last][top][bottom][index][help] */