Logo Search packages:      
Sourcecode: jclassinfo version File versions  Download package

int string_list_contains ( StringList *  list,
const char *  string,
int  flag 
)

Returns whether a given string is in the list.

Parameters:
list The list to search
string The string to look for

Definition at line 347 of file string_list.c.

{
      struct string_node* node;
      int compare;
      
      node = list->head;
      
      while(node != NULL)
      {
            compare = strcmp(node->string, string);
            
            if(compare == 0)
                  return (node->flag & flag);
            else if(compare > 0)
                  return 0;
            
            node = node->next;
      }
      
      return 0;   
}


Generated by  Doxygen 1.6.0   Back to index