GRASS Programmer's Manual  6.4.2(2012)
vector/vedit/delete.c
Go to the documentation of this file.
00001 
00014 #include <grass/vedit.h>
00015 
00025 int Vedit_delete_lines(struct Map_info *Map, struct ilist *List)
00026 {
00027     int i, line;
00028     int nlines_removed;
00029 
00030     nlines_removed = 0;
00031 
00032     /* delete */
00033     for (i = 0; i < List->n_values; i++) {
00034         line = List->value[i];
00035 
00036         if (Vect_line_alive(Map, line)) {
00037             if (Vect_delete_line(Map, line) < 0) {
00038                 return -1;
00039             }
00040 
00041             G_debug(3, "Vedit_delete_lines(): line=%d", line);
00042             nlines_removed++;
00043         }
00044     }
00045 
00046     return nlines_removed;
00047 }
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines