GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
vector/Vlib/list.c File Reference
#include <stdlib.h>
#include <grass/Vect.h>
#include <grass/gis.h>
Include dependency graph for vector/Vlib/list.c:

Go to the source code of this file.

Functions

struct ilist * Vect_new_list (void)
 Creates and initializes a struct ilist. More...
 
int Vect_reset_list (struct ilist *list)
 Reset ilist structure. More...
 
int Vect_destroy_list (struct ilist *list)
 Frees all memory associated with a struct ilist, including the struct itself. More...
 
int Vect_list_append (struct ilist *list, int val)
 Append new item to the end of list if not yet present. More...
 
int Vect_list_append_list (struct ilist *alist, struct ilist *blist)
 Append new items to the end of list if not yet present. More...
 
int Vect_list_delete (struct ilist *list, int val)
 Remove a given value (item) from list. More...
 
int Vect_list_delete_list (struct ilist *alist, struct ilist *blist)
 Delete list from existing list. More...
 
int Vect_val_in_list (struct ilist *list, int val)
 Find a given item in the list. More...
 

Function Documentation

int Vect_list_append_list ( struct ilist *  alist,
struct ilist *  blist 
)

Append new items to the end of list if not yet present.

Parameters
[in,out]alistpointer to ilist structure where items will be appended
[in]blistpointer to ilist structure with new items
Returns
0 on success
1 on error

Definition at line 130 of file vector/Vlib/list.c.

References NULL, and Vect_list_append().

int Vect_list_delete ( struct ilist *  list,
int  val 
)

Remove a given value (item) from list.

Parameters
[in,out]listpointer to ilist structure
[in]valto remove
Returns
0 on success
1 on error

Definition at line 152 of file vector/Vlib/list.c.

References NULL.

Referenced by Vect_list_delete_list().

int Vect_list_delete_list ( struct ilist *  alist,
struct ilist *  blist 
)

Delete list from existing list.

Parameters
[in,out]alistpointer to original ilist structure,
[in]blistpointer to ilist structure with items to delete
Returns
0 on success
1 on error

Definition at line 181 of file vector/Vlib/list.c.

References NULL, and Vect_list_delete().

int Vect_reset_list ( struct ilist *  list)
int Vect_val_in_list ( struct ilist *  list,
int  val 
)

Find a given item in the list.

Parameters
[in]listpointer to ilist structure
[in]valvalue of item
Returns
1 if an item is found
0 no found item in the list

Definition at line 203 of file vector/Vlib/list.c.

References NULL.

Referenced by Vect_break_lines_list(), Vect_find_line_list(), Vect_overlay_and(), Vedit_merge_lines(), and Vedit_select_by_query().