File: list.h

package info (click to toggle)
lwip 2.1.2%2Bdfsg1-8%2Bdeb11u1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 7,416 kB
  • sloc: ansic: 89,600; perl: 81; sh: 28; makefile: 18
file content (26 lines) | stat: -rw-r--r-- 514 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26

#ifndef LWIP_LIST_H
#define LWIP_LIST_H

struct elem;

struct list {
  struct elem *first, *last;
  int size, elems;
};

struct elem {
  struct elem *next;
  void *data;
};

struct list *list_new(int size);
int list_push(struct list *list, void *data);
void *list_pop(struct list *list);
void *list_first(struct list *list);
int list_elems(struct list *list);
void list_delete(struct list *list);
int list_remove(struct list *list, void *elem);
void list_map(struct list *list, void (* func)(void *arg));

#endif