Blame include/list.h

Packit Service 5e8d2a
/* aide, Advanced Intrusion Detection Environment
Packit Service 5e8d2a
 *
Packit Service 5e8d2a
 * Copyright (C) 1999-2002,2010 Rami Lehti,Pablo Virolainen, Hannes von
Packit Service 5e8d2a
 * Haugwitz
Packit Service 5e8d2a
 * $Header$
Packit Service 5e8d2a
 *
Packit Service 5e8d2a
 * This program is free software; you can redistribute it and/or
Packit Service 5e8d2a
 * modify it under the terms of the GNU General Public License as
Packit Service 5e8d2a
 * published by the Free Software Foundation; either version 2 of the
Packit Service 5e8d2a
 * License, or (at your option) any later version.
Packit Service 5e8d2a
 *
Packit Service 5e8d2a
 * This program is distributed in the hope that it will be useful, but
Packit Service 5e8d2a
 * WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service 5e8d2a
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Packit Service 5e8d2a
 * General Public License for more details.
Packit Service 5e8d2a
 *
Packit Service 5e8d2a
 * You should have received a copy of the GNU General Public License
Packit Service 5e8d2a
 * along with this program; if not, write to the Free Software
Packit Service 5e8d2a
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
Packit Service 5e8d2a
 */
Packit Service 5e8d2a
Packit Service 5e8d2a
#ifndef _LIST_H_INCLUDED
Packit Service 5e8d2a
#define _LIST_H_INCLUDED
Packit Service 5e8d2a
Packit Service 5e8d2a
typedef struct list {
Packit Service 5e8d2a
  struct list* next;
Packit Service 5e8d2a
  struct list* prev;
Packit Service 5e8d2a
Packit Service 5e8d2a
  struct list_header* header;
Packit Service 5e8d2a
Packit Service 5e8d2a
  /*
Packit Service 5e8d2a
  struct list* head;
Packit Service 5e8d2a
  struct list* tail;
Packit Service 5e8d2a
  */
Packit Service 5e8d2a
Packit Service 5e8d2a
  void* data;
Packit Service 5e8d2a
} list;
Packit Service 5e8d2a
Packit Service 5e8d2a
typedef struct list_header{
Packit Service 5e8d2a
  
Packit Service 5e8d2a
  struct list* head;
Packit Service 5e8d2a
  struct list* tail;
Packit Service 5e8d2a
  
Packit Service 5e8d2a
}list_header;
Packit Service 5e8d2a
Packit Service 5e8d2a
list* list_sorted_insert(list* listp, void* data, int (*compare) (const void*, const void*));
Packit Service 5e8d2a
Packit Service 5e8d2a
list* list_append(list* listp,void*data);
Packit Service 5e8d2a
Packit Service 5e8d2a
/*
Packit Service 5e8d2a
Packit Service 5e8d2a
list* new_list_item(void*);
Packit Service 5e8d2a
Packit Service 5e8d2a
*/
Packit Service 5e8d2a
Packit Service 5e8d2a
list* list_delete_item(list* item);
Packit Service 5e8d2a
Packit Service 5e8d2a
#endif /* _DB_LIST_H_INCLUDED */
Packit Service 5e8d2a
Packit Service 5e8d2a