Back to index

cell-binutils  2.17cvs20070401
Classes | Defines | Typedefs | Functions
search_list.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


struct  search_list_elem
struct  Search_List


#define PATH_SEP_CHAR   ':'


typedef struct search_list_elem Search_List_Elem


void search_list_append (Search_List *, const char *)

Class Documentation

struct search_list_elem

Definition at line 32 of file search_list.h.

Collaboration diagram for search_list_elem:
Class Members
struct search_list_elem * next
char path
struct Search_List

Definition at line 39 of file search_list.h.

Collaboration diagram for Search_List:
Class Members
struct search_list_elem * head
struct search_list_elem * tail

Define Documentation

#define PATH_SEP_CHAR   ':'

Definition at line 29 of file search_list.h.

Typedef Documentation

Function Documentation

void search_list_append ( Search_List ,
const char *   

Definition at line 28 of file search_list.c.

  Search_List_Elem *new_el;
  const char *beg, *colon;
  unsigned int len;

  colon = paths - 1;
      beg = colon + 1;
      colon = strchr (beg, PATH_SEP_CHAR);

      if (colon)
       len = colon - beg;
       len = strlen (beg);

      new_el = (Search_List_Elem *) xmalloc (sizeof (*new_el) + len);
      memcpy (new_el->path, beg, len);
      new_el->path[len] = '\0';

      /* Append new path at end of list.  */
      new_el->next = 0;

      if (list->tail)
       list->tail->next = new_el;
       list->head = new_el;

      list->tail = new_el;
  while (colon);

Here is the call graph for this function:

Here is the caller graph for this function: