D.S

dev.mysql.com

MySQL: include/my_list.h Source File

MySQL: include/my_list.h Source File MySQL  8.0.0 Source Code Documentation Main Page Related Pages Modules Namespaces Classes Files File List File Members my_list.h Go to the documentation of this file. 1 /* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. 2  3  This program is free software; you can redistribute it and/or modify 4  it under the terms of the GNU General Public License as published by 5  the Free Software Foundation; version 2 of the License. 6  7  This program is distributed in the hope that it will be useful, 8  but WITHOUT ANY WARRANTY; without even the implied warranty of 9  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10  GNU General Public License for more details. 11  12  You should have received a copy of the GNU General Public License 13  along with this program; if not, write to the Free Software 14  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 15  16 #ifndef _list_h_ 17 #define _list_h_ 18  19 /** 20  @file include/my_list.h 21 */ 22  23 #ifdef __cplusplus 24 extern "C" { 25 #endif 26  27  typedef struct st_list { 28   struct st_list * prev ,* next ; 29   void * data ; 30 } LIST ; 31  32  typedef int (* list_walk_action )(void *,void *); 33  34 extern LIST * list_add ( LIST *root, LIST *element); 35 extern LIST * list_delete ( LIST *root, LIST *element); 36 extern LIST * list_cons (void * data , LIST *root); 37 extern LIST * list_reverse ( LIST *root); 38 extern void list_free ( LIST *root,unsigned int free_data); 39 extern unsigned int list_length ( LIST *); 40 extern int list_walk ( LIST *, list_walk_action action,unsigned char * argument); 41  42  #define list_rest(a) ((a)->next) 43  #define list_push(a,b) (a)=list_cons((b),(a)) 44  #define list_pop(A) {LIST *old=(A); (A)=list_delete(old,old); my_free(old); } 45  46 #ifdef __cplusplus 47 } 48 #endif 49 #endif list_walk_action int(* list_walk_action)(void *, void *) Definition: my_list.h:32 partition_type::LIST st_list Definition: my_list.h:27 list_free void list_free(LIST *root, unsigned int free_data) Definition: list.cc:58 list_length unsigned int list_length(LIST *) Definition: list.cc:98 list_reverse LIST * list_reverse(LIST *root) Definition: list.cc:83 list_delete LIST * list_delete(LIST *root, LIST *element) Definition: list.cc:46 st_list::data void * data Definition: my_list.h:29 list_walk int list_walk(LIST *, list_walk_action action, unsigned char *argument) Definition: list.cc:106 st_list::prev struct st_list * prev Definition: my_list.h:28 list_cons LIST * list_cons(void *data, LIST *root) Definition: list.cc:72 list_add LIST * list_add(LIST *root, LIST *element) Definition: list.cc:28 st_list::next struct st_list * next Definition: my_list.h:28 include my_list.h Generated by 1.8.11