Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
strlist.h File Reference
#include <linux/rbtree.h>
#include <stdbool.h>
#include "rblist.h"

Go to the source code of this file.

Data Structures

struct  str_node
 
struct  strlist
 

Macros

#define strlist__for_each(pos, self)   for (pos = strlist__first(self); pos; pos = strlist__next(pos))
 
#define strlist__for_each_safe(pos, n, self)
 

Functions

struct strliststrlist__new (bool dupstr, const char *slist)
 
void strlist__delete (struct strlist *self)
 
void strlist__remove (struct strlist *self, struct str_node *sn)
 
int strlist__load (struct strlist *self, const char *filename)
 
int strlist__add (struct strlist *self, const char *str)
 
struct str_nodestrlist__entry (const struct strlist *self, unsigned int idx)
 
struct str_nodestrlist__find (struct strlist *self, const char *entry)
 
int strlist__parse_list (struct strlist *self, const char *s)
 

Macro Definition Documentation

#define strlist__for_each (   pos,
  self 
)    for (pos = strlist__first(self); pos; pos = strlist__next(pos))

strlist_for_each - iterate over a strlist : the &struct str_node to use as a loop cursor. : the &struct strlist for loop.

Definition at line 64 of file strlist.h.

#define strlist__for_each_safe (   pos,
  n,
  self 
)
Value:
for (pos = strlist__first(self), n = strlist__next(pos); pos;\
pos = n, n = strlist__next(n))

strlist_for_each_safe - iterate over a strlist safe against removal of str_node : the &struct str_node to use as a loop cursor.
: another &struct str_node to use as temporary storage. : the &struct strlist for loop.

Definition at line 74 of file strlist.h.

Function Documentation

int strlist__add ( struct strlist self,
const char str 
)

Definition at line 62 of file strlist.c.

void strlist__delete ( struct strlist self)

Definition at line 156 of file strlist.c.

struct str_node* strlist__entry ( const struct strlist self,
unsigned int  idx 
)
read

Definition at line 162 of file strlist.c.

struct str_node* strlist__find ( struct strlist self,
const char entry 
)
read

Definition at line 99 of file strlist.c.

int strlist__load ( struct strlist self,
const char filename 
)

Definition at line 67 of file strlist.c.

struct strlist* strlist__new ( bool  dupstr,
const char slist 
)
read

Definition at line 135 of file strlist.c.

int strlist__parse_list ( struct strlist self,
const char s 
)

Definition at line 118 of file strlist.c.

void strlist__remove ( struct strlist self,
struct str_node sn 
)

Definition at line 94 of file strlist.c.