Annotation of parser3/src/sql/mysql/mySQL32/include/my_list.h, revision 1.1

1.1     ! paf         1: /* Copyright Abandoned 1996 TCX DataKonsult AB & Monty Program KB & Detron HB
        !             2:    This file is public domain and comes with NO WARRANTY of any kind */
        !             3: 
        !             4: #ifndef _list_h_
        !             5: #define _list_h_
        !             6: 
        !             7: #ifdef __cplusplus
        !             8: extern "C" {
        !             9: #endif
        !            10: 
        !            11: typedef struct st_list {
        !            12:   struct st_list *prev,*next;
        !            13:   void *data;
        !            14: } LIST;
        !            15: 
        !            16: typedef int (*list_walk_action)(void *,void *);
        !            17: 
        !            18: extern LIST *list_add(LIST *root,LIST *element);
        !            19: extern LIST *list_delete(LIST *root,LIST *element);
        !            20: extern LIST *list_cons(void *data,LIST *root);
        !            21: extern LIST *list_reverse(LIST *root);
        !            22: extern void list_free(LIST *root,pbool free_data);
        !            23: extern uint list_length(LIST *list);
        !            24: extern int list_walk(LIST *list,list_walk_action action,gptr argument);
        !            25: 
        !            26: #define rest(a) ((a)->next)
        !            27: #define list_push(a,b) (a)=list_cons((b),(a))
        !            28: #define list_pop(A) {LIST *old=(A); (A)=list_delete(old,old) ; my_free((gptr) old,MYF(MY_FAE)); }
        !            29: 
        !            30: #ifdef __cplusplus
        !            31: }
        !            32: #endif
        !            33: #endif

E-mail: