[GRASS-SVN] r29693 - grass/trunk/lib/vector/Vlib

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Jan 13 07:41:21 EST 2008


Author: martinl
Date: 2008-01-13 07:41:21 -0500 (Sun, 13 Jan 2008)
New Revision: 29693

Modified:
   grass/trunk/lib/vector/Vlib/area.c
   grass/trunk/lib/vector/Vlib/array.c
   grass/trunk/lib/vector/Vlib/box.c
   grass/trunk/lib/vector/Vlib/break_polygons.c
   grass/trunk/lib/vector/Vlib/bridges.c
   grass/trunk/lib/vector/Vlib/buffer.c
   grass/trunk/lib/vector/Vlib/build.c
   grass/trunk/lib/vector/Vlib/build_nat.c
   grass/trunk/lib/vector/Vlib/build_ogr.c
   grass/trunk/lib/vector/Vlib/cats.c
   grass/trunk/lib/vector/Vlib/clean_nodes.c
   grass/trunk/lib/vector/Vlib/close.c
   grass/trunk/lib/vector/Vlib/constraint.c
   grass/trunk/lib/vector/Vlib/dangles.c
   grass/trunk/lib/vector/Vlib/dbcolumns.c
   grass/trunk/lib/vector/Vlib/error.c
   grass/trunk/lib/vector/Vlib/field.c
   grass/trunk/lib/vector/Vlib/graph.c
   grass/trunk/lib/vector/Vlib/header.c
   grass/trunk/lib/vector/Vlib/hist.c
   grass/trunk/lib/vector/Vlib/init_head.c
   grass/trunk/lib/vector/Vlib/intersect.c
   grass/trunk/lib/vector/Vlib/legal_vname.c
   grass/trunk/lib/vector/Vlib/level.c
   grass/trunk/lib/vector/Vlib/level_two.c
   grass/trunk/lib/vector/Vlib/line.c
   grass/trunk/lib/vector/Vlib/list.c
   grass/trunk/lib/vector/Vlib/map.c
   grass/trunk/lib/vector/Vlib/net.c
   grass/trunk/lib/vector/Vlib/open.c
   grass/trunk/lib/vector/Vlib/overlay.c
   grass/trunk/lib/vector/Vlib/poly.c
   grass/trunk/lib/vector/Vlib/read.c
   grass/trunk/lib/vector/Vlib/read_nat.c
   grass/trunk/lib/vector/Vlib/read_ogr.c
   grass/trunk/lib/vector/Vlib/remove_areas.c
   grass/trunk/lib/vector/Vlib/remove_duplicates.c
   grass/trunk/lib/vector/Vlib/rewind.c
   grass/trunk/lib/vector/Vlib/select.c
   grass/trunk/lib/vector/Vlib/sindex.c
   grass/trunk/lib/vector/Vlib/snap.c
   grass/trunk/lib/vector/Vlib/tin.c
   grass/trunk/lib/vector/Vlib/type.c
   grass/trunk/lib/vector/Vlib/write.c
Log:
Do not use structural commands (like \fn) in doxygen docs. I18n updated.

Modified: grass/trunk/lib/vector/Vlib/area.c
===================================================================
--- grass/trunk/lib/vector/Vlib/area.c	2008-01-13 12:05:46 UTC (rev 29692)
+++ grass/trunk/lib/vector/Vlib/area.c	2008-01-13 12:41:21 UTC (rev 29693)
@@ -1,32 +1,37 @@
-/*
-****************************************************************************
-*
-* MODULE:       Vector library 
-*   	    	
-* AUTHOR(S):    Original author CERL, probably Dave Gerdes or Mike Higgins.
-*               Update to GRASS 5.7 Radim Blazek and David D. Gray.
-*
-* PURPOSE:      Higher level functions for reading/writing/manipulating vectors.
-*
-* COPYRIGHT:    (C) 2001 by the GRASS Development Team
-*
-*               This program is free software under the GNU General Public
-*   	    	License (>=v2). Read the file COPYING that comes with GRASS
-*   	    	for details.
-*
-*****************************************************************************/
+/*!
+  \file area.c
+  
+  \brief Vector library - area feature related fns
+  
+  Higher level functions for reading/writing/manipulating vectors.
+
+  (C) 2001-2008 by the GRASS Development Team
+  
+  This program is free software under the 
+  GNU General Public License (>=v2). 
+  Read the file COPYING that comes with GRASS
+  for details.
+  
+  \author Original author CERL, probably Dave Gerdes or Mike Higgins.
+  Update to GRASS 5.7 Radim Blazek and David D. Gray.
+  
+  \date 2001-2008
+*/
+
 #include <stdlib.h>
 #include <grass/gis.h>
 #include <grass/Vect.h>
+#include <grass/glocale.h>
 
 /*!
- \fn int Vect_get_area_points (
-		       struct Map_info *Map,
-		       int area,
-		       struct line_pnts *BPoints)
- \brief returns the polygon array of points in BPoints
- \return number of points or -1 on error
- \param Map_info structure, area number, line_pnts structure
+  \brief Returns the polygon array of points in BPoints
+
+  \param Map vector map
+  \param area area id
+  \param[out] BPoints points array
+
+  \return number of points
+  \return -1 on error
 */
 int 
 Vect_get_area_points (
@@ -47,7 +52,7 @@
   Area = Plus->Area[area];
 
   if ( Area == NULL ) { /* dead area */
-      G_warning ("Attempt to read points of nonexisting area" ); 
+      G_warning (_("Attempt to read points of nonexisting area")); 
       return -1;      /* error , because we should not read dead areas */
   }
   
@@ -84,13 +89,13 @@
 }
 
 /*!
- \fn int Vect_get_isle_points (
-		       struct Map_info *Map,
-		       int isle,
-		       struct line_pnts *BPoints)
- \brief returns the polygon array of points in BPoints
- \return number of points or -1 on error
- \param Map_info structure, island number, line_pnts structure
+  \brief Returns the polygon array of points in BPoints
+
+  \param Map vector map
+  \param isle island id
+  \param[out] BPoints points array
+
+  \return number of points or -1 on error
 */
 int 
 Vect_get_isle_points (
@@ -123,7 +128,7 @@
       G_debug ( 3, "  append line(%d) = %d", i, line );	
 
       if (0 > Vect_read_line (Map, Points, NULL, aline)) {
-          G_fatal_error ( "Cannot read line %d",  aline );
+          G_fatal_error (_("Unable to read line %d"),  aline );
       }
       
       G_debug ( 3, "  line n_points = %d", Points->n_points );	
@@ -143,12 +148,13 @@
 }
 
 /*!
- \fn int Vect_get_area_centroid (
-		       struct Map_info *Map,
-		       int area )
- \brief returns centroid number of area
- \return centroid number of area or 0
- \param Map_info structure, area number
+  \brief Returns centroid number of area
+
+  \param Map vector map
+  \param area area id
+
+  \return centroid number of area
+  \return 0 if no centroid found
 */
 int 
 Vect_get_area_centroid (
@@ -163,19 +169,20 @@
   Plus = &(Map->plus);
   Area = Plus->Area[area];
 
-  if ( Area == NULL ) G_fatal_error ( "Attempt to read topo for dead area (%d)", area);
+  if ( Area == NULL )
+      G_fatal_error (_("Attempt to read topo for dead area (%d)"), area);
   
   return ( Area->centroid );
 }
 
 /*!
- \fn int Vect_get_area_boundaries (
-		       struct Map_info *Map,
-		       int area,
-		       struct ilist *List )
- \brief creates list of boundaries for area
- \return number of boundaries
- \param Map_info structure, area number, List pointer to list
+  \brief Creates list of boundaries for area
+
+  \param Map vector map
+  \param area area id
+  \param List pointer to list of boundaries
+
+  \return number of boundaries
 */
 int 
 Vect_get_area_boundaries (
@@ -194,7 +201,8 @@
   Plus = &(Map->plus);
   Area = Plus->Area[area];
 
-  if ( Area == NULL ) G_fatal_error ( "Attempt to read topo for dead area (%d)", area);
+  if ( Area == NULL )
+      G_fatal_error (_("Attempt to read topo for dead area (%d)"), area);
 
   for (i = 0; i < Area->n_lines; i++) {
       line = Area->lines[i];
@@ -205,15 +213,13 @@
 }
 
 /*!
- \fn int Vect_get_isle_boundaries (
-		       struct Map_info *Map,
-		       int isle,
-		       struct ilist *List )
- \brief creates list of boundaries for isle
- \return number of boundaries
- \param Map vector map
- \param isle island number
- \param List pointer to list where boundaries are stored
+  \brief Creates list of boundaries for isle
+
+  \param Map vector map
+  \param isle island number
+  \param List pointer to list where boundaries are stored
+
+  \return number of boundaries
 */
 int 
 Vect_get_isle_boundaries (
@@ -243,12 +249,13 @@
 }
 
 /*!
- \fn int Vect_get_area_num_isles (
-		       struct Map_info *Map,
-		       int area )
- \brief returns number of isles for area
- \return number of isles for area or 0
- \param Map_info structure, area number
+  \brief Returns number of isles for area
+  
+  \param Map vector map
+  \param area area id
+
+  \return number of isles for area
+  \return 0 if area not found
 */
 int 
 Vect_get_area_num_isles (
@@ -263,7 +270,8 @@
   Plus = &(Map->plus);
   Area = Plus->Area[area];
   
-  if ( Area == NULL ) G_fatal_error ( "Attempt to read topo for dead area (%d)", area);
+  if ( Area == NULL )
+      G_fatal_error (_("Attempt to read topo for dead area (%d)"), area);
   
   G_debug ( 3, "  n_isles = %d", Area->n_isles );	
   
@@ -272,13 +280,14 @@
 }
 
 /*!
- \fn int Vect_get_area_isle (
-		       struct Map_info *Map,
-		       int area,
-                       int isle)
- \brief returns isle for area
- \return isles for area or 0
- \param Map_info structure, area number, island number
+  \brief Returns isle for area
+
+  \param Map vector map
+  \param area area id
+  \param isle isle id
+  
+  \return isles for area
+  \return 0 if no isle found
 */
 int 
 Vect_get_area_isle (
@@ -294,7 +303,8 @@
   Plus = &(Map->plus);
   Area = Plus->Area[area];
   
-  if ( Area == NULL ) G_fatal_error ( "Attempt to read topo for dead area (%d)", area);
+  if ( Area == NULL )
+      G_fatal_error (_("Attempt to read topo for dead area (%d)"), area);
 
   G_debug ( 3, "  -> isle = %d", Area->isles[isle] );	
   
@@ -302,11 +312,13 @@
 }
 
 /*!
- \fn int Vect_get_isle_area ( struct Map_info *Map, int isle)
- \brief returns area for isle
- \return  area or 0
- \param Map vector
- \isle island number
+  \brief Returns area for isle
+
+  \param Map vector
+  \param isle island number
+
+  \return area id
+  \return 0 area not found
 */
 int 
 Vect_get_isle_area ( struct Map_info *Map, int isle)
@@ -319,7 +331,8 @@
   Plus = &(Map->plus);
   Isle = Plus->Isle[isle];
   
-  if ( Isle == NULL ) G_fatal_error ( "Attempt to read topo for dead isle (%d)", isle);
+  if ( Isle == NULL )
+      G_fatal_error (_("Attempt to read topo for dead isle (%d)"), isle);
 
   G_debug ( 3, "  -> area = %d", Isle->area );	
   
@@ -328,11 +341,11 @@
 
 
 /*!
- *  \fn double Vect_area_perimeter ( struct line_pnts *Points )
- *  \brief calculate area perimeter
- *  \return area perimeter
- *  \param line_pnts * structure
- *  
+  \brief Calculate area perimeter
+
+  \param Points list of points defining area boundary
+
+  \return area perimeter
 */
 double 
 Vect_area_perimeter ( struct line_pnts *Points )
@@ -342,13 +355,14 @@
 
 
 /*!
- \fn int Vect_point_in_area (
-		       struct Map_info *Map,
-		       int area,
-		       double x, double y)
- \brief returns 1 if point is in area
- \return 1 if point is in area 0 if not
- \param Map_info structure, area number, xy coordinate of point
+  \brief Returns 1 if point is in area
+
+  \param Map vector map
+  \param area area id
+  \param x,y point coordinates
+
+  \return 1 if point is in area
+  \return 0 if not 
 */
 int 
 Vect_point_in_area (
@@ -379,13 +393,12 @@
 }
 
 /*!
- \fn double Vect_get_area_area (
-		       struct Map_info *Map,
-		       int area)
- \brief returns area of area without areas of isles
- \return area of area without areas of isles
- \param Map_info structure
- \param area number
+  \brief Returns area of area without areas of isles
+
+  \param Map vector map
+  \param area area id
+
+  \return area of area without areas of isles
 */
 double 
 Vect_get_area_area (
@@ -427,11 +440,14 @@
 }
 
 /*!
-\brief Get area categories
-\param vmap: Map input
-\param varea: area number
-\return 0 OK centroid found (but may be without categories)
-\return 1 no centroid found
+  \brief Get area categories
+
+  \param Map vector map
+  \param area area id
+  \param[out] Cats list of categories
+
+  \return 0 OK centroid found (but may be without categories)
+  \return 1 no centroid found
 */
 int
 Vect_get_area_cats ( struct Map_info *Map, int area, struct line_cats *Cats ) 
@@ -452,11 +468,14 @@
 }
 
 /*!
-\brief Find FIRST category of given field and area
-\param vmap: Map input
-\param varea: area number
-\return first found category of given field
-\return -1 no centroid or no category found
+  \brief Find FIRST category of given field and area
+
+  \param Map vector map
+  \param area area id
+  \param field layer number
+
+  \return first found category of given field
+  \return -1 no centroid or no category found
 */
 int
 Vect_get_area_cat ( struct Map_info *Map, int area, int field ) 
@@ -481,4 +500,3 @@
      
     return -1;
 }
-

Modified: grass/trunk/lib/vector/Vlib/array.c
===================================================================
--- grass/trunk/lib/vector/Vlib/array.c	2008-01-13 12:05:46 UTC (rev 29692)
+++ grass/trunk/lib/vector/Vlib/array.c	2008-01-13 12:41:21 UTC (rev 29693)
@@ -1,18 +1,22 @@
-/*****************************************************************************
-*
-* MODULE:       Vector library 
-*   	    	
-* AUTHOR(S):    Radim Blazek
-*
-* PURPOSE:      Higher level functions for reading/writing/manipulating vectors.
-*
-* COPYRIGHT:    (C) 2001 by the GRASS Development Team
-*
-*               This program is free software under the GNU General Public
-*   	    	License (>=v2). Read the file COPYING that comes with GRASS
-*   	    	for details.
-*
-*****************************************************************************/
+/*!
+  \file array.c
+  
+  \brief Vector library - array structure
+  
+  Higher level functions for reading/writing/manipulating vectors.
+
+  (C) 2001-2008 by the GRASS Development Team
+  
+  This program is free software under the 
+  GNU General Public License (>=v2). 
+  Read the file COPYING that comes with GRASS
+  for details.
+  
+  \author Radim Blazek
+  
+  \date 2001-2008
+*/
+
 #include <stdlib.h>
 #include <grass/gis.h>
 #include <grass/dbmi.h>
@@ -26,12 +30,15 @@
 
 
 /*!
-  \fn VARRAY *Vect_new_varray (int size)
   \brief Create new VARRAY and allocate space for given number of items.
+
   Space allocated is 'size + 1' so that lines are accessed by line id.
   Array values are set to 0.
-  Returns : pointer to new VARRAY
-            NULL if failed
+  
+  \param size size of array
+
+  \return pointer to new VARRAY
+  \return NULL if failed
  */
 
 VARRAY *
@@ -55,17 +62,23 @@
 }
 
 /*!
-  \fn int Vect_set_varray_from_cat_string ( struct Map_info *Map, int field, char *cstring,
-                                int type, int value, VARRAY *varray )
-  \brief Set values in 'varray' to 'value' if category of object of given type is in 
-  'cstring' (string representing category list like: '1,3,5-7').
-  'type' may be either: GV_AREA
-                    or: GV_POINT | GV_LINE | GV_BOUNDARY | GV_CENTROID  
+  \brief Set values in 'varray' to 'value'.
 
+  If category of object of given type is in 'cstring' (string
+  representing category list like: '1,3,5-7').  'type' may be either:
+  GV_AREA or: GV_POINT | GV_LINE | GV_BOUNDARY | GV_CENTROID
+
   Array is not reset to zero before, but old values (if any > 0) are overwritten.
 
-  Return: number of items set
-          -1 on error
+  \param Map vector map
+  \param field layer number
+  \param cstring pointer to string with categories
+  \param type feature type
+  \param value value to set up
+  \param[in,out] varray varray structure to modify
+
+  \return number of items set
+  \return -1 on error
  */
 int 
 Vect_set_varray_from_cat_string ( struct Map_info *Map, int field, char *cstring,
@@ -93,17 +106,23 @@
 }
 
 /*!
-  \fn int Vect_set_varray_from_cat_list ( struct Map_info *Map, int field, struct cat_list *clist,
-                                int type, int value, VARRAY *varray )
-  \brief
-   Set values in 'varray' to 'value' if category of object of given type is in 'clist' (category list).
-  'type' may be either: GV_AREA
-                    or: GV_POINT | GV_LINE | GV_BOUNDARY | GV_CENTROID  
+  \brief Set values in 'varray' to 'value'
+
+  If category of object of given type is in 'clist' (category list).
+  'type' may be either: GV_AREA or: GV_POINT | GV_LINE | GV_BOUNDARY |
+  GV_CENTROID
 		    
   Array is not reset to zero before, but old values (if any > 0) are overwritten.
 
-  Return: number of items set
-          -1 on error
+  \param Map vector map
+  \param field layer number
+  \param clist list of categories
+  \param type feature type
+  \param value value to set up
+  \param[in,out] varray varray structure to modify
+  
+  \return number of items set
+  \return -1 on error
  */
 int 
 Vect_set_varray_from_cat_list ( struct Map_info *Map, int field, struct cat_list *clist,
@@ -118,7 +137,7 @@
     
     /* Check type */
     if ( (type & GV_AREA) && (type & (GV_POINTS | GV_LINES)) ) {
-	G_warning(_("Mixed area and other type requested for vector array."));
+	G_warning(_("Mixed area and other type requested for vector array"));
 	return 0;
     }
     
@@ -128,7 +147,7 @@
 	n = Vect_get_num_areas (Map);
 	
 	if ( n > varray->size ) { /* not enough space */
-	    G_warning(_("Not enough space in vector array."));
+	    G_warning(_("Not enough space in vector array"));
 	    return 0;
 	}
 	    
@@ -148,7 +167,7 @@
 	n = Vect_get_num_lines (Map);
 	
 	if ( n > varray->size ) { /* not enough space */
-	    G_warning(_("Not enough space in vector array."));
+	    G_warning(_("Not enough space in vector array"));
 	    return 0;
 	}
 	    
@@ -196,24 +215,31 @@
 }
 
 /*!
-  \fn int Vect_set_varray_from_db ( struct Map_info *Map, int field, char *where,
-                                int type, int value, VARRAY *varray )
-  \brief Set values in 'varray' to 'value' if category of object of given type is in 
-  categories selected from DB based on where statement (given without where).
-  'type' may be either: GV_AREA
-                    or: GV_POINT | GV_LINE | GV_BOUNDARY | GV_CENTROID  
+  \brief Set values in 'varray' to 'value'.
 
-  Array is not reset to zero before, but old values (if any > 0) are overwritten.
+  if category of object of given type is in categories selected from
+  DB based on where statement (given without where).  'type' may be
+  either: GV_AREA or: GV_POINT | GV_LINE | GV_BOUNDARY | GV_CENTROID
 
-  Return: number of items set
-          -1 on error
+  Array is not reset to zero before, but old values (if any > 0) are
+  overwritten.
+
+  \param Map vector map
+  \param field layer number
+  \param where where statement
+  \param type feature type
+  \param value value to set up
+  \param[in,out] varray varray structure to modify
+  
+  \return number of items set
+  \return -1 on error
  */
 int 
 Vect_set_varray_from_db ( struct Map_info *Map, int field, char *where,
                                 int type, int value, VARRAY *varray )
 {
     int i, n, c, centr, cat, *cats;
-    size_t ncats;
+    int ncats;
     int ni = 0; /* number of items set */
     int ltype; /* line type */
     struct line_cats *Cats;
@@ -226,7 +252,7 @@
 
     /* Check type */
     if ( (type & GV_AREA) && (type & (GV_POINTS | GV_LINES)) ) {
-	G_warning(_("Mixed area and other type requested for vector array."));
+	G_warning(_("Mixed area and other type requested for vector array"));
 	return 0;
     }
     
@@ -235,13 +261,14 @@
     /* Select categories from DB to array */
     Fi = Vect_get_field ( Map, field);
     if ( Fi == NULL ) {
-	G_warning(_("Cannot get field info"));
+      G_warning(_("Database connection not defined for layer %d"), field);
 	return -1;
     }
     
     driver = db_start_driver_open_database ( Fi->driver, Fi->database );
     if ( driver == NULL ) {
-	G_warning(_("Cannot open database"));
+	G_warning(_("Unable to open database <%s> by driver <%s>"),
+		  Fi->database, Fi->driver);
 	return -1;
     }
 
@@ -250,7 +277,8 @@
     db_close_database_shutdown_driver ( driver );
 
     if(ncats == -1) {
-	G_warning(_("Could not select from table/column"));
+	G_warning(_("Unable to select record from table <%s> (key %s, where %s)"),
+		  Fi->table, Fi->key, where);
 	return -1;
     }
 
@@ -258,7 +286,7 @@
 	n = Vect_get_num_areas (Map);
 	
 	if ( n > varray->size ) { /* not enough space */
-	    G_warning(_("Not enough space in vector array."));
+	    G_warning(_("Not enough space in vector array"));
 	    return 0;
 	}
 	    
@@ -288,7 +316,7 @@
 	n = Vect_get_num_lines (Map);
 	
 	if ( n > varray->size ) { /* not enough space */
-	    G_warning(_("Not enough space in vector array."));
+	    G_warning(_("Not enough space in vector array"));
 	    return 0;
 	}
 	    
@@ -321,4 +349,3 @@
 
     return ni;
 }
-

Modified: grass/trunk/lib/vector/Vlib/box.c
===================================================================
--- grass/trunk/lib/vector/Vlib/box.c	2008-01-13 12:05:46 UTC (rev 29692)
+++ grass/trunk/lib/vector/Vlib/box.c	2008-01-13 12:41:21 UTC (rev 29693)
@@ -1,28 +1,34 @@
-/*
-****************************************************************************
-*
-* MODULE:       Vector library 
-*   	    	
-* AUTHOR(S):    Radim Blazek
-*
-* PURPOSE:      Higher level functions for reading/writing/manipulating vectors.
-*
-* COPYRIGHT:    (C) 2001 by the GRASS Development Team
-*
-*               This program is free software under the GNU General Public
-*   	    	License (>=v2). Read the file COPYING that comes with GRASS
-*   	    	for details.
-*
-*****************************************************************************/
+/*!
+  \file array.c
+  
+  \brief Vector library - bounding box related fns
+  
+  Higher level functions for reading/writing/manipulating vectors.
+
+  (C) 2001-2008 by the GRASS Development Team
+  
+  This program is free software under the 
+  GNU General Public License (>=v2). 
+  Read the file COPYING that comes with GRASS
+  for details.
+  
+  \author Radim Blazek
+  
+  \date 2001-2008
+*/
+
 #include <stdlib.h>
 #include <grass/gis.h>
 #include <grass/Vect.h>
 
 /*!
- \fn int Vect_point_in_box (double x, double y, double z, BOUND_BOX *Box)
- \brief tests for point in box
- \return 1 point is in box, 0 point is not in box
- \param xyz coordinates, boundary box
+  \brief Tests for point in box
+
+  \param x,y,z coordinates
+  \param Box boundary box
+
+  \return 1 point is in box
+  \return 0 point is not in box
 */
 int 
 Vect_point_in_box (double x, double y, double z, BOUND_BOX *Box)
@@ -39,10 +45,13 @@
 }
 
 /*!
- \fn int Vect_box_overlap (BOUND_BOX *A, BOUND_BOX *B)
- \brief tests for overlap of two boxes
- \return 1 boxes overlap, 0 boxes do not overlap
- \param boundary box A, boundary box B
+  \brief Tests for overlap of two boxes
+  
+  \param A boundary box A
+  \param B boundary box B
+
+  \return 1 boxes overlap
+  \return 0 boxes do not overlap
 */
 int 
 Vect_box_overlap (BOUND_BOX *A, BOUND_BOX *B)
@@ -59,10 +68,12 @@
 }
 
 /*!
- \fn int Vect_box_copy (BOUND_BOX *A, BOUND_BOX *B)
- \brief copy box B to box A
- \return 1
- \param boundary box1, boundary box2
+  \brief Copy box B to box A
+
+  \param A boundary A
+  \param B boundary B
+
+  \return 1
 */
 int 
 Vect_box_copy (BOUND_BOX *A, BOUND_BOX *B)
@@ -79,10 +90,12 @@
 }
 
 /*!
- \fn int Vect_box_extend (BOUND_BOX *A, BOUND_BOX *B)
- \brief extend box A by box B
- \return 1
- \param boundary box1, boundary box2
+  \brief Extend box A by box B
+
+  \param A boundary A
+  \param B boundary B
+
+  \return 1
 */
 int 
 Vect_box_extend (BOUND_BOX *A, BOUND_BOX *B)
@@ -100,8 +113,7 @@
 
 
 /*!
- * \fn int Vect_box_clip (double *x, double *y, double *c_x, double *c_y, BOUND_BOX *Box)
- * \brief clip coordinates to box, if necessary, lines extending outside of a box.
+ * \brief Clip coordinates to box, if necessary, lines extending outside of a box.
  *
  * A line represented by the coordinates <b>x, y</b> and <b>c_x, c_y</b> is clipped to
  * the window defined by <b>s</b> (south), <b>n</b> (north), <b>w</b>
@@ -116,12 +128,12 @@
  * <b>e.</b> The <b>y</b> and <b>c_y</b> values returned lie between 
  * <b>s</b> and <b>n.</b>
  *
- *  \param x
- *  \param y
- *  \param c_x
- *  \param c_y
- *  \param boundary box
- *  \return 1 if any clipping occured, 0 otherwise
+ *  \param x, y coordinates (w, e)
+ *  \param c_x,c_y coordinates (s, n)
+ *  \param Box boundary box
+ *
+ *  \return 1 if any clipping occured
+ *  \return 0 otherwise
  */
 
 int
@@ -194,10 +206,14 @@
 
 
 /*!
- \fn int Vect_get_line_box (struct Map_info *Map, int line, BOUND_BOX *Box )
- \brief get line number in boundary box ??
- \return 1 on success, 0 line is dead
- \param Map_info structure, line number, boundary box
+  \brief Get boundary box of line
+
+  \param Map vector map
+  \param line line id
+  \param[out] Box bounding box
+
+  \return 1 on success
+  \return 0 line is dead
 */
 int 
 Vect_get_line_box (struct Map_info *Map, int line, BOUND_BOX *Box )
@@ -229,10 +245,14 @@
 }
 
 /*!
- \fn int Vect_get_area_box (struct Map_info *Map, int area, BOUND_BOX *Box )
- \brief get area number in boundary box ?
- \return 1 on success, 0 area is dead
- \param Map_info structure, area number, boundary box
+  \brief Get boundary box of area
+
+  \param Map vector map
+  \param area area id
+  \param[out] Box bounding box
+
+  \return 1 on success
+  \return 0 area is dead
 */
 int 
 Vect_get_area_box (struct Map_info *Map, int area, BOUND_BOX *Box )
@@ -264,10 +284,14 @@
 }
 
 /*!
- \fn int Vect_get_isle_box (struct Map_info *Map, int isle, BOUND_BOX *Box )
- \brief get isle number in boundary box ?
- \return 1 on success, 0 isle is dead
- \param Map_info structure, isle number, boundary box
+  \brief Get boundary box of isle
+  
+  \param Map vector map
+  \param isle isle id
+  \param[out] Box bounding box
+
+  \return 1 on success
+  \return 0 isle is dead
 */
 int 
 Vect_get_isle_box (struct Map_info *Map, int isle, BOUND_BOX *Box )
@@ -299,10 +323,12 @@
 }
 
 /*!
- \fn int Vect_get_map_box (struct Map_info *Map, BOUND_BOX *Box )
- \brief falls map into boundary box ???
- \return 1 on success, 0 on error
- \param Map_info structure, boundary box
+  \brief Get boundary box of map
+
+  \param Map vector map
+  \param[out] Box bouding box
+
+  \return 1 on success, 0 on error
 */
 int 
 Vect_get_map_box (struct Map_info *Map, BOUND_BOX *Box )
@@ -323,10 +349,12 @@
 
 
 /*!
- \fn int Vect_region_box (struct Cell_head *Window, BOUND_BOX *Box )
- \brief copy region Window to Box
- \return 1 on success, 0 on error
- \param region structure, boundary box
+  \brief Copy region Window to Box
+
+  \param Window region structure (raster-based)
+  \param[out] Box boundary box (vector-based)
+
+  \return 1 on success, 0 on error
 */
 int 
 Vect_region_box ( struct Cell_head *Window, BOUND_BOX *Box )

Modified: grass/trunk/lib/vector/Vlib/break_polygons.c
===================================================================
--- grass/trunk/lib/vector/Vlib/break_polygons.c	2008-01-13 12:05:46 UTC (rev 29692)
+++ grass/trunk/lib/vector/Vlib/break_polygons.c	2008-01-13 12:41:21 UTC (rev 29693)
@@ -1,23 +1,27 @@
-/* **************************************************************
- * 
- * MODULE:       vector library
- * 
- * AUTHOR(S):    Radim Blazek
- *               
- * PURPOSE:      Clean lines
- *               
- * COPYRIGHT:    (C) 2001 by the GRASS Development Team
- *
- *               This program is free software under the 
- *               GNU General Public License (>=v2). 
- *               Read the file COPYING that comes with GRASS
- *               for details.
- *
- **************************************************************/
+/*!
+  \file break_polygons.c
+  
+  \brief Vector library - clean geometry (break polygons)
+  
+  Higher level functions for reading/writing/manipulating vectors.
+
+  (C) 2001-2008 by the GRASS Development Team
+  
+  This program is free software under the 
+  GNU General Public License (>=v2). 
+  Read the file COPYING that comes with GRASS
+  for details.
+  
+  \author Radim Blazek
+  
+  \date 2001-2008
+*/
+
 #include <stdlib.h> 
 #include <math.h>
 #include <grass/gis.h>
 #include <grass/Vect.h>
+#include <grass/glocale.h>
 
 typedef struct {
     double x, y;
@@ -36,22 +40,22 @@
 }
 
 /*!
- \fn void Vect_break_polygons ( struct Map_info *Map, int type, struct Map_info *Err, FILE *msgout)
- \brief Break polygons in vector map.
+  \brief Break polygons in vector map.
+  
+  Breaks lines specified by type in vector map. Points at intersections may be optionaly 
+  written to error map. Input map must be opened on level 2 for update at least on GV_BUILD_BASE.
+  
+  Function is optimized for closed polygons rigs (e.g. imported from OGR) but with clean geometry -
+  adjacent polygons mostly have identical boundary. Function creates database of ALL points
+  in the map, and then is looking for those where polygons should be broken. 
+  Lines may be broken only at points existing in input map! 
+  
+  \param Map input map where polygons will be broken
+  \param type type of line to be broken
+  \param Err vector map where points at intersections will be written or NULL
+  \param msgout file pointer where messages will be written or NULL
 
- Breaks lines specified by type in vector map. Points at intersections may be optionaly 
- written to error map. Input map must be opened on level 2 for update at least on GV_BUILD_BASE.
- 
- Function is optimized for closed polygons rigs (e.g. imported from OGR) but with clean geometry -
- adjacent polygons mostly have identical boundary. Function creates database of ALL points
- in the map, and then is looking for those where polygons should be broken. 
- Lines may be broken only at points existing in input map! 
-
- \param Map input map where polygons will be broken
- \param type type of line to be broken
- \param Err vector map where points at intersections will be written or NULL
- \param msgout file pointer where messages will be written or NULL
- \return
+  \return
 */
 void 
 Vect_break_polygons ( struct Map_info *Map, int type, struct Map_info *Err, FILE *msgout )
@@ -184,24 +188,24 @@
             }
 	}
 	if ( msgout && printed > 5000 ) {
-	    fprintf (msgout, "\rRegistering points ... %d", npoints - 1); 
+	    fprintf (msgout, "\r%s %d", _("Registering points"), npoints - 1); 
 	    fflush ( msgout );
 	    printed = 0;
 	}
 	printed++;
     }
     if ( msgout ) {
-	fprintf (msgout, "\rRegistering points ... %d", npoints - 1 ); 
-	fprintf ( msgout, "\n" ); 
-	fprintf ( msgout, "All points (vertices): %5d\n", nallpoints ); 
-	fprintf ( msgout, "Registered points (unique coordinates): %5d\n", npoints - 1 ); 
-	fprintf ( msgout, "Points marked for break: %5d\n", nmarks ); 
+	fprintf (msgout, "\r%s %d", _("Registering points"), npoints - 1 ); 
+	fprintf (msgout, "\n" ); 
+	fprintf (msgout, "%s: %5d\n", _("All points (vertices)"), nallpoints ); 
+	fprintf (msgout, "%s: %5d\n", _("Registered points (unique coordinates)"), npoints - 1 ); 
+	fprintf (msgout, "%s: %5d\n", _("Points marked for break"), nmarks ); 
     }
 
     /* G_sleep (10); */
     
     nbreaks = 0;
-    if ( msgout ) fprintf (msgout, "Breaks: %5d", nbreaks ); 
+    if ( msgout ) fprintf (msgout, "%s: %5d", _("Breaks"), nbreaks ); 
     printed = 0;
 
     /* Second loop through lines (existing when loop is started, no need to process lines written again)
@@ -265,7 +269,7 @@
 	    }
 		
 	    if ( msgout && printed > 1000 ) {
-		fprintf ( msgout, "\rBreaks: %5d", nbreaks ); 
+		fprintf ( msgout, "\r%s: %5d", _("Breaks"), nbreaks ); 
 		fflush ( msgout );
 		printed = 0;
 	    }
@@ -285,7 +289,7 @@
     }
 
     if ( msgout )
-	fprintf ( msgout, "\rBreaks: %5d", nbreaks ); 
+	fprintf ( msgout, "\r%s: %5d", _("Breaks"), nbreaks ); 
 
     /* Write points on breaks */
     if ( Err ) {
@@ -304,4 +308,3 @@
     G_free ( XPnts );
     RTreeDestroyNode ( RTree);
 }
-

Modified: grass/trunk/lib/vector/Vlib/bridges.c
===================================================================
--- grass/trunk/lib/vector/Vlib/bridges.c	2008-01-13 12:05:46 UTC (rev 29692)
+++ grass/trunk/lib/vector/Vlib/bridges.c	2008-01-13 12:41:21 UTC (rev 29693)
@@ -1,29 +1,32 @@
-/***************************************************************
- *
- * MODULE:       vector library
- * 
- * AUTHOR(S):    Radim Blazek
- *               
- * PURPOSE:      Clean lines
- *               
- * COPYRIGHT:    (C) 2001 by the GRASS Development Team
- *
- *               This program is free software under the 
- *               GNU General Public License (>=v2). 
- *               Read the file COPYING that comes with GRASS
- *               for details.
- *
- **************************************************************/
+/*!
+  \file bridges.c
+  
+  \brief Vector library - clean geometry (bridges)
+  
+  Higher level functions for reading/writing/manipulating vectors.
+
+  (C) 2001-2008 by the GRASS Development Team
+  
+  This program is free software under the 
+  GNU General Public License (>=v2). 
+  Read the file COPYING that comes with GRASS
+  for details.
+  
+  \author Radim Blazek
+  
+  \date 2001-2008
+*/
+
 #include <stdlib.h> 
 #include <grass/gis.h>
 #include <grass/Vect.h>
+#include <grass/glocale.h>
 
-void
+static void
 remove_bridges ( struct Map_info *Map, int chtype, struct Map_info *Err, FILE *msgout );
     
 /*!
- \fn void Vect_remove_bridges ( struct Map_info *Map, struct Map_info *Err, FILE *msgout)
- \brief Remove bridges from vector map.
+  \brief Remove bridges from vector map.
 
   Remove bridges (type boundary) connecting areas to islands or 2 islands.
   Islands and areas must be already clean, i.e. without dangles.
@@ -31,9 +34,11 @@
   Optionaly deleted bridges are written to error map. 
   Input map must be opened on level 2 for update at least on level GV_BUILD_BASE
    
- \param Map input map where bridges are deleted
- \param Err vector map where deleted bridges are written or NULL
- \param msgout file pointer where messages will be written or NULL
+  \param Map input map where bridges are deleted
+  \param Err vector map where deleted bridges are written or NULL
+  \param msgout file pointer where messages will be written or NULL
+  
+  \return
 */
 
 void
@@ -43,8 +48,7 @@
 }
 
 /*!
- \fn void Vect_remove_bridges ( struct Map_info *Map, struct Map_info *Err, FILE *msgout)
- \brief Change type of bridges in vector map.
+  \brief Change type of bridges in vector map.
 
   Change the type of bridges (type boundary) connecting areas to islands or 2 islands.
   Islands and areas must be already clean, i.e. without dangles.
@@ -52,9 +56,11 @@
   Optionaly changed bridges are written to error map. 
   Input map must be opened on level 2 for update at least on level GV_BUILD_BASE.
    
- \param Map input map where bridges are changed
- \param Err vector map where changed bridges are written or NULL
- \param msgout file pointer where messages will be written or NULL
+  \param Map input map where bridges are changed
+  \param Err vector map where changed bridges are written or NULL
+  \param msgout file pointer where messages will be written or NULL
+
+  \return
 */
 
 void
@@ -75,7 +81,6 @@
 	      traversed from other side it is a bridge.
               
 	      List of all lines in chain is created during the cycle.
-
 */
 void
 remove_bridges ( struct Map_info *Map, int chtype, struct Map_info *Err, FILE *msgout )
@@ -109,8 +114,8 @@
 
     G_debug (1, "nlines =  %d", nlines );
 
-    if ( msgout ) fprintf (msgout, "Removed bridges: %5d  %s: %5d",
-                                    bridges_removed, lmsg, lines_removed );
+    if ( msgout ) fprintf (msgout, "%s: %5d  %s: %5d",
+			   _("Removed bridges"), bridges_removed, lmsg, lines_removed );
     
     for ( line = 1; line <= nlines; line++ ){ 
 	if ( !Vect_line_alive ( Map, line ) ) continue;
@@ -182,16 +187,14 @@
 	}
 
 	if ( msgout ) {
-	    fprintf (msgout, "\rRemoved bridges: %5d  %s: %5d",
-					bridges_removed, lmsg, lines_removed );
+	    fprintf (msgout, "\r%s: %5d  %s: %5d",
+		     _("Removed bridges"), bridges_removed, lmsg, lines_removed );
 	    fflush ( msgout );
 	}
     }
     if ( msgout ) {
-	fprintf (msgout, "\rRemoved bridges: %5d  %s: %5d",
-				    bridges_removed, lmsg, lines_removed );
+	fprintf (msgout, "\r%s: %5d  %s: %5d",
+		 _("Removed bridges"), bridges_removed, lmsg, lines_removed );
 	fprintf (msgout, "\n" );
     }
 }
-
-

Modified: grass/trunk/lib/vector/Vlib/buffer.c
===================================================================
--- grass/trunk/lib/vector/Vlib/buffer.c	2008-01-13 12:05:46 UTC (rev 29692)
+++ grass/trunk/lib/vector/Vlib/buffer.c	2008-01-13 12:41:21 UTC (rev 29693)
@@ -1,9 +1,22 @@
-/* Functions: nearest, adjust_line, parallel_line
-**
-** Author: Radim Blazek Feb 2000
-**
-**
+/*!
+  \file buffer.c
+  
+  \brief Vector library - nearest, adjust_line, parallel_line
+  
+  Higher level functions for reading/writing/manipulating vectors.
+
+  (C) 2001-2008 by the GRASS Development Team
+  
+  This program is free software under the 
+  GNU General Public License (>=v2). 
+  Read the file COPYING that comes with GRASS
+  for details.
+  
+  \author Radim Blazek
+  
+  \date 2001-2008
 */
+
 #include <stdlib.h>
 #include <math.h>
 #include <grass/Vect.h>
@@ -35,7 +48,7 @@
 **         -1 found overlap
 **          0 not found
 */
-int find_cross ( struct line_pnts *Points, int s1, int s2, int s3, int s4,  int *s5, int *s6 )
+static int find_cross ( struct line_pnts *Points, int s1, int s2, int s3, int s4,  int *s5, int *s6 )
 {
     int i, j, np, ret;
     double *x, *y;
@@ -79,7 +92,7 @@
 ** returns:  1 in buffer
 **           0 not  in buffer
 */
-int point_in_buf ( struct line_pnts *Points, double px, double py, double d )
+static int point_in_buf ( struct line_pnts *Points, double px, double py, double d )
 {
     int i, np;
     double sd;
@@ -114,7 +127,7 @@
 **        than I am should write paralle_line + clean_parallel
 **        better;    RB March 2000
 */
-void clean_parallel ( struct line_pnts *Points, struct line_pnts *origPoints, double d , int rm_end )
+static void clean_parallel ( struct line_pnts *Points, struct line_pnts *origPoints, double d , int rm_end )
 {
     int i, j, np, npn, sa, sb;
     int sa_max = 0;
@@ -238,7 +251,7 @@
 *
 *  New line is written to existing nPoints structure.
 */
-void parallel_line (struct line_pnts *Points, double d, double tol, struct line_pnts *nPoints)
+static void parallel_line (struct line_pnts *Points, double d, double tol, struct line_pnts *nPoints)
 {
     int i, j, np, na, side;
     double *x, *y, nx, ny, tx, ty, vx, vy, ux, uy, wx, wy;
@@ -311,14 +324,15 @@
 }
 
 /*!
-  \fn void Vect_line_parallel ( struct line_pnts *InPoints, double distance, double tolerance, int rm_end,
-                       struct line_pnts *OutPoints )
   \brief Create parrallel line
+  
   \param InPoints input line
-  \param distance
+  \param distance create parrallel line in distance
   \param tolerance maximum distance between theoretical arc and polygon segments
   \param rm_end remove end points falling into distance
-  \param OutPoints output line
+  \param[out] OutPoints output line
+
+  \return
 */
 void
 Vect_line_parallel ( struct line_pnts *InPoints, double distance, double tolerance, int rm_end,
@@ -330,22 +344,24 @@
     parallel_line ( InPoints, distance, tolerance, OutPoints);
 
     clean_parallel ( OutPoints, InPoints, distance, rm_end );
+
+    return;
 }
 
 /*!
-  \fn void Vect_line_buffer ( struct line_pnts *InPoints, double distance, double tolerance,
-                              struct line_pnts *OutPoints )
   \brief Create buffer around the line line.
-         Buffer is closed counter clockwise polygon.
-         Warning: output line may contain loops!
+
+  Buffer is closed counter clockwise polygon.
+  Warning: output line may contain loops!
+  
   \param InPoints input line
-  \param distance
+  \param distance create buffer in distance
   \param tolerance maximum distance between theoretical arc and polygon segments
-  \param OutPoints output line
+  \param[out] OutPoints output line
 */
 void
 Vect_line_buffer ( struct line_pnts *InPoints, double distance, double tolerance,
-                     struct line_pnts *OutPoints )
+		   struct line_pnts *OutPoints )
 {
     double dangle;
     int    side, npoints;
@@ -439,6 +455,8 @@
 	Vect_append_point ( OutPoints, OutPoints->x[0], OutPoints->y[0], 0 );
     }
     Vect_line_prune ( OutPoints );
+
+    return;
 }
 
 

Modified: grass/trunk/lib/vector/Vlib/build.c
===================================================================
--- grass/trunk/lib/vector/Vlib/build.c	2008-01-13 12:05:46 UTC (rev 29692)
+++ grass/trunk/lib/vector/Vlib/build.c	2008-01-13 12:41:21 UTC (rev 29693)
@@ -1,20 +1,22 @@
-/*
-****************************************************************************
-*
-* MODULE:       Vector library 
-*   	    	
-* AUTHOR(S):    Original author CERL, probably Dave Gerdes or Mike Higgins.
-*               Update to GRASS 5.7 Radim Blazek and David D. Gray.
-*
-* PURPOSE:      Higher level functions for reading/writing/manipulating vectors.
-*
-* COPYRIGHT:    (C) 2001 by the GRASS Development Team
-*
-*               This program is free software under the GNU General Public
-*   	    	License (>=v2). Read the file COPYING that comes with GRASS
-*   	    	for details.
-*
-*****************************************************************************/
+/*!
+  \file build.c
+  
+  \brief Vector library - Building topology
+  
+  Higher level functions for reading/writing/manipulating vectors.
+
+  (C) 2001-2008 by the GRASS Development Team
+  
+  This program is free software under the 
+  GNU General Public License (>=v2). 
+  Read the file COPYING that comes with GRASS
+  for details.
+  
+  \author Original author CERL, probably Dave Gerdes or Mike Higgins.
+  Update to GRASS 5.7 Radim Blazek and David D. Gray.
+  
+  \date 2001-2008
+*/
 #include <stdlib.h>
 #include <stdio.h>
 #include <stdarg.h>
@@ -56,11 +58,13 @@
 }
 
 /*!
- \fn int Vect_build ( struct Map_info *Map, FILE *msgout ) 
- \brief build topology for vector map
- \return 1 on success, 0 on error
- \param Map vector map
- \param msgout file for message output (stdout/stderr for example) or NULL
+  \brief Build topology for vector map
+
+  \param Map vector map
+  \param msgout file for message output (stdout/stderr for example) or NULL
+
+  \return 1 on success
+  \return 0 on error
 */
 int
 Vect_build ( struct Map_info *Map, FILE *msgout ) 
@@ -70,10 +74,11 @@
 
 
 /*!
- \fn int Vect_get_built ( struct Map_info *Map ) 
- \brief return current highest built level (part)
- \return current highest built level
- \param Map vector map
+  \brief Return current highest built level (part)
+
+  \param Map vector map
+
+  \return current highest built level
 */
 int
 Vect_get_built ( struct Map_info *Map ) 
@@ -82,38 +87,41 @@
 }
 
 /*!
- \fn int Vect_build_partial ( struct Map_info *Map, int top, FILE *msgout ) 
- \brief build partial topology for vector map. Should only be used in special cases
- of vector processing.
+  \brief Build partial topology for vector map.
 
- This functions optionaly builds only some parts of topology. Highest level is specified by build
- parameter which may be:
- GV_BUILD_NONE - nothing is build;
- GV_BUILD_BASE - basic topology, nodes, spatial index;
- GV_BUILD_AREAS - build areas and islands, but islands are not attached to areas;
- GV_BUILD_ATTACH_ISLES - attach islands to areas;
- GV_BUILD_CENTROIDS - assign centroids to areas;
- GV_BUILD_ALL - top level, the same as GV_BUILD_CENTROIDS.
+  Should only be used in special cases of vector processing.
 
- If functions is called with build lower than current value of the Map, the level is downgraded to 
- requested value.
+  This functions optionaly builds only some parts of topology. Highest level is specified by build
+  parameter which may be:
+   - GV_BUILD_NONE - nothing is build;
+   - GV_BUILD_BASE - basic topology, nodes, spatial index;
+   - GV_BUILD_AREAS - build areas and islands, but islands are not attached to areas;
+   - GV_BUILD_ATTACH_ISLES - attach islands to areas;
+   - GV_BUILD_CENTROIDS - assign centroids to areas;
+   - GV_BUILD_ALL - top level, the same as GV_BUILD_CENTROIDS.
 
- All calls to Vect_write_line(), Vect_rewrite_line(), Vect_delete_line() respect the last value of 
- build used in this function.
+   If functions is called with build lower than current value of the Map, the level is downgraded to 
+   requested value.
 
- Values lower than GV_BUILD_ALL are supported only by GV_FORMAT_NATIVE,
- other formats ignore build and build always GV_BUILD_ALL
+   All calls to Vect_write_line(), Vect_rewrite_line(), Vect_delete_line() respect the last value of 
+   build used in this function.
 
- Note that the functions has effect only if requested level is higher than current level, to rebuild
- part of topology, call first downgrade and then upgrade, for example:
-    Vect_build()
-    Vect_build_partial(,GV_BUILD_BASE,)
-    Vect_build_partial(,GV_BUILD_AREAS,) 
+   Values lower than GV_BUILD_ALL are supported only by GV_FORMAT_NATIVE,
+   other formats ignore build and build always GV_BUILD_ALL
+   
+   Note that the functions has effect only if requested level is higher than current level, to rebuild
+   part of topology, call first downgrade and then upgrade, for example:
+   
+   Vect_build()
+   Vect_build_partial(,GV_BUILD_BASE,)
+   Vect_build_partial(,GV_BUILD_AREAS,) 
  
- \return 1 on success, 0 on error
- \param Map vector map
- \param build highest level of build
- \param msgout file pointer for message output (stdout/stderr for example) or NULL
+
+   \param Map vector map
+   \param build highest level of build
+   \param msgout file pointer for message output (stdout/stderr for example) or NULL
+
+   \return 1 on success, 0 on error
 */
 int
 Vect_build_partial ( struct Map_info *Map, int build, FILE *msgout ) 
@@ -132,7 +140,7 @@
     Map->plus.Spidx_built = 1;
     
     plus = &(Map->plus);
-    prnmsg ( _("Building topology ...\n") );
+    prnmsg ( _("Building topology for vector map <%s>...\n"), Vect_get_name(Map));
     plus->with_z = Map->head.with_z;
     plus->spidx_with_z = Map->head.with_z;
 
@@ -145,7 +153,7 @@
 
     if ( ret == 0 ) { return 0; } 
 
-    prnmsg (_("Topology was built.\n"));
+    prnmsg (_("Topology was built\n"));
     
     Map->level = LEVEL_2;
     plus->mode = GV_MODE_WRITE;
@@ -226,16 +234,17 @@
 }
 
 /*!
- \fn int Vect_save_topo ( struct Map_info *Map )
- \brief save topology file for vector map
- \return 1 on success, 0 on error
- \param Map vector map
+  \brief Save topology file for vector map
+
+  \param Map vector map
+
+  \return 1 on success, 0 on error
 */
 int
 Vect_save_topo ( struct Map_info *Map )
 {
     struct Plus_head *plus ;
-    char   fname[1024], buf[1024];
+    char   fname[GPATH_MAX], buf[GPATH_MAX];
     GVFILE  fp;
     
     G_debug (1, "Vect_save_topo()"); 
@@ -249,15 +258,15 @@
     dig_file_init ( &fp );
     fp.file = fopen( fname, "w");
     if ( fp.file ==  NULL) {
-        G_warning(_("Can't open topo file for write <%s>"), fname);
-	    return 0;
+        G_warning(_("Unable to open topo file for write <%s>"), fname);
+	return 0;
     }
 
     /* set portable info */
     dig_init_portable ( &(plus->port), dig__byte_order_out ());
     
     if ( 0 > dig_write_plus_file (&fp, plus) ) {
-        G_warning (_("Error writing out topo file."));
+        G_warning (_("Error writing out topo file"));
 	return 0;
     }
     
@@ -267,11 +276,13 @@
 }
 
 /*!
- \fn int Vect_topo_dump ( struct Map_info *Map, FILE *out )
- \brief dump topology to file
- \return 1 on success, 0 on error
- \param Map vector map
- \param out file for output (stdout/stderr for example)
+  \brief Dump topology to file
+
+  \param Map vector map
+  \param out file for output (stdout/stderr for example)
+
+  \return 1 on success
+  \return 0 on error
 */
 int
 Vect_topo_dump ( struct Map_info *Map, FILE *out )
@@ -366,16 +377,18 @@
 }
 
 /*!
- \fn int Vect_save_spatial_index ( struct Map_info *Map )
- \brief save spatial index file
- \return 1 on success, 0 on error
- \param Map vector map
+  \brief Save spatial index file
+
+  \param Map vector map
+
+  \return 1 on success
+  \return 0 on error
 */
 int
 Vect_save_spatial_index ( struct Map_info *Map )
 {
     struct Plus_head *plus ;
-    char   fname[1024], buf[1024];
+    char   fname[GPATH_MAX], buf[GPATH_MAX];
     GVFILE   fp;
     
     G_debug (1, "Vect_save_spatial_index()"); 
@@ -389,15 +402,15 @@
     dig_file_init ( &fp );
     fp.file = fopen( fname, "w");
     if ( fp.file ==  NULL) {
-        G_warning(_("Can't open spatial index file for write <%s>"), fname);
-	    return 0;
+        G_warning(_("Unable open spatial index file for write <%s>"), fname);
+	return 0;
     }
 
     /* set portable info */
     dig_init_portable ( &(plus->spidx_port), dig__byte_order_out ());
     
     if ( 0 > dig_write_spidx (&fp, plus) ) {
-        G_warning (_("Error writing out spatial index file."));
+        G_warning (_("Error writing out spatial index file"));
 	return 0;
     }
     
@@ -407,11 +420,13 @@
 }
 
 /*!
- \fn int Vect_spatial_index_dump ( struct Map_info *Map, FILE *out )
- \brief dump spatial index to file
- \return 1 on success, 0 on error
- \param Map vector map
- \param out file for output (stdout/stderr for example)
+  \brief Dump spatial index to file
+
+  \param Map vector map
+  \param out file for output (stdout/stderr for example)
+
+  \return 1 on success
+  \return 0 on error
 */
 int
 Vect_spatial_index_dump ( struct Map_info *Map, FILE *out ) 
@@ -426,4 +441,3 @@
 
     return 1;
 }
-

Modified: grass/trunk/lib/vector/Vlib/build_nat.c
===================================================================
--- grass/trunk/lib/vector/Vlib/build_nat.c	2008-01-13 12:05:46 UTC (rev 29692)
+++ grass/trunk/lib/vector/Vlib/build_nat.c	2008-01-13 12:41:21 UTC (rev 29693)
@@ -1,20 +1,21 @@
-/*
-****************************************************************************
-*
-* MODULE:       Vector library 
-*   	    	
-* AUTHOR(S):    Original author CERL, probably Dave Gerdes or Mike Higgins.
-*               Update to GRASS 5.7 Radim Blazek and David D. Gray.
-*
-* PURPOSE:      Higher level functions for reading/writing/manipulating vectors.
-*
-* COPYRIGHT:    (C) 2001 by the GRASS Development Team
-*
-*               This program is free software under the GNU General Public
-*   	    	License (>=v2). Read the file COPYING that comes with GRASS
-*   	    	for details.
-*
-*****************************************************************************/
+/*!
+  \file build_nat.c
+  
+  \brief Vector library - Building topology for native format
+  
+  (C) 2001-2008 by the GRASS Development Team
+  
+  This program is free software under the 
+  GNU General Public License (>=v2). 
+  Read the file COPYING that comes with GRASS
+  for details.
+  
+  \author Original author CERL, probably Dave Gerdes or Mike Higgins.
+  Update to GRASS 5.7 Radim Blazek and David D. Gray.
+  
+  \date 2001-2008
+*/
+
 #include <string.h>
 #include <stdlib.h>
 #include <stdio.h>
@@ -26,10 +27,15 @@
 extern int prnmsg ( char *msg, ...) ;
 
 /*!
- \fn int Vect_build_line_area ( struct Map_info *Map, int iline, int side )
- \brief build area on given side of line ( GV_LEFT or GV_RIGHT )
- \return > 0 : number of  area, < 0 : number of isle, 0 : not created (may also already exist)
- \param Map_info structure, line number ?, side (left? right?)
+  \brief Build area on given side of line (GV_LEFT or GV_RIGHT)
+
+  \param Map_info vector map
+  \param iline line id
+  \param side side (GV_LEFT or GV_RIGHT)
+
+  \return > 0 number of  area
+  \return < 0 number of isle
+  \return 0 not created (may also already exist)
 */
 int
 Vect_build_line_area ( struct Map_info *Map, int iline, int side )
@@ -84,7 +90,7 @@
 	area = dig_add_area (plus, n_lines, lines);
 	if ( area == -1 ) { /* error */
 	    Vect_close ( Map );
-	    G_fatal_error ( _("Cannot add area (map closed, topo saved)") );
+	    G_fatal_error ( _("Unable to add area (map closed, topo saved)") );
 	}
 	G_debug ( 3, "  -> area %d", area );
 	return area;
@@ -92,7 +98,7 @@
 	isle = dig_add_isle (plus, n_lines, lines);
 	if ( isle == -1 ) { /* error */
 	    Vect_close ( Map );
-	    G_fatal_error ( _("Cannot add isle (map closed, topo saved)") );
+	    G_fatal_error ( _("Unable to add isle (map closed, topo saved)") );
 	}
 	G_debug ( 3, "  -> isle %d", isle );
 	return -isle;
@@ -107,10 +113,13 @@
 }
 
 /*!
- \fn int Vect_isle_find_area ( struct Map_info *Map, int isle ) 
- \brief find area outside island
- \return number of  area(s), 0 if not found
- \param Map_info structure, isle number
+  \brief Find area outside island
+
+  \param Map_info vector map
+  \param isle isle id
+
+  \return number of  area(s)
+  \return 0 if not found
 */
 int
 Vect_isle_find_area ( struct Map_info *Map, int isle ) 
@@ -135,7 +144,7 @@
     plus = &(Map->plus);
 
     if (  plus->Isle[isle] == NULL ) {
-	G_warning ("Request to find area outside nonexisting isle");
+	G_warning (_("Request to find area outside nonexisting isle"));
 	return 0;
     }
 
@@ -224,10 +233,12 @@
 }
 
 /*!
- \fn int Vect_attach_isle ( struct Map_info *Map, int isle ) 
- \brief (Re)Attach isle to area
- \return ? not sure yet what should be returned
- \param Map_info structure, isle number
+  \brief (Re)Attach isle to area
+
+  \param Map_info vector map
+  \param isle isle id
+
+  \return 0
 */
 int
 Vect_attach_isle ( struct Map_info *Map, int isle ) 
@@ -257,10 +268,12 @@
 }
 
 /*!
- \fn int Vect_attach_isles ( struct Map_info *Map, BOUND_BOX *box )
- \brief (Re)Attach isles to areas in given box
- \return ? not sure yet what should be returned
- \param Map_info structure, BOUND_BOX
+  \brief (Re)Attach isles to areas in given box
+
+  \param Map_info vector map
+  \param box bounding box
+
+  \return 0
 */
 int
 Vect_attach_isles ( struct Map_info *Map, BOUND_BOX *box )
@@ -290,10 +303,12 @@
 }
 
 /*!
- \fn int Vect_attach_centroids ( struct Map_info *Map, BOUND_BOX *box ) 
- \brief (Re)Attach centroids to areas in given box
- \return ? not sure yet what should be returned
- \param Map_info structure, BOUND_BOX
+  \brief (Re)Attach centroids to areas in given box
+
+  \param Map_info vector map
+  \param box bounding box
+
+  \return 0
 */
 int
 Vect_attach_centroids ( struct Map_info *Map, BOUND_BOX *box ) 
@@ -377,10 +392,14 @@
 }
     
 /*!
- \fn int Vect_build_nat ( struct Map_info *Map, FILE *msgout )
- \brief build topology 
- \return 1 on success, 0 on error
- \param Map_info structure, msgout - message output (stdout/stderr for example) or NULL
+  \brief Build topology 
+
+  \param Map_info vector map
+  \param build build level
+  \param msgout message output (stdout/stderr for example) or NULL
+
+  \return 1 on success
+  \return 0 on error
 */
 int
 Vect_build_nat ( struct Map_info *Map, int build, FILE *msgout )
@@ -470,7 +489,7 @@
 	    type = Vect_read_next_line (Map, Points, Cats);
 	    /* Note: check for dead lines is not needed, because they are skipped by V1_read_next_line_nat() */
 	    if ( type == -1 ) { 
-		fprintf (stderr, "\nERROR: vector map - can't read\n" );
+		G_warning(_("Unable to read vector map"));
 		return 0;
 	    } else if ( type == -2 ) {
 		break;
@@ -514,7 +533,7 @@
     if ( plus->built < GV_BUILD_AREAS ) {
 	/* Build areas */
 	/* Go through all bundaries and try to build area for both sides */
-	prnmsg ("Building areas: ");
+	prnmsg (_("Building areas: "));
 	for (i = 1; i <= plus->n_lines; i++) {
 	    G_percent2 ( i, plus->n_lines, 1, msgout );
 
@@ -605,5 +624,3 @@
 
     return 1;
 }
-
-

Modified: grass/trunk/lib/vector/Vlib/build_ogr.c
===================================================================
--- grass/trunk/lib/vector/Vlib/build_ogr.c	2008-01-13 12:05:46 UTC (rev 29692)
+++ grass/trunk/lib/vector/Vlib/build_ogr.c	2008-01-13 12:41:21 UTC (rev 29693)
@@ -1,18 +1,22 @@
-/****************************************************************************
-*
-* MODULE:       Vector library 
-*   	    	
-* AUTHOR(S):    Radim Blazek, Piero Cavalieri
-*
-* PURPOSE:      Higher level functions for reading/writing/manipulating vectors.
-*
-* COPYRIGHT:    (C) 2001 by the GRASS Development Team
-*
-*               This program is free software under the GNU General Public
-*   	    	License (>=v2). Read the file COPYING that comes with GRASS
-*   	    	for details.
-*
-*****************************************************************************/
+/*!
+  \file build_ogr.c
+  
+  \brief Vector library - Building topology for OGR
+  
+  Higher level functions for reading/writing/manipulating vectors.
+
+  (C) 2001-2008 by the GRASS Development Team
+  
+  This program is free software under the 
+  GNU General Public License (>=v2). 
+  Read the file COPYING that comes with GRASS
+  for details.
+  
+  \author Radim Blazek, Piero Cavalieri
+  
+  \date 2001-2008
+*/
+
 #include <string.h>
 #include <stdlib.h>
 #include <stdio.h>
@@ -21,15 +25,14 @@
 #include <grass/glocale.h>
 
 /* 
-*   Line offset is
-*      - centroids   : FID
-*      - other types : index of the first record (which is FID) in offset array.
-*
-*   Category: FID, not all layer have FID, OGRNullFID is defined (5/2004) as -1, so FID should be only >= 0
-*
-*/
+ *   Line offset is
+ *      - centroids   : FID
+ *      - other types : index of the first record (which is FID) in offset array.
+ *
+ *   Category: FID, not all layer have FID, OGRNullFID is defined (5/2004) as -1, so FID should be only >= 0
+ *
+ */
 
-
 #ifdef HAVE_OGR
 #include <ogr_api.h>
 
@@ -84,7 +87,7 @@
 }
 
 /* Add parts to offset */
-static void add_parts_to_offset ( struct Map_info *Map, GEOM_PARTS *parts, int line ) 
+static void add_parts_to_offset ( struct Map_info *Map, GEOM_PARTS *parts) 
 {
     int i, j;
 
@@ -135,16 +138,12 @@
     }
 
     if ( type != GV_CENTROID ) /* because centroids are read from topology, not from layer */ 
-        add_parts_to_offset ( Map, parts, line );
+        add_parts_to_offset ( Map, parts);
 
     return line;
 }
 
-/* Recursively add geometry to topology 
-* 
-*  
-*
-*/
+/* Recursively add geometry to topology */
 static int add_geometry ( struct Map_info *Map, OGRGeometryH hGeom, int FID, GEOM_PARTS *parts )
 {
     struct  Plus_head *plus;
@@ -255,7 +254,7 @@
 	    /* create virtual centroid */
 	    ret = Vect_get_point_in_poly_isl ( Points[0], Points+1, nRings-1, &x, &y );
 	    if (ret < -1) {
-		G_warning (_("Cannot calculate centroid for area %d"), outer_area );
+		G_warning (_("Unable to calculate centroid for area %d"), outer_area );
 	    } else { 
                 P_AREA  *Area;
 
@@ -290,7 +289,7 @@
 	    break;
 
 	default:
-	    G_warning (_("OGR feature type %d not supported)"), eType);
+	    G_warning (_("OGR feature type %d not supported"), eType);
 	    break;
     }
 
@@ -298,10 +297,14 @@
 }
 
 /*!
- \fn int Vect_build_ogr ( struct Map_info *Map, FILE *msgout ) 
- \brief build topology 
- \return 1 on success, 0 on error
- \param Map_info structure, msgout - message output (stdout/stderr for example) or NULL
+  \brief Build topology 
+
+  \param Map_info vector map
+  \param build build level 
+  \param msgout message output (stdout/stderr for example) or NULL
+
+  \return 1 on success
+  \return 0 on error
 */
 int
 Vect_build_ogr (struct Map_info *Map, int build, FILE * msgout)
@@ -311,7 +314,8 @@
     OGRFeatureH  hFeature;
     OGRGeometryH hGeom;
 
-    if ( build != GV_BUILD_ALL ) G_fatal_error ("Partial build for OGR is not supported.");
+    if ( build != GV_BUILD_ALL )
+      G_fatal_error (_("Partial build for OGR is not supported"));
 
     Msgout = msgout;
 
@@ -322,14 +326,14 @@
 
     /* test layer capabilities */
     if ( !OGR_L_TestCapability ( Map->fInfo.ogr.layer, OLCRandomRead ) ) {
-	G_warning ("Random read is not supported by OGR for this layer, cannot build support." );
+	G_warning (_("Random read is not supported by OGR for this layer, cannot build support"));
 	return 0;
     }
     
     init_parts (&parts);
 
     /* Note: Do not use OGR_L_GetFeatureCount (it may scan all features)!!! */
-    prnmsg ("Feature: ");
+    prnmsg (_("Feature: "));
 
     OGR_L_ResetReading ( Map->fInfo.ogr.layer );
     count = iFeature = 0;
@@ -354,7 +358,7 @@
 
 	FID = (int) OGR_F_GetFID ( hFeature );
 	if ( FID == OGRNullFID ) {
-	    G_warning (_("OGR feature without ID ignored."));
+	    G_warning (_("OGR feature without ID ignored"));
 	    OGR_F_Destroy( hFeature );
 	    continue;
 	}

Modified: grass/trunk/lib/vector/Vlib/cats.c
===================================================================
--- grass/trunk/lib/vector/Vlib/cats.c	2008-01-13 12:05:46 UTC (rev 29692)
+++ grass/trunk/lib/vector/Vlib/cats.c	2008-01-13 12:41:21 UTC (rev 29693)
@@ -5,16 +5,19 @@
  *
  * Higher level functions for reading/writing/manipulating vectors.
  *
- * \author Original author CERL, probably Dave Gerdes or Mike
- * Higgins. Update to GRASS 5.7 Radim Blazek and David D. Gray.
+ * (C) 2001-2008 by the GRASS Development Team
  *
- * (C) 2001 by the GRASS Development Team
- *
  * This program is free software under the 
  * GNU General Public License (>=v2). 
  * Read the file COPYING that comes with GRASS
  * for details.
+ *
+ * \author Original author CERL, probably Dave Gerdes or Mike
+ * Higgins. Update to GRASS 5.7 Radim Blazek and David D. Gray.
+ *
+ * \date 2001-2008
  */
+
 #include <stdlib.h>
 #include <string.h>
 #include <grass/gis.h>
@@ -26,12 +29,10 @@
 
 
 /*!
-  \fn struct line_cats *Vect_new_cats_struct ()
   \brief Creates and initializes line_cats structure.
 
-  This structure is
-  used for reading and writing vector cats. The library routines handle
-  all memory allocation.
+  This structure is used for reading and writing vector cats. The
+  library routines handle all memory allocation.
 
   \return struct line_cats *
   \return NULL on error
@@ -48,12 +49,10 @@
 }
 
 /*!
-  \fn struct line_cats *Vect__new_cats_struct ()
   \brief Creates and initializes line_cats structure.
 
-  This structure is
-  used for reading and writing vector cats. The library routines handle
-  all memory allocation.
+  This structure is used for reading and writing vector cats. The
+  library routines handle all memory allocation.
 
   \return struct line_cats *
 */
@@ -75,12 +74,11 @@
 }
 
 /*!
- \fn int Vect_destroy_cats_struct (struct line_cats *p)
- \brief Frees all memory associated with line_cats structure, including the struct itself.
+  \brief Frees all memory associated with line_cats structure, including the struct itself.
 
- \param p line_cats structure
+  \param p line_cats structure
 
- \return 0
+  \return 0
 */
 int 
 Vect_destroy_cats_struct (struct line_cats *p)
@@ -99,17 +97,16 @@
 }
 
 /*!
- \fn int Vect_cat_set (struct line_cats *Cats, int field, int cat)
- \brief Add new field/cat to category structure if doesn't exist yet.
-
- \param[in] Cats line_cats structure
- \param[in] field layer number
- \param[in] cat category number
-
- \return number of categories
- \return 0 if no space for new category in structure, n_cats would be > GV_NCATS_MAX
- \return -1 on out of memory
- \return -2 if field out of range: 1 - GV_FIELD_MAX or cat out of range:  1 - GV_CAT_MAX
+  \brief Add new field/cat to category structure if doesn't exist yet.
+  
+  \param[in] Cats line_cats structure
+  \param[in] field layer number
+  \param[in] cat category number
+  
+  \return number of categories
+  \return 0 if no space for new category in structure, n_cats would be > GV_NCATS_MAX
+  \return -1 on out of memory
+  \return -2 if field out of range: 1 - GV_FIELD_MAX or cat out of range:  1 - GV_CAT_MAX
 */
 int 
 Vect_cat_set (struct line_cats *Cats, int field, int cat)
@@ -152,17 +149,16 @@
 }
 
 /*!
- \fn int Vect_cat_get (struct line_cats *Cats, int field, int *cat)
- \brief Get first found category of given field.
-
- 'cat' is set to first category found or -1 if field was not found
-
- \param[in] Cats line_cats structure
- \param[in] field layer number
- \param[in] cat pointer to variable where cat will be written
-
- \return 1 found
- \return 0 layer does not exist
+  \brief Get first found category of given field.
+  
+  'cat' is set to first category found or -1 if field was not found
+  
+  \param[in] Cats line_cats structure
+  \param[in] field layer number
+  \param[in] cat pointer to variable where cat will be written
+  
+  \return 1 found
+  \return 0 layer does not exist
 */
 int 
 Vect_cat_get (struct line_cats *Cats, int field, int *cat)
@@ -192,14 +188,13 @@
 }
 
 /*!
- \fn int Vect_cat_del (struct line_cats *Cats, int field)
- \brief Delete all categories of given layer
-
- \param[in] Cats line_cats structure
- \param[in] field layer number
-
- \return 1 deleted
- \return 0 layer does not exist
+  \brief Delete all categories of given layer
+  
+  \param[in] Cats line_cats structure
+  \param[in] field layer number
+  
+  \return 1 deleted
+  \return 0 layer does not exist
 */
 int 
 Vect_cat_del (struct line_cats *Cats, int field)
@@ -229,15 +224,14 @@
 }
 
 /*!
- \fn int Vect_field_cat_del (struct line_cats *Cats, int field, int cat)
- \brief Delete field/cat from line_cats structure
-
- \param[in] Cats line_cats structure
- \param[in] field layer number
- \param[in] cat category to be deleted or -1 to delete all cats of given field
-
- \return 1 deleted
- \return 0 field/category number does not exist
+  \brief Delete field/cat from line_cats structure
+  
+  \param[in] Cats line_cats structure
+  \param[in] field layer number
+  \param[in] cat category to be deleted or -1 to delete all cats of given field
+  
+  \return 1 deleted
+  \return 0 field/category number does not exist
 */
 int 
 Vect_field_cat_del (struct line_cats *Cats, int field, int cat)
@@ -266,15 +260,14 @@
 }
 
 /*!
- \fn int Vect_reset_cats (struct line_cats *Cats)
- \brief Reset category structure to make sure cats structure is clean to be re-used.
-
- I.e. it has no cats associated with it. Cats must have
- previously been created with Vect_new_cats_struct()
-
- \param[out] Cats line_cats structure
-
- \return 0
+  \brief Reset category structure to make sure cats structure is clean to be re-used.
+  
+  I.e. it has no cats associated with it. Cats must have
+  previously been created with Vect_new_cats_struct()
+  
+  \param[out] Cats line_cats structure
+  
+  \return 0
 */
 int 
 Vect_reset_cats (struct line_cats *Cats)
@@ -285,11 +278,10 @@
 }
 
 /*!
- \fn struct cat_list *Vect_new_cat_list ()
- \brief Allocate memory for cat_list structure.
-
- \return poiter to allocated structure
- \return NULL on out of memory
+  \brief Allocate memory for cat_list structure.
+  
+  \return poiter to allocated structure
+  \return NULL on out of memory
 */
 struct cat_list *
 Vect_new_cat_list ()
@@ -312,12 +304,11 @@
 
 
 /*!
- \fn int Vect_destroy_cat_list (struct cat_list *p)
- \brief Frees allocated cat_list memory.
-
- \param[in] p line_cats structure
-
- \return 0
+  \brief Frees allocated cat_list memory.
+  
+  \param[in] p line_cats structure
+  
+  \return 0
 */
 int 
 Vect_destroy_cat_list (struct cat_list *p)
@@ -337,15 +328,14 @@
 
 
 /*!
- \fn int Vect_str_to_cat_list (char *str, struct cat_list *list)
- \brief Convert string of categories and cat ranges separated by commas to cat_list.
-
- Examples of string: 2,3,5-9,20. str - input string
-
- \param[in] str cat list string
- \param[out] list result cat_list structure
-
- \return number of errors in ranges
+  \brief Convert string of categories and cat ranges separated by commas to cat_list.
+  
+  Examples of string: 2,3,5-9,20. str - input string
+  
+  \param[in] str cat list string
+  \param[out] list result cat_list structure
+  
+  \return number of errors in ranges
 */
 int 
 Vect_str_to_cat_list (char *str, struct cat_list *list)
@@ -422,14 +412,13 @@
 }
 
 /*!
- \fn int Vect_array_to_cat_list (int *vals, int nvals, struct cat_list *list)
- \brief Convert ordered array of integers to cat_list structure.
-
- \param[in] vals array of integers
- \param[in] nvals number of values
- \param[out] list result cat_list structure
-
- \return number of ranges
+  \brief Convert ordered array of integers to cat_list structure.
+  
+  \param[in] vals array of integers
+  \param[in] nvals number of values
+  \param[out] list result cat_list structure
+  
+  \return number of ranges
 */
 int
 Vect_array_to_cat_list (int *vals, int nvals, struct cat_list *list)
@@ -466,14 +455,13 @@
 }
 
 /*!
- \fn int Vect_cat_in_cat_list (int cat, struct cat_list *list)
- \brief Check if category number is in list.
-
- \param[in] cat category number
- \param[in] list cat_list structure
-
- \return TRUE if cat is in list
- \return FALSE if it is not
+  \brief Check if category number is in list.
+  
+  \param[in] cat category number
+  \param[in] list cat_list structure
+  
+  \return TRUE if cat is in list
+  \return FALSE if it is not
 */
 int 
 Vect_cat_in_cat_list (int cat, struct cat_list *list)
@@ -488,15 +476,14 @@
 }
 
 /*!
- \fn int Vect_cat_in_array (int cat, int *array, int ncats)
- \brief Check if category is in ordered array of integers.
-
- \param[in] cat category number
- \param[in] array ordered array of integers
- \param[in] ncats number of categories in array
-
- \return TRUE if cat is in list
- \return FALSE if it is not
+  \brief Check if category is in ordered array of integers.
+  
+  \param[in] cat category number
+  \param[in] array ordered array of integers
+  \param[in] ncats number of categories in array
+  
+  \return TRUE if cat is in list
+  \return FALSE if it is not
 */
 int 
 Vect_cat_in_array (int cat, int *array, int ncats)
@@ -511,7 +498,6 @@
   return (FALSE);
 }
 
-
 static int cmp ( const void *pa, const void *pb)
 {
     int *p1 = (int *) pa;

Modified: grass/trunk/lib/vector/Vlib/clean_nodes.c
===================================================================
--- grass/trunk/lib/vector/Vlib/clean_nodes.c	2008-01-13 12:05:46 UTC (rev 29692)
+++ grass/trunk/lib/vector/Vlib/clean_nodes.c	2008-01-13 12:41:21 UTC (rev 29693)
@@ -1,33 +1,40 @@
-/* **************************************************************
- * 
- * MODULE:       vector library
- * 
- * AUTHOR(S):    Radim Blazek
- *               
- * PURPOSE:      Clean boundaries at nodes
- *               
- * COPYRIGHT:    (C) 2001 by the GRASS Development Team
- *
- *               This program is free software under the 
- *               GNU General Public License (>=v2). 
- *               Read the file COPYING that comes with GRASS
- *               for details.
- *
- **************************************************************/
+/*!
+  \file clean_nodes.c
+  
+  \brief Vector library - Clean boundaries at nodes
+  
+  Higher level functions for reading/writing/manipulating vectors.
+
+  (C) 2001-2008 by the GRASS Development Team
+  
+  This program is free software under the 
+  GNU General Public License (>=v2). 
+  Read the file COPYING that comes with GRASS
+  for details.
+  
+  \author Radim Blazek
+  
+  \date 2001-2008
+*/
+
 #include <stdlib.h> 
 #include <grass/gis.h>
 #include <grass/Vect.h>
+#include <grass/glocale.h>
 
 /*!
- \fn void Vect_clean_small_angles_at_nodes ( struct Map_info *Map, int type, struct Map_info *Err, FILE *msgout)
- \brief It may happen that even if the angle between 2 boundaries at node is very small,
-        the calculated angle is 0 because of representation error.
-	The map must be built at least on level GV_BUILD_BASE
+  \brief Clean small angles at nodes.
 
- \param Map input map
- \param Err vector map where error line segments are written
- \param msgout file pointer where messages will be written or NULL
- \return number of line modifications
+  It may happen that even if the angle between 2 boundaries at node is
+  very small, the calculated angle is 0 because of
+  representation error.  The map must be built at least on level
+  GV_BUILD_BASE
+
+  \param Map input map
+  \param Err vector map where error line segments are written
+  \param msgout file pointer where messages will be written or NULL
+
+  \return number of line modifications
 */
 int 
 Vect_clean_small_angles_at_nodes ( struct Map_info *Map, int otype, struct Map_info *Err, FILE *msgout)
@@ -42,7 +49,7 @@
     LCats = Vect_new_cats_struct ();
     OCats = Vect_new_cats_struct ();
 
-    if ( msgout ) fprintf (msgout, "Modifications: %5d", nmodif ); 
+    if ( msgout ) fprintf (msgout, "%s: %5d", _("Modifications"), nmodif ); 
     
     for ( node = 1; node <= Vect_get_num_nodes(Map); node++ ){ 
 	int i, nlines;
@@ -206,7 +213,7 @@
 	    }
     
 	    if ( msgout ) {
-		fprintf (msgout, "\rModifications: %5d", nmodif ); 
+		fprintf (msgout, "\r%s: %5d", _("Modifications"), nmodif ); 
 		fflush ( msgout );
 	    }
 
@@ -220,4 +227,3 @@
 
     return (nmodif);
 }
-

Modified: grass/trunk/lib/vector/Vlib/close.c
===================================================================
--- grass/trunk/lib/vector/Vlib/close.c	2008-01-13 12:05:46 UTC (rev 29692)
+++ grass/trunk/lib/vector/Vlib/close.c	2008-01-13 12:41:21 UTC (rev 29693)
@@ -1,20 +1,23 @@
-/*
-****************************************************************************
-*
-* MODULE:       Vector library 
-*   	    	
-* AUTHOR(S):    Original author CERL, probably Dave Gerdes or Mike Higgins.
-*               Update to GRASS 5.7 Radim Blazek and David D. Gray.
-*
-* PURPOSE:      Higher level functions for reading/writing/manipulating vectors.
-*
-* COPYRIGHT:    (C) 2001 by the GRASS Development Team
-*
-*               This program is free software under the GNU General Public
-*   	    	License (>=v2). Read the file COPYING that comes with GRASS
-*   	    	for details.
-*
-*****************************************************************************/
+/*!
+  \file close.c
+  
+  \brief Vector library - Close map
+  
+  Higher level functions for reading/writing/manipulating vectors.
+
+  (C) 2001-2008 by the GRASS Development Team
+  
+  This program is free software under the 
+  GNU General Public License (>=v2). 
+  Read the file COPYING that comes with GRASS
+  for details.
+  
+  \author Original author CERL, probably Dave Gerdes or Mike Higgins.
+  Update to GRASS 5.7 Radim Blazek and David D. Gray.
+  
+  \date 2001-2008
+*/
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -22,6 +25,7 @@
 #include <sys/stat.h>
 #include <unistd.h>
 #include <grass/Vect.h>
+#include <grass/glocale.h>
 
 static int
 clo_dummy () {
@@ -29,7 +33,7 @@
 }
 
 #ifndef HAVE_OGR
-static int format () { G_fatal_error ("Requested format is not compiled in this version"); return 0; }
+static int format () { G_fatal_error (_("Requested format is not compiled in this version")); return 0; }
 #endif
 
 static int (*Close_array[][2]) () =
@@ -44,10 +48,12 @@
 
 
 /*!
- \fn int Vect_close (struct Map_info *Map)
- \brief close vector data file
- \return 0 on success, non-zero on error
- \param Map_info structure
+  \brief Close vector data file
+  
+  \param Map vector map to be closed
+
+  \return 0 on success
+  \return non-zero on error
 */
 int 
 Vect_close (struct Map_info *Map)
@@ -59,8 +65,8 @@
     
     /* Store support files if in write mode on level 2 */
     if ( strcmp(Map->mapset,G_mapset()) == 0 && Map->support_updated && Map->plus.built == GV_BUILD_ALL) {
-        char buf[1000];
-        char file_path[2000];
+        char buf[GPATH_MAX];
+        char file_path[GPATH_MAX];
         struct stat info;
 
 	/* Delete old support files if available */
@@ -117,16 +123,18 @@
     /* Close level 1 files / data sources if not head_only */
     if ( !Map->head_only ) {
 	if (  ((*Close_array[Map->format][1]) (Map)) != 0 ) { 
-	    G_warning ("Cannot close vector '%s'", Vect_get_full_name(Map) );
+	    G_warning (_("Unable close vector <%s>"),
+		       Vect_get_full_name(Map) );
 	    return 1;
 	}
     }
 
-    free (Map->name); Map->name = NULL;
-    free (Map->mapset); Map->mapset = NULL;
+    G_free ((void *) Map->name);
+    Map->name = NULL;
+    G_free ((void *) Map->mapset);
+    Map->mapset = NULL;
 
     Map->open = VECT_CLOSED_CODE;
 
     return 0;
 }
-

Modified: grass/trunk/lib/vector/Vlib/constraint.c
===================================================================
--- grass/trunk/lib/vector/Vlib/constraint.c	2008-01-13 12:05:46 UTC (rev 29692)
+++ grass/trunk/lib/vector/Vlib/constraint.c	2008-01-13 12:41:21 UTC (rev 29693)
@@ -1,37 +1,52 @@
-/*
-****************************************************************************
-*
-* MODULE:       Vector library 
-*   	    	
-* AUTHOR(S):    Original author CERL, probably Dave Gerdes or Mike Higgins.
-*               Update to GRASS 5.7 Radim Blazek and David D. Gray.
-*
-* PURPOSE:      Higher level functions for reading/writing/manipulating vectors.
-*
-* COPYRIGHT:    (C) 2001 by the GRASS Development Team
-*
-*               This program is free software under the GNU General Public
-*   	    	License (>=v2). Read the file COPYING that comes with GRASS
-*   	    	for details.
-*
-*****************************************************************************/
+/*!
+  \file constraint.c
+  
+  \brief Vector library - constraints
+
+  Higher level functions for reading/writing/manipulating vectors.
+
+  These routines can affect the read_next_line funtions
+  by restricting what they return.
+  They are applied on a per map basis.
+  
+  These do not affect the lower level direct read functions.
+
+  Normally, All 'Alive' lines will be returned unless overridden
+  by this function.   You can specified all the types you are interested
+  in  (by oring their types together).  You can use this to say 
+  exclude Area type lines.
+  
+  By default all DEAD lines are ignored by the read_next_line () functions
+  This too can be overridden by including their types.
+  
+  Refer to  dig_defines for the line type Defines
+  
+  All lines can be forced to be read by setting type = -1
+
+  (C) 2001-2008 by the GRASS Development Team
+  
+  This program is free software under the 
+  GNU General Public License (>=v2). 
+  Read the file COPYING that comes with GRASS
+  for details.
+  
+  \author Original author CERL, probably Dave Gerdes or Mike Higgins.
+  Update to GRASS 5.7 Radim Blazek and David D. Gray.
+  
+  \date 2001-2008
+*/
+
 #include <grass/Vect.h>
 #include <grass/gis.h>
-/*
-   **  These routines can affect the read_next_line funtions
-   **    by restricting what they return.
-   **  They are applied on a per map basis.
-   **
-   **  These do not affect the lower level direct read functions.
- */
 
+/*!
+  \brief Set constraint region
 
-/*!
- \fn int Vect_set_constraint_region ( struct Map_info *Map,
-			     double n, double s, double e, double w, double t, double b )
- \brief ADD
- \return 0 on success, -1 on error
- \param Map_info structure, north, south, east, west, top, bottom coordinates
+  \param Map vector map
+  \param n,s,e,w,t,b north, south, east, west, top, bottom coordinates
+
+  \return 0 on success
+  \return -1 on error
 */
 int 
 Vect_set_constraint_region ( struct Map_info *Map,
@@ -52,14 +67,15 @@
   Map->proj = G_projection ();
 
   return (0);
-}				/*  dig_init_box()  */
+}			
 
 /*!
- \fn int Vect_get_constraint_box ( struct Map_info *Map,
-			      BOUND_BOX *Box )
- \brief ADD
- \return 0 on success
- \param Map_info structure, BOUND_BOX
+  \brief Get constraint box
+
+  \param Map vector map
+  \param Box bounding box
+
+  \return 0 on success
 */
 int 
 Vect_get_constraint_box ( struct Map_info *Map,  BOUND_BOX *Box )
@@ -73,28 +89,14 @@
 
     return 0;
 }
-/*
-   **  Normally, All 'Alive' lines will be returned unless overridden
-   **  by this function.   You can specified all the types you are interested
-   **   in  (by oring their types together).  You can use this to say 
-   **  exclude Area type lines.
-   **
-   **   By default all DEAD lines are ignored by the read_next_line () functions
-   **  This too can be overridden by including their types.
-   **
-   **  Refer to  dig_defines for the line type Defines
-   **
-   **   All lines can be forced to be read by setting type = -1
-   **
- */
 
 /*!
- \fn int Vect_set_constraint_type (
-			   struct Map_info *Map,
-			   int type)
- \brief ADD
- \return 0 on success
- \param Map_info structure, constraint type
+  \brief Set constraint type
+  
+  \param Map vector map
+  \param type constraint type
+
+  \return 0 on success
 */
 int 
 Vect_set_constraint_type (
@@ -108,10 +110,11 @@
 }
 
 /*!
- \fn int Vect_remove_constraints (struct Map_info *Map)
- \brief ADD
- \return 0 on success
- \param Map_info structure
+  \brief Remove constraints
+
+  \param Map vector map
+
+  \return 0 on success
 */
 int 
 Vect_remove_constraints (struct Map_info *Map)

Modified: grass/trunk/lib/vector/Vlib/dangles.c
===================================================================
--- grass/trunk/lib/vector/Vlib/dangles.c	2008-01-13 12:05:46 UTC (rev 29692)
+++ grass/trunk/lib/vector/Vlib/dangles.c	2008-01-13 12:41:21 UTC (rev 29693)
@@ -1,31 +1,33 @@
-/**************************************************************
- *
- * MODULE:       vector library
- *  
- * AUTHOR(S):    Radim Blazek
- *               
- * PURPOSE:      Clean lines
- *               
- * COPYRIGHT:    (C) 2001 by the GRASS Development Team
- *
- *               This program is free software under the 
- *               GNU General Public License (>=v2). 
- *               Read the file COPYING that comes with GRASS
- *               for details.
- *
- **************************************************************/
+/*!
+  \file dangles.c
+  
+  \brief Vector library - clean geometry (dangles)
+  
+  Higher level functions for reading/writing/manipulating vectors.
+
+  (C) 2001-2008 by the GRASS Development Team
+  
+  This program is free software under the 
+  GNU General Public License (>=v2). 
+  Read the file COPYING that comes with GRASS
+  for details.
+  
+  \author Radim Blazek
+  
+  \date 2001-2008
+*/
+
 #include <stdlib.h> 
 #include <grass/gis.h>
 #include <grass/Vect.h>
+#include <grass/glocale.h>
 
-void remove_dangles ( struct Map_info *Map, int type, int chtype, double maxlength, 
+static void remove_dangles ( struct Map_info *Map, int type, int chtype, double maxlength, 
 	              struct Map_info *Err, FILE *msgout );
 
 /*!
- \fn void Vect_remove_dangles ( struct Map_info *Map, int type, double maxlength, 
-                              struct Map_info *Err, FILE *msgout)
- \brief Remove dangles from vector map.
-
+  \brief Remove dangles from vector map.
+  
   Remove dangles of given type shorter than maxlength from vector map. 
   Line is considered to be a dangle if on at least one end node is no other line of given type(s).
   If a dangle is formed by more lines, such string of lines is taken as one dangle and 
@@ -33,11 +35,13 @@
   Optionaly deleted dangles are written to error map. 
   Input map must be opened on level 2 for update.
 
- \param Map input map where have to be deleted
- \param type type of dangles 
- \param maxlength maxlength of dangles or -1 for all dangles
- \param Err vector map where deleted dangles are written or NULL
- \param msgout file pointer where messages will be written or NULL
+  \param Map input map where have to be deleted
+  \param type type of dangles 
+  \param maxlength maxlength of dangles or -1 for all dangles
+  \param Err vector map where deleted dangles are written or NULL
+  \param msgout file pointer where messages will be written or NULL
+
+  \return
 */
 void 
 Vect_remove_dangles ( struct Map_info *Map, int type, double maxlength, struct Map_info *Err, FILE *msgout )
@@ -46,28 +50,29 @@
 }
     
 /*!
- \fn void Vect_chtype_dangles ( struct Map_info *Map, double maxlength, 
-                              struct Map_info *Err, FILE *msgout)
- \brief Change boundary dangles to lines.
-
+  \brief Change boundary dangles to lines.
+  
   Change boundary dangles to lines. 
   Boundary is considered to be a dangle if on at least one end node is no other boundary.
   If a dangle is formed by more boundaries, such string of boundaries is taken as one dangle and 
   either deleted are all parts or nothing.
   Optionaly deleted dangles are written to error map. 
   Input map must be opened on level 2 for update at least on GV_BUILD_BASE.
+  
+  \param Map input map where have to be deleted
+  \param type type of dangles 
+  \param maxlength maxlength of dangles or -1 for all dangles
+  \param Err vector map where deleted dangles are written or NULL
+  \param msgout file pointer where messages will be written or NULL
 
- \param Map input map where have to be deleted
- \param type type of dangles 
- \param maxlength maxlength of dangles or -1 for all dangles
- \param Err vector map where deleted dangles are written or NULL
- \param msgout file pointer where messages will be written or NULL
+  \return 
 */
 void 
 Vect_chtype_dangles ( struct Map_info *Map, double maxlength, struct Map_info *Err, FILE *msgout )
 {
     remove_dangles ( Map, 0, 1, maxlength, Err, msgout );
 }
+
 /*
   Remove dangles of given type shorter than maxlength from vector map. 
   Line is considered to be a dangle if on at least one end node is no other line of given type(s).
@@ -86,7 +91,7 @@
   Err vector map where deleted dangles are written or NULL
   msgout file pointer where messages will be written or NULL
 */
-void 
+static void 
 remove_dangles ( struct Map_info *Map, int type, int chtype, double maxlength, struct Map_info *Err, FILE *msgout )
 {
     struct line_pnts *Points;
@@ -113,8 +118,8 @@
     Cats = Vect_new_cats_struct ();
     List = Vect_new_list ();
     
-    if ( msgout ) fprintf (msgout, "Removed dangles: %5d  %s: %5d", 
-	                            dangles_removed, lmsg, lines_removed ); 
+    if ( msgout ) fprintf (msgout, "%s: %5d  %s: %5d", 
+			   _("Removed dangles"), dangles_removed, lmsg, lines_removed ); 
 
     nnodes = Vect_get_num_nodes (Map);
     G_debug (2, "nnodes =  %d", nnodes );
@@ -202,16 +207,16 @@
 		}
 	    }
 	    if ( msgout ) {
-		if ( msgout ) fprintf (msgout, "\rRemoved dangles: %5d  %s: %5d", 
-						dangles_removed, lmsg, lines_removed ); 
+		if ( msgout ) fprintf (msgout, "\r%s: %5d  %s: %5d", 
+				       _("Removed dangles"), dangles_removed, lmsg, lines_removed ); 
 		fflush ( msgout );
 	    }
 	    dangles_removed++;
 	}
     }
     if ( msgout ) {
-	if ( msgout ) fprintf (msgout, "\rRemoved dangles: %5d  %s: %5d", 
-					dangles_removed, lmsg, lines_removed ); 
+	if ( msgout ) fprintf (msgout, "\r%s: %5d  %s: %5d", 
+			       _("Removed dangles"), dangles_removed, lmsg, lines_removed ); 
         fprintf (msgout, "\n" ); 
     }
 }

Modified: grass/trunk/lib/vector/Vlib/dbcolumns.c
===================================================================
--- grass/trunk/lib/vector/Vlib/dbcolumns.c	2008-01-13 12:05:46 UTC (rev 29692)
+++ grass/trunk/lib/vector/Vlib/dbcolumns.c	2008-01-13 12:41:21 UTC (rev 29693)
@@ -1,18 +1,22 @@
-/****************************************************************************
-*
-* MODULE:       Vector library 
-*   	    	
-* AUTHOR(S):    Markus Neteler
-*
-* PURPOSE:      DB info on vectors maps
-*
-* COPYRIGHT:    (C) 2005 by the GRASS Development Team
-*
-*               This program is free software under the GNU General Public
-*   	    	License (>=v2). Read the file COPYING that comes with GRASS
-*   	    	for details.
-*
-*****************************************************************************/
+/*!
+  \file dbcolumns.c
+  
+  \brief Vector library - DB info on vectors maps
+  
+  Higher level functions for reading/writing/manipulating vectors.
+
+  (C) 2005-2008 by the GRASS Development Team
+  
+  This program is free software under the 
+  GNU General Public License (>=v2). 
+  Read the file COPYING that comes with GRASS
+  for details.
+  
+  \author Markus Neteler
+  
+  \date 2005-2008
+*/
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -25,12 +29,14 @@
 #include <grass/dbmi.h>
 
 /*!
- \fn char *Vect_get_column_names(struct Map_info *Map, int field)
- \brief fetches list of DB column names of vector map attribute table
- \return list of column(s) names on success, NULL on error 
- \param vector map
+  \brief Fetches list of DB column names of vector map attribute table
+
+  \param Map vector map
+  \param field layer number
+
+  \return list of column(s) names on success
+  \return NULL on error 
 */
-
 char *Vect_get_column_names(struct Map_info *Map, int field)
 {
     int num_dblinks, ncols, col;
@@ -86,10 +92,13 @@
 }
 
 /*!
- \fn char *Vect_get_column_types(struct Map_info *Map, int field)
- \brief fetches list of DB column types of vector map attribute table
- \return list of column(s) types on success, NULL on error 
- \param vector map
+  \brief Fetches list of DB column types of vector map attribute table
+
+  \param Map vector map
+  \param field layer number
+
+  \return list of column(s) types on success
+  \return NULL on error 
 */
 char *Vect_get_column_types(struct Map_info *Map, int field)
 {
@@ -147,10 +156,13 @@
 
 
 /*!
- \fn char *Vect_get_column_names_types(struct Map_info *Map, int field)
- \brief fetches list of DB column names and types of vector map attribute table
- \return list of column(s) types on success, NULL on error 
- \param vector map
+  \brief Fetches list of DB column names and types of vector map attribute table
+
+  \param Map vector map
+  \param field layer number
+
+  \return list of column(s) types on success
+  \retutn NULL on error 
 */
 char *Vect_get_column_names_types(struct Map_info *Map, int field)
 {

Modified: grass/trunk/lib/vector/Vlib/error.c
===================================================================
--- grass/trunk/lib/vector/Vlib/error.c	2008-01-13 12:05:46 UTC (rev 29692)
+++ grass/trunk/lib/vector/Vlib/error.c	2008-01-13 12:41:21 UTC (rev 29693)
@@ -1,20 +1,23 @@
-/*
-****************************************************************************
-*
-* MODULE:       Vector library 
-*   	    	
-* AUTHOR(S):    Original author CERL, probably Dave Gerdes or Mike Higgins.
-*               Update to GRASS 5.7 Radim Blazek and David D. Gray.
-*
-* PURPOSE:      Higher level functions for reading/writing/manipulating vectors.
-*
-* COPYRIGHT:    (C) 2001 by the GRASS Development Team
-*
-*               This program is free software under the GNU General Public
-*   	    	License (>=v2). Read the file COPYING that comes with GRASS
-*   	    	for details.
-*
-*****************************************************************************/
+/*!
+  \file error.c
+  
+  \brief Vector library - error management
+  
+  Higher level functions for reading/writing/manipulating vectors.
+
+  (C) 2001-2008 by the GRASS Development Team
+  
+  This program is free software under the 
+  GNU General Public License (>=v2). 
+  Read the file COPYING that comes with GRASS
+  for details.
+  
+  \author Original author CERL, probably Dave Gerdes or Mike Higgins.
+  Update to GRASS 5.7 Radim Blazek and David D. Gray.
+  
+  \date 2001-2008
+*/
+
 #include <string.h>
 #include <grass/gis.h>
 #include <grass/Vect.h>
@@ -22,12 +25,15 @@
 static int fatal_err = GV_FATAL_EXIT;
 
 /*!
- \fn int Vect_set_fatal_error (int err)
- \brief set behaviour if fatal error occurs in some functions
- \return 0 on success
- \param    GV_FATAL_EXIT(default): print error message and exit,
-   GV_FATAL_PRINT: print error message and return error,
-   GV_FATAL_RETURN: return error
+  \brief Set behaviour if fatal error occurs in some functions
+
+  - GV_FATAL_EXIT(default): print error message and exit,
+  - GV_FATAL_PRINT: print error message and return error,
+  - GV_FATAL_RETURN: return error
+
+  \param  err error type
+
+  \return 0 on success
 */
 int 
 Vect_set_fatal_error (int err)
@@ -37,15 +43,16 @@
 }
 
 /*!
- \fn int Vect_get_fatal_error (void)
- \brief get behaviour for fatal error
- \return   GV_FATAL_EXIT(default): print error message and exit,
-   GV_FATAL_PRINT: print error message and return error,
-   GV_FATAL_RETURN: return error
- \param void
+  \brief Get behaviour for fatal error
+
+  \param 
+
+  \return GV_FATAL_EXIT(default): print error message and exit,
+  \return GV_FATAL_PRINT: print error message and return error,
+  \return GV_FATAL_RETURN: return error
 */
 int 
-Vect_get_fatal_error ()
+Vect_get_fatal_error (void)
 {
     return (fatal_err);
 }

Modified: grass/trunk/lib/vector/Vlib/field.c
===================================================================
--- grass/trunk/lib/vector/Vlib/field.c	2008-01-13 12:05:46 UTC (rev 29692)
+++ grass/trunk/lib/vector/Vlib/field.c	2008-01-13 12:41:21 UTC (rev 29693)
@@ -1,21 +1,26 @@
-/*
-****************************************************************************
-*
-* MODULE:       Vector library 
-*   	    	
-* AUTHOR(S):    Original author CERL, probably Dave Gerdes or Mike Higgins.
-*               Update to GRASS 5.7 Radim Blazek and David D. Gray.
-*
-* PURPOSE:      Higher level functions for reading/writing/manipulating vectors.
-*
-* COPYRIGHT:    (C) 2001 by the GRASS Development Team
-*
-*               This program is free software under the GNU General Public
-*   	    	License (>=v2). Read the file COPYING that comes with GRASS
-*   	    	for details.
-* TODO: see Vect_read_dblinks; activate auto-FID detection once 
-*       OGR_L_GetFIDColumn() is working or solution found if FID not available
-*****************************************************************************/
+/*!
+  \file field.c
+  
+  \brief Vector library - field(layer) related fns.
+  
+  Higher level functions for reading/writing/manipulating vectors.
+
+  TODO: see Vect_read_dblinks; activate auto-FID detection once 
+  OGR_L_GetFIDColumn() is working or solution found if FID not available
+
+  (C) 2001-2008 by the GRASS Development Team
+  
+  This program is free software under the 
+  GNU General Public License (>=v2). 
+  Read the file COPYING that comes with GRASS
+  for details.
+  
+  \author Original author CERL, probably Dave Gerdes or Mike Higgins.
+  Update to GRASS 5.7 Radim Blazek and David D. Gray.
+  
+  \date 2001-2008
+*/
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -27,10 +32,11 @@
 #include <gdal_version.h> /* needed for FID detection */
 
 /*!
- \fn struct dblinks *Vect_new_dblinks_struct ( void )
- \brief create and init new dblinks ctructure
- \return pointer to new dblinks structure
- \param void
+  \brief Create and init new dblinks ctructure
+
+  \param void
+
+  \return pointer to new dblinks structure
 */
 struct dblinks *
 Vect_new_dblinks_struct ( void )
@@ -48,10 +54,11 @@
 }
 
 /*!
- \fn void Vect_reset_dblinks ( struct dblinks *p )
- \brief reset dblinks structure
- \return void
- \param pointer to existing dblinks structure
+  \brief Reset dblinks structure
+
+  \param p pointer to existing dblinks structure
+
+  \return void
 */
 void
 Vect_reset_dblinks ( struct dblinks *p )
@@ -60,11 +67,18 @@
 }
 
 /*!
- \fn int Vect_map_add_dblink ( struct Map_info *Map, int number, char *name, char *table, char *key,
-                      char *db, char *driver )
- \brief add new db connection to Map_info structure
- \return 0 OK; -1 error
- \param pointer to existing Map structure
+  \brief Add new db connection to Map_info structure
+
+  \param Map vector map
+  \param number layer number
+  \param name layer name
+  \param table table name
+  \param key key name
+  \param db database name
+  \param driver driver name
+
+  \return 0 OK
+  \return -1 error
 */
 int
 Vect_map_add_dblink ( struct Map_info *Map, int number, char *name, char *table, char *key, 
@@ -73,34 +87,37 @@
     int ret;
 
     if (number == 0) {
-        G_warning (_("Field number must be 1 or greater."));
+        G_warning (_("Layer number must be 1 or greater"));
 	return -1;
     }
     
     if (Map->mode != GV_MODE_WRITE && Map->mode != GV_MODE_RW) {
-        G_warning (_("Cannot add database link, map is not opened in WRITE mode."));
+        G_warning (_("Unable to add database link, map is not opened in WRITE mode"));
 	return -1;
     }
     
     ret = Vect_add_dblink ( Map->dblnk, number, name, table, key, db, driver );
     if ( ret == -1 ) {
-        G_warning (_("Cannot add database link."));
+        G_warning (_("Unable to add database link"));
 	return -1;
     }
     /* write it immediately otherwise it is lost if module crashes */
     ret = Vect_write_dblinks ( Map );
     if ( ret == -1 ) {
-        G_warning (_("Cannot write database links."));
+        G_warning (_("Unable to write database links"));
 	return -1;
     }
     return 0;
 }
 
 /*!
- \fn int Vect_map_del_dblink ( struct Map_info *Map, int number)
- \brief delete db connection from Map_info structure
- \return 0 deleted, -1 error
- \param pointer to existing Map structure, field number
+  \brief Delete db connection from Map_info structure
+
+  \param Map vector map
+  \param field layer number 
+
+  \return 0 deleted
+  \return -1 error
 */
 int
 Vect_map_del_dblink ( struct Map_info *Map, int field)
@@ -133,7 +150,7 @@
     /* write it immediately otherwise it is lost if module crashes */
     ret = Vect_write_dblinks ( Map );
     if ( ret == -1 ) {
-        G_warning (_("Cannot write database links."));
+        G_warning (_("Unable to write database links"));
 	return -1;
     }
 
@@ -141,10 +158,13 @@
 }
 
 /*!
- \fn int Vect_map_check_dblink ( struct Map_info *Map, int field )
- \brief check if db connection exists in dblinks structure
- \return 1 dblink for field exists; 0 dblink does not exist for field
- \param pointer to Map structure, field number
+  \brief Check if db connection exists in dblinks structure
+
+  \param Map vector map
+  \param field layer number
+
+  \return 1 dblink for field exists
+  \return 0 dblink does not exist for field
 */
 int
 Vect_map_check_dblink ( struct Map_info *Map, int field )
@@ -153,10 +173,13 @@
 }
 
 /*!
- \fn int Vect_check_dblink ( struct dblinks *p, int field )
- \brief check if db connection exists in dblinks structure
- \return 1 dblink for field exists; 0 dblink does not exist for field
- \param pointer to existing dblinks structure, field number
+  \brief Check if db connection exists in dblinks structure
+
+  \param p pointer to existing dblinks structure
+  \param field layer number
+
+  \return 1 dblink for field exists
+  \return 0 dblink does not exist for field
 */
 int
 Vect_check_dblink ( struct dblinks *p, int field )
@@ -175,11 +198,17 @@
 
     
 /*!
- \fn int Vect_add_dblink ( struct dblinks *p, int number, char *name, char *table, char *key, 
-                            char *db, char *driver ) 
- \brief add new db connection to dblinks structure
- \return 0 OK; -1 error
- \param pointer to existing dblinks structure
+  \brief Add new db connection to dblinks structure
+
+  \param p pointer to existing dblinks structure
+  \param number layer number
+  \param name layer name
+  \param key key name
+  \param db database name
+  \param driver driver name
+
+  \return 0 OK
+  \return -1 error
 */
 int
 Vect_add_dblink ( struct dblinks *p, int number, char *name, char *table, char *key, char *db, char *driver )
@@ -189,7 +218,7 @@
     G_debug (3, "Field number <%d>, name <%s>", number, name);
     ret = Vect_check_dblink ( p, number );
     if ( ret == 1 ) {
-         G_warning (_("Field number <%d> or name <%s> already exists"), number, name);
+         G_warning (_("Layer number %d or name <%s> already exists"), number, name);
          return -1;
     }
 
@@ -222,17 +251,21 @@
 }
 
 /*!
- \fn struct field_info *Vect_default_field_info ( struct Map_info *Map, int  field, char *field_name, int  type)
- \brief get default information about link to database for new dblink
- \return pointer to new field_info structure
- \param pointer to map structure, category field
+  \brief Get default information about link to database for new dblink
+
+  \param Map vector map
+  \param field layer number
+  \param field_name layer name
+  \param type how many tables are linked to map: GV_1TABLE / GV_MTABLE 
+
+  \return pointer to new field_info structure
 */
 struct field_info
 *Vect_default_field_info (
-    struct Map_info *Map,  /* pointer to map structure */		
-    int  field,    /* category field */
-    char *field_name, /* field name or NULL */
-    int  type ) /* how many tables are linked to map: GV_1TABLE / GV_MTABLE */
+			  struct Map_info *Map,  
+			  int  field,    
+			  char *field_name, 
+			  int  type ) 
 {
     struct field_info *fi;
     char buf[1000], buf2[1000];
@@ -250,7 +283,7 @@
 
     if ( !connection.driverName && !connection.databaseName ) { /* Set default values and create dbf db dir */
 	G_warning ( _("Default driver / database set to:\n"
-		    "driver: dbf\ndatabase: $GISDBASE/$LOCATION_NAME/$MAPSET/dbf/") );
+		      "driver: dbf\ndatabase: $GISDBASE/$LOCATION_NAME/$MAPSET/dbf/") );
 	    
 	connection.driverName = "dbf";
 	connection.databaseName = "$GISDBASE/$LOCATION_NAME/$MAPSET/dbf/";
@@ -298,11 +331,15 @@
 }
 
 /*!
- \fn struct field_info *Vect_get_dblink (  struct Map_info *Map, int link)
- \brief get information about link to database, variables are substituted by values,
-        link is index to array of dblinks
- \return pointer to new field_info structure
- \param pointer Map_info structure, link number
+  \brief Get information about link to database.
+
+  Variables are substituted by values, link is index to array of
+  dblinks
+
+  \param Map vector map
+  \param link link id
+
+  \return pointer to new field_info structure
 */
 struct field_info
 *Vect_get_dblink (  struct Map_info *Map, int link )
@@ -312,7 +349,7 @@
     G_debug (1, "Vect_get_dblink(): link = %d", link);
 
     if ( link >= Map->dblnk->n_fields ) {
-	G_warning ( _("Requested dblink %d, maximum link number %d"), link, Map->dblnk->n_fields - 1 );
+	G_warning (_("Requested dblink %d, maximum link number %d"), link, Map->dblnk->n_fields - 1 );
 	return NULL;
     }
 
@@ -333,11 +370,16 @@
 }
 
 /*!
- \fn struct field_info *Vect_get_field (  struct Map_info *Map, int field )
- \brief get information about link to database, variables are substituted by values,
-        field is number of requested field
- \return pointer to new field_info structure or NULL
- \param pointer Map_info structure, field number
+ \brief Get information about link to database.
+
+ Variables are substituted by values,
+ field is number of requested field
+ 
+ \param Map vector map
+ \param field layer number
+
+ \return pointer to new field_info structure
+ \return NULL if not found
 */
 struct field_info
 *Vect_get_field (  struct Map_info *Map, int field )
@@ -358,10 +400,14 @@
 }
 
 /*!
- \fn int *Vect_read_dblinks ( struct Map_info *Map)
- \brief read dblinks to existing structure, variables are not substituted by values
- \return number of links read or -1 on error
- \param pointer to map structure
+  \brief Read dblinks to existing structure.
+
+  Variables are not substituted by values.
+
+  \param Map vector map
+
+  \return number of links read
+  \return -1 on error
 */
 int
 Vect_read_dblinks ( struct Map_info *Map )
@@ -438,7 +484,7 @@
 	driver = db_start_driver_open_database ( "ogr", Map->fInfo.ogr.dsn );
 
 	if ( driver == NULL ) {
-	    G_warning (_("Cannot open OGR DBMI driver."));
+	    G_warning (_("Unable to open OGR DBMI driver"));
 	    return -1;
 	}
 
@@ -467,7 +513,8 @@
 
 		   if (db_open_select_cursor(driver, &sql, &cursor, DB_SEQUENTIAL) != DB_OK) {
 		      /* neither FID nor ogc_fid nor ogr_fid nor gid available */
-		      G_warning ("All FID tests failed. Neither 'FID' nor 'ogc_fid' nor 'ogr_fid' nor 'gid' available in OGR DB table");
+		       G_warning (_("All FID tests failed. Neither 'FID' nor 'ogc_fid' "
+				    "nor 'ogr_fid' nor 'gid' available in OGR DB table"));
 		      db_close_database_shutdown_driver ( driver );
 		      return 0;
 		   } else
@@ -561,17 +608,19 @@
 }
 
 /*!
- \fn int *Vect_write_dblinks ( struct Map_info *Map )
- \brief write dblinks to file
- \return 0 OK, -1 on error
- \param pointer to map name, pointer to mapset name, pointer to dblinks structure
+  \brief Write dblinks to file
+  
+  \param Map vector map
+
+  \return 0 OK
+  \return -1 on error
 */
 int
 Vect_write_dblinks ( struct Map_info *Map )
 {
     int    i;	
     FILE *fd;
-    char file[1024], buf[1024];
+    char file[GPATH_MAX], buf[GPATH_MAX];
     struct dblinks *dbl;    
     
     G_debug (1, "Vect_write_dblinks(): map = %s, mapset = %s", Map->name, Map->mapset );
@@ -584,7 +633,7 @@
 
     fd = fopen ( file, "w" );
     if ( fd == NULL ) { /* This may be correct, no tables defined */
-	G_warning ( "Cannot open vector database definition file: '%s'", file);
+	G_warning (_("Unable to open vector database definition file '%s'"), file);
 	return (-1);
     }
 
@@ -606,10 +655,12 @@
 }
 
 /*!
- \fn chart *Vect_subst_var ( char *in, struct Map_info *Map ) 
- \brief substitute variable in string
- \return pointer to new string
- \param pointer to map
+  \brief Substitute variable in string
+  
+  \param in current string
+  \param Map vector map
+
+  \return pointer to new string
 */
 char *
 Vect_subst_var ( char *in, struct Map_info *Map )
@@ -654,16 +705,21 @@
 }
 
 /*!
- \brief rewrite 'dbln' file, should be used by GRASS modules which update
-        database tables, so that other applications know that tables
-	were changed and can reload data
- \param pointer to map
+  \brief Rewrite 'dbln' file
+  
+  Should be used by GRASS modules which update
+  database tables, so that other applications know that tables
+  were changed and can reload data.
+
+  \param Map vector map
+
+  \return void
 */
 void Vect_set_db_updated ( struct Map_info *Map )
 {
     if ( strcmp(Map->mapset,G_mapset() ) != 0 ) {
-	G_fatal_error ( _("Bug: attempt to update map which is not in current mapset." ) );
+	G_fatal_error (_("Bug: attempt to update map which is not in current mapset"));
     }
-
+    
     Vect_write_dblinks ( Map ) ;
 }

Modified: grass/trunk/lib/vector/Vlib/graph.c
===================================================================
--- grass/trunk/lib/vector/Vlib/graph.c	2008-01-13 12:05:46 UTC (rev 29692)
+++ grass/trunk/lib/vector/Vlib/graph.c	2008-01-13 12:41:21 UTC (rev 29693)
@@ -1,24 +1,31 @@
-/****************************************************************************
-*
-* MODULE:       Vector library 
-*   	    	
-* AUTHOR(S):    Radim Blazek
-*
-* PURPOSE:      Higher level functions for reading/writing/manipulating vectors.
-*
-*               This program is free software under the GNU General Public
-*   	    	License (>=v2). Read the file COPYING that comes with GRASS
-*   	    	for details.
-*
-*****************************************************************************/
+/*!
+  \file graph.c
+  
+  \brief Vector library - graph manipulation
+  
+  Higher level functions for reading/writing/manipulating vectors.
+
+  TODO: Vect_graph_free ( GRAPH *graph )
+
+  (C) 2001-2008 by the GRASS Development Team
+  
+  This program is free software under the 
+  GNU General Public License (>=v2). 
+  Read the file COPYING that comes with GRASS
+  for details.
+  
+  \author Radim Blazek
+  
+  \date 2001-2008
+*/
+
 #include <stdlib.h>
 #include <string.h>
 #include <grass/gis.h>
 #include <grass/dbmi.h>
 #include <grass/Vect.h>
+#include <grass/glocale.h>
 
-/* TODO: Vect_graph_free ( GRAPH *graph ) */
-
 static int From_node;   /* from node set in SP and used by clipper for first arc */  
 
 static int clipper ( dglGraph_s    *pgraph ,
@@ -57,12 +64,12 @@
 }
 
 /*!
- \fn Vect_graph_init ( GRAPH *graph, int nodes_costs )
- \brief Build network graph. Internal format for edge costs is integer, costs are multiplied
-        before conversion to int by 1000. 
-	Costs -1 for infinity i.e. arc or node is closed and cannot be traversed.
- \param GRAPH *graph
- \param nodes_costs use node costs
+  \brief Initialize graph structure
+
+  \param graph poiter to graph structure
+  \param nodes_costs use node costs
+  
+  \return void
 */
 void
 Vect_graph_init ( GRAPH *graph, int nodes_costs )
@@ -78,12 +85,15 @@
 }
 
 /*!
- \fn Vect_graph_init ( GRAPH *graph, int nodes_costs )
- \brief Build network graph. Internal format for edge costs is integer, costs are multiplied
-        before conversion to int by 1000. 
-	Costs -1 for infinity i.e. arc or node is closed and cannot be traversed.
- \param GRAPH *graph
- \param nodes_costs use node costs
+  \brief Build network graph.
+
+  Internal format for edge costs is integer, costs are multiplied
+  before conversion to int by 1000. 
+  Costs -1 for infinity i.e. arc or node is closed and cannot be traversed.
+
+  \param graph poiter to graph structure
+
+  \return void
 */
 void
 Vect_graph_build ( GRAPH *graph )
@@ -93,19 +103,24 @@
     G_debug (3, "Vect_graph_build()" ); 
 
     ret = dglFlatten ( graph );
-    if ( ret < 0 ) G_fatal_error ("GngFlatten error");
+    if ( ret < 0 )
+      G_fatal_error (_("GngFlatten error"));
 }
 
 /*!
- \fn Vect_graph_add_edge ( GRAPH *graph, int from, int to, double costs, int id  )
- \brief Add edge to graph. 
-        Internal format for edge costs is integer, costs are multiplied before conversion to int by 1000. 
-	Costs -1 for infinity i.e. arc or node is closed and cannot be traversed.
- \param GRAPH *graph
- \param from from node
- \param to to node
- \param costs 
+  \brief Add edge to graph. 
+  
+  Internal format for edge costs is integer, costs are multiplied
+  before conversion to int by 1000.  Costs -1 for infinity i.e. arc or
+  node is closed and cannot be traversed.
+  
+  \param graph poiter to graph structure
+  \param from from node
+  \param to to node
+  \param costs costs value
  \param id edge id
+ 
+ \return void
 */
 void
 Vect_graph_add_edge ( GRAPH *graph, int from, int to, double costs, int id  )
@@ -118,17 +133,22 @@
     dglcosts = (dglInt32_t) costs * 1000;
 	    
     ret = dglAddEdge ( graph, (dglInt32_t)from, (dglInt32_t)to, dglcosts, (dglInt32_t)id );
-    if ( ret < 0 ) G_fatal_error ("Cannot add network arc");
+    if ( ret < 0 )
+	G_fatal_error (_("Unable to add network arc"));
 }
 
 /*!
- \fn Vect_graph_set_node_costs ( GRAPH *graph, int node, double costs )
- \brief Set node costs
-        Internal format for edge costs is integer, costs are multiplied before conversion to int by 1000. 
-	Costs -1 for infinity i.e. arc or node is closed and cannot be traversed.
- \param GRAPH *graph
- \param node
- \param costs 
+  \brief Set node costs
+  
+  Internal format for edge costs is integer, costs are multiplied
+  before conversion to int by 1000.  Costs -1 for infinity i.e. arc or
+  node is closed and cannot be traversed.
+ 
+  \param graph poiter to graph structure
+  \param node node id
+  \param costs costs value
+
+  \return void
 */
 void
 Vect_graph_set_node_costs ( GRAPH *graph, int node, double costs )
@@ -144,17 +164,21 @@
 }
 
 /*!
- \fn int Vect_graph_shortest_path ( GRAPH *graph, int from, int to, struct ilist *List, double *cost ) 
- \brief Find shortest path. Costs for 'from' and 'to' nodes are not considered (SP found even if
-        'from' or 'to' are 'closed' (costs = -1) and costs of these nodes are not added to SP costs result.
- \return number of segments : ( 0 is correct for from = to, or List == NULL ),
-              ? sum of costs is better return value,
-           -1 : destination unreachable
- \param graph
- \param from
- \param to
- \param List
- \param cost
+  \brief Find shortest path.
+  
+  Costs for 'from' and 'to' nodes are not considered (SP found even if
+  'from' or 'to' are 'closed' (costs = -1) and costs of these
+  nodes are not added to SP costs result.
+  
+  \param graph pointer to graph structure
+  \param from from node
+  \param to to node
+  \param List list of line ids
+  \param cost costs value
+
+  \return number of segments
+  \return 0 is correct for from = to, or List == NULL ), ? sum of costs is better return value,
+  \return -1 destination unreachable
 */
 int
 Vect_graph_shortest_path ( GRAPH *graph, int from, int to, struct ilist *List, double *cost ) 
@@ -191,7 +215,7 @@
 	return -1;
     }
     else if ( nRet < 0 ) {
-        fprintf( stderr , "dglShortestPath error: %s\n", dglStrerror( graph ) );
+        G_warning(_("dglShortestPath error: %s"), dglStrerror( graph ) );
 	return -1;
     }
     
@@ -224,4 +248,3 @@
 
     return (cArc);
 }
-

Modified: grass/trunk/lib/vector/Vlib/header.c
===================================================================
--- grass/trunk/lib/vector/Vlib/header.c	2008-01-13 12:05:46 UTC (rev 29692)
+++ grass/trunk/lib/vector/Vlib/header.c	2008-01-13 12:41:21 UTC (rev 29693)
@@ -1,35 +1,38 @@
-/*
-****************************************************************************
-*
-* MODULE:       Vector library 
-*   	    	
-* AUTHOR(S):    Original author CERL, probably Dave Gerdes or Mike Higgins.
-*               Update to GRASS 5.7 Radim Blazek and David D. Gray.
-*
-* PURPOSE:      Higher level functions for reading/writing/manipulating vectors.
-*
-* COPYRIGHT:    (C) 2001 by the GRASS Development Team
-*
-*               This program is free software under the GNU General Public
-*   	    	License (>=v2). Read the file COPYING that comes with GRASS
-*   	    	for details.
-*
-*****************************************************************************/
+/*!
+  \file header.c
+  
+  \brief Vector library - header manipulation
+  
+  Higher level functions for reading/writing/manipulating vectors.
+
+  (C) 2001-2008 by the GRASS Development Team
+  
+  This program is free software under the 
+  GNU General Public License (>=v2). 
+  Read the file COPYING that comes with GRASS
+  for details.
+  
+  \author Original author CERL, probably Dave Gerdes or Mike Higgins.
+  Update to GRASS 5.7 Radim Blazek and David D. Gray.
+  
+  \date 2001-2008
+*/
+
 #include <stdlib.h>
 #include <string.h>
 #include <grass/gis.h>
 #include <grass/Vect.h>
 #include <grass/glocale.h>
 
-
 static int lookup(char *file, char *key, char *value, size_t len);
 
 
 /*!
- \fn int Vect_print_header (struct Map_info *Map)
- \brief print vector map header
- \return 0 on success
- \param Map_info structure
+  \brief Print vector map header
+
+  \param Map vector map
+
+  \return 0 on success
 */
 int 
 Vect_print_header (struct Map_info *Map)
@@ -45,10 +48,11 @@
 
 
 /*!
- \fn int Vect_read_header (struct Map_info *Map)
- \brief read vector map header from map head file
- \return 0 on success
- \param Map_info structure
+  \brief Read vector map header from map head file
+
+  \param Map vector map
+
+  \return 0 on success
 */
 int
 Vect_read_header (struct Map_info *Map)
@@ -59,10 +63,11 @@
 
 
 /*!
- \fn int Vect_write_header (struct Map_info *Map)
- \brief write vector map header to map head file
- \return 0 on success
- \param Map_info structure
+  \brief Write vector map header to map head file
+
+  \param Map vector map
+
+  \return 0 on success
 */
 int 
 Vect_write_header (struct Map_info *Map)
@@ -73,10 +78,14 @@
 }
 
 
-/* Vect__write_head () writes head information to text file.
- * returns: GRASS_OK - success
- *          GRASS_ERR - error
- */
+/*! 
+  \brief Writes head information to text file.
+
+  \param Map vector map
+
+  \return GRASS_OK - success
+  \return GRASS_ERR - error
+*/
 int
 Vect__write_head (struct Map_info *Map)
 {
@@ -88,7 +97,7 @@
     head_fp = G_fopen_new (buf, GRASS_VECT_HEAD_ELEMENT);
     if ( head_fp == NULL)
       {
-        G_warning ("Cannot Open Vector %s@%s Head File\n", Map->name, Map->mapset);
+        G_warning (_("Unable to open header file of vector <%s>"), Vect_get_full_name(Map));
         return (GRASS_ERR);
       }
 	
@@ -106,10 +115,14 @@
     return (GRASS_OK);
 }
 
-/* Vect__read_head () reads head information from text file (GRASS_VECT_HEAD_ELEMENT). 
- * returns: GRASS_OK - success
- *          GRASS_ERR - error
- */
+/*!
+  \brief Reads head information from text file (GRASS_VECT_HEAD_ELEMENT).
+
+  \param Map vector map
+  
+  \return GRASS_OK - success
+  \return GRASS_ERR - error
+*/
 int
 Vect__read_head (struct Map_info *Map)
 {
@@ -133,14 +146,14 @@
     head_fp = G_fopen_old (buff, GRASS_VECT_HEAD_ELEMENT, Map->mapset); 
     if ( head_fp == NULL)
       {
-        G_warning ("Cannot Open Vector %s Head File\n", Map->name);
+        G_warning (_("Unable to open header file of vector <%s>"), Vect_get_full_name(Map));
         return (GRASS_ERR);
       }
    
     while ( G_getl2 (buff, 2000, head_fp) ) {
 
 	if (!(ptr = G_index (buff, ':'))) {
-	  G_warning ( "Corrupted row in head: %s\n", buff );
+	  G_warning (_("Corrupted row in head: %s"), buff );
  	  continue;
 	}
 
@@ -171,20 +184,19 @@
 	else if (strncmp (buff, "MAP THRESH:", sizeof(char)*11) == 0)
 	  Vect_set_thresh ( Map, atof (ptr) );  
 	else 
-	  G_warning("Unknown keyword %s in vector head\n", buff);
+	  G_warning(_("Unknown keyword %s in vector head"), buff);
     }
     
     fclose (head_fp);
     return (GRASS_OK);
 }
 
-/* set and get header informations */
-/* name, mapset, full name */
 /*!
- \fn char *Vect_get_name (struct Map_info *Map)
- \brief get map name
- \return  on success
- \param Map_info structure
+  \brief Get map name
+
+  \param Map vector map
+
+  \return poiter to map name
 */
 char *
 Vect_get_name (struct Map_info *Map)
@@ -193,10 +205,11 @@
 }
 
 /*!
- \fn char *Vect_get_mapset (struct Map_info *Map)
- \brief get mapset name
- \return  on success
- \param Map_info structure
+  \brief Get mapset name
+
+  \param Map vector map
+
+  \return poiter to mapset name
 */
 char *
 Vect_get_mapset (struct Map_info *Map)
@@ -205,26 +218,29 @@
 }
 
 /*!
- \fn char *Vect_get_full_name (struct Map_info *Map)
- \brief get full name
- \return  on success
- \param Map_info structure
+  \brief Get full map name
+  
+  \param Map vector map
+
+  \return poiter to map name (name at mapset)
 */
 char *
 Vect_get_full_name (struct Map_info *Map)
 {
     char *ptr;
 
-    ptr = G_malloc ( strlen(Map->name) +  strlen(Map->mapset) + 2 );
+    ptr = (char *) G_malloc ( strlen(Map->name) +  strlen(Map->mapset) + 2 );
     sprintf (ptr, "%s@%s", Map->name, Map->mapset);
     return (ptr);
 }
 
 /*!
- \fn int Vect_is_3d (struct Map_info *Map)
- \brief check if vector map is 3D (with z)
- \return 1 on success, 0 of not 3D
- \param Map_info structure
+  \brief Check if vector map is 3D (with z)
+
+  \param Map vector map
+
+  \return 1 map is 3D
+  \return 0 map is not 3D
 */
 int
 Vect_is_3d (struct Map_info *Map )
@@ -233,24 +249,28 @@
 }
 
 /*!
- \fn int Vect_set_organization (struct Map_info *Map, char *str )
- \brief set organization string in map header
- \return 0 on success
- \param Map_info structure, organization string
+  \brief Set organization string in map header
+
+  \param Map vector map
+  \param str organization name
+
+  \return 0
 */
 int
 Vect_set_organization (struct Map_info *Map, char *str )
 {
     G_free ( Map->head.organization );
     Map->head.organization = G_store ( str );
-    return (0);
+
+    return 0;
 }
 
 /*!
- \fn char *Vect_get_organization (struct Map_info *Map)
- \brief get organization string from map header
- \return organization string
- \param Map_info structure
+  \brief Get organization string from map header
+
+  \param Map vector map
+  
+  \return organization string
 */
 char *
 Vect_get_organization (struct Map_info *Map)
@@ -259,12 +279,16 @@
 }
 
 /*!
- \fn int Vect_set_date (struct Map_info *Map, char *str )
- \brief set date of digitization string in map header
- \return 0 on success
- \param Map_info structure,  date of digitization string
+  \brief Set date of digitization string in map header
+
+  SUGGESTION: this should be coupled to DateTime functions to support
+  time series
+
+  \param Map vector map
+  \param str data string
+  
+  \return 0 on success
 */
-/* SUGGESTION: this should be coupled to DateTime functions to support time series*/
 int
 Vect_set_date (struct Map_info *Map, char *str )
 {
@@ -274,12 +298,15 @@
 }
 
 /*!
- \fn char *Vect_get_date (struct Map_info *Map)
- \brief get date of digitization string from map header
- \return date of digitization string
- \param Map_info structure
+  \brief Get date of digitization string from map header
+
+  SUGGESTION: this should be coupled to DateTime functions to support
+  time series
+
+  \param Map vector map
+
+  \return date of digitization string
 */
-/* SUGGESTION: this should be coupled to DateTime functions to support time series*/
 char *
 Vect_get_date (struct Map_info *Map)
 {
@@ -287,10 +314,12 @@
 }
 
 /*!
- \fn int Vect_set_person (struct Map_info *Map, char *str )
- \brief set  user name string who digitized the map in map header
- \return 0 on success
- \param Map_info structure,   user name string
+  \brief Set user name string who digitized the map in map header
+
+  \param Map vector map
+  \param str user name string
+
+  \return 0 on success
 */
 int
 Vect_set_person (struct Map_info *Map, char *str )
@@ -301,10 +330,11 @@
 }
 
 /*!
- \fn char *Vect_get_person (struct Map_info *Map)
- \brief get user name string who digitized the map from map header
- \return user name string
- \param Map_info structure
+  \brief Get user name string who digitized the map from map header
+
+  \param Map vector map
+
+  \return user name string
 */
 char *
 Vect_get_person (struct Map_info *Map)
@@ -313,10 +343,12 @@
 }
 
 /*!
- \fn int Vect_set_map_name (struct Map_info *Map, char *str )
- \brief set  map name string in map header
- \return 0 on success
- \param Map_info structure, map name string
+  \brief Set map name string in map header
+
+  \param Map vector map
+  \param str map name string
+
+  \return 0 on success
 */
 int
 Vect_set_map_name (struct Map_info *Map, char *str )
@@ -327,10 +359,11 @@
 }
 
 /*!
- \fn char *Vect_get_map_name (struct Map_info *Map)
- \brief get map name string in map header
- \return map name string
- \param Map_info structure
+  \brief Get map name string in map header
+
+  \param Map vector map
+
+  \return map name string
 */
 char *
 Vect_get_map_name (struct Map_info *Map)
@@ -339,10 +372,12 @@
 }
 
 /*!
- \fn int Vect_set_map_date (struct Map_info *Map, char *str )
- \brief set date string when the source map was originally produced in map header
- \return 0 on success
- \param Map_info structure,  date when the source map was originally produced string
+  \brief Set date string when the source map was originally produced in map header
+
+  \param Map vector map
+  \param str date when the source map was originally produced string
+
+  \return 0 on success
 */
 int
 Vect_set_map_date (struct Map_info *Map, char *str )
@@ -353,10 +388,11 @@
 }
 
 /*!
- \fn char *Vect_get_map_date (struct Map_info *Map)
- \brief get date string when the source map was originally produced in map header
- \return date when the source map was originally produced string
- \param Map_info structure
+  \brief Get date string when the source map was originally produced in map header
+
+  \param Map vector map
+
+  \return date when the source map was originally produced string
 */
 char *
 Vect_get_map_date (struct Map_info *Map)
@@ -365,10 +401,12 @@
 }
 
 /*!
- \fn int Vect_set_scale (struct Map_info *Map,  int scale)
- \brief set  map scale in map header
- \return 0 on success
- \param Map_info structure, map scale
+  \brief Set map scale in map header
+
+  \param Map vector map
+  \param map scale
+
+  \return 0 on success
 */
 int
 Vect_set_scale (struct Map_info *Map, int scale )
@@ -378,10 +416,11 @@
 }
 
 /*!
- \fn int Vect_get_scale (struct Map_info *Map)
- \brief get  map scale from map header
- \return map scale
- \param Map_info structure
+  \brief Get map scale from map header
+  
+  \param Map vector map
+
+  \return map scale
 */
 int
 Vect_get_scale (struct Map_info *Map)
@@ -390,10 +429,12 @@
 }
 
 /*!
- \fn int Vect_set_comment (struct Map_info *Map, char *str )
- \brief set comment or other info string in map header
- \return 0 on success
- \param Map_info structure, comment or other info string
+  \brief Set comment or other info string in map header
+
+  \param Map vector map
+  \param str comment or other info string
+
+  \return 0 on success
 */
 int
 Vect_set_comment (struct Map_info *Map, char *str )
@@ -404,10 +445,11 @@
 }
 
 /*!
- \fn  char *Vect_get_comment (struct Map_info *Map )
- \brief get comment or other info string from map header
- \return comment or other info string
- \param Map_info structure
+  \brief Get comment or other info string from map header
+
+  \param Map vector map
+
+  \return comment or other info string
 */
 char *
 Vect_get_comment (struct Map_info *Map)
@@ -416,10 +458,12 @@
 }
 
 /*!
- \fn int Vect_set_zone (struct Map_info *Map, int zone )
- \brief set projection zone in map header
- \return 0 on success
- \param Map_info structure, projection zone
+  \brief Set projection zone in map header
+
+  \param Map vector map
+  \param zone projection zone
+
+  \return 0 on success
 */
 int
 Vect_set_zone (struct Map_info *Map, int zone )
@@ -430,10 +474,11 @@
 
 
 /*!
- \fn int Vect_get_zone (struct Map_info *Map)
- \brief get projection zone from map header
- \return projection zone
- \param Map_info structure
+  \brief Get projection zone from map header
+
+  \param Map vector map
+
+  \return projection zone
 */
 int
 Vect_get_zone (struct Map_info *Map)
@@ -442,14 +487,14 @@
 }
 
 /*!
- \fn int Vect_get_proj (struct Map_info *Map)
- \brief get projection from map header
- \param Map_info structure
- \return Returns the projection type of map
-       PROJECTION_XY  0 - x,y (Raw imagery),
-       PROJECTION_UTM 1 - UTM   Universal Transverse Mercator,
-       PROJECTION_SP  2 - State Plane (in feet),
-       PROJECTION_LL  3 - Latitude-Longitude
+  \brief Get projection from map header
+
+  \param Map vector map
+
+  \return PROJECTION_XY 0 - x,y (Raw imagery),
+  \return PROJECTION_UTM 1 - UTM   Universal Transverse Mercator,
+  \return PROJECTION_SP  2 - State Plane (in feet),
+  \return PROJECTION_LL  3 - Latitude-Longitude
 */
 int
 Vect_get_proj (struct Map_info *Map)
@@ -459,17 +504,17 @@
 
 
 /*!
- \fn char *Vect_get_proj_name (struct Map_info *Map)
- \brief query cartographic projection name of vector map
+  \brief Query cartographic projection name of vector map
  
- Returns a pointer to a string which is a printable name for
- projection code <b>proj</b> (as returned by <i>Vect_get_proj()</i>). Returns
- NULL if <b>proj</b> is not a valid projection.
+  Returns a pointer to a string which is a printable name for
+  projection code <b>proj</b> (as returned by <i>Vect_get_proj()</i>). Returns
+  NULL if <b>proj</b> is not a valid projection.
  
- \param proj
- \return char * 
- */
+  \param Map vector map
 
+  \return poiter to projection name
+*/
+
 char *Vect_get_proj_name (struct Map_info *Map)
 {
     int n;
@@ -489,12 +534,13 @@
     return name;
 }
 
+/*!
+  \brief Set threshold used for digitization in map header
 
-/*!
- \fn int Vect_set_thresh (struct Map_info *Map, double thresh )
- \brief set threshold used for digitization in map header
- \return 0 on success
- \param Map_info structure, threshold used for digitization
+  \param Map vector map
+  \param thresh threshold used for digitization
+
+  \return 0 on success
 */
 int
 Vect_set_thresh (struct Map_info *Map, double thresh )
@@ -505,10 +551,11 @@
 }
 
 /*!
- \fn double Vect_get_zone (struct Map_info *Map )
- \brief get threshold used for digitization from map header
- \return threshold used for digitization
- \param Map_info structure
+  \brief Get threshold used for digitization from map header
+
+  \param Map vector map
+
+  \return threshold used for digitization
 */
 double
 Vect_get_thresh (struct Map_info *Map)
@@ -521,7 +568,7 @@
 /* from lib/gis/proj3.c */
 static int lookup(char *file, char *key, char *value, size_t len)
 {
-    char path[1024];
+    char path[GPATH_MAX];
 
     G__file_name (path, "", file, "PERMANENT");
     return G_lookup_key_value_from_file(path, key, value, (int)len) == 1;

Modified: grass/trunk/lib/vector/Vlib/hist.c
===================================================================
--- grass/trunk/lib/vector/Vlib/hist.c	2008-01-13 12:05:46 UTC (rev 29692)
+++ grass/trunk/lib/vector/Vlib/hist.c	2008-01-13 12:41:21 UTC (rev 29693)
@@ -1,29 +1,34 @@
-/****************************************************************************
-*
-* MODULE:       Vector library 
-*   	    	
-* AUTHOR(S):    Radim Blazek
-*
-*
-* PURPOSE:      Higher level functions for reading/writing/manipulating vectors.
-*
-* COPYRIGHT:    (C) 2001 by the GRASS Development Team
-*
-*               This program is free software under the GNU General Public
-*   	    	License (>=v2). Read the file COPYING that comes with GRASS
-*   	    	for details.
-*
-*****************************************************************************/
+/*!
+  \file hist.c
+  
+  \brief Vector library - history manipulation
+  
+  Higher level functions for reading/writing/manipulating vectors.
+
+  (C) 2001-2008 by the GRASS Development Team
+  
+  This program is free software under the 
+  GNU General Public License (>=v2). 
+  Read the file COPYING that comes with GRASS
+  for details.
+  
+  \author Radim Blazek
+  
+  \date 2001-2008
+*/
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
 #include <grass/Vect.h>
 
 /*!
- \fn int Vect_hist_command ( struct Map_info *Map )
- \brief write command info to history file
- \return 0 OK, -1 error
- \param struct Map_info *Map
+  \brief Write command info to history file
+
+  \param Map vector map
+
+  \return 0 OK
+  \return -1 error
 */
 int 
 Vect_hist_command ( struct Map_info *Map )
@@ -49,10 +54,12 @@
 }
 
 /*!
- \fn int Vect_hist_write ( struct Map_info *Map, char *str )
- \brief write string to history file
- \return the number of characters printed
- \param struct Map_info *Map, char *str
+  \brief Write string to history file
+
+  \param Map vector map
+  \param str string to write
+
+  \return the number of characters printed
 */
 int 
 Vect_hist_write ( struct Map_info *Map, char *str )
@@ -67,12 +74,15 @@
 }
 
 /*!
- \fn char Vect_hist_read ( char *s, int size, struct Map_info *Map )
- \brief reads one line from history file without newline character
- \return return s on success, and NULL on error or EOF
- \param s buffer, allocated space must be size+1
- \param size maximum number of character
- \param Map 
+  \brief Reads one line from history file without newline character
+
+  \param s buffer, allocated space must be size+1
+  \param size maximum number of character
+  \param Map vector map
+
+  \return return s on success
+  \return NULL on error
+  \return EOF end of file
 */
 char * 
 Vect_hist_read ( char *s, int size, struct Map_info *Map )
@@ -90,10 +100,11 @@
 }
 
 /*!
- \fn int Vect_hist_rewind ( struct Map_info *Map )
- \brief rewind history file
- \return the number of characters printed
- \param struct Map_info *Map, char *str
+  \brief Rewind history file
+
+  \param Map vector map
+
+  \return void
 */
 void 
 Vect_hist_rewind ( struct Map_info *Map )
@@ -105,10 +116,13 @@
 }
 
 /*!
- \fn int Vect_hist_copy ( struct Map_info *In, struct Map_info *Out )
- \brief copy history from one map to another
- \return 0 OK, -1 error
- \param struct Map_info *In, struct Map_info *Out
+  \brief Copy history from one map to another
+
+  \param In input vector map
+  \param Out output vector map
+
+  \return 0 OK
+  \return -1 error
 */
 int 
 Vect_hist_copy ( struct Map_info *In, struct Map_info *Out )
@@ -145,4 +159,3 @@
     Vect_hist_write ( Out, "---------------------------------------------------------------------------------\n");
     return ( 0 ); 
 }
-

Modified: grass/trunk/lib/vector/Vlib/init_head.c
===================================================================
--- grass/trunk/lib/vector/Vlib/init_head.c	2008-01-13 12:05:46 UTC (rev 29692)
+++ grass/trunk/lib/vector/Vlib/init_head.c	2008-01-13 12:41:21 UTC (rev 29693)
@@ -1,31 +1,37 @@
-/*
-****************************************************************************
-*
-* MODULE:       Vector library 
-*   	    	
-* AUTHOR(S):    Original author CERL, probably Dave Gerdes or Mike Higgins.
-*               Update to GRASS 5.7 Radim Blazek and David D. Gray.
-*
-* PURPOSE:      Higher level functions for reading/writing/manipulating vectors.
-*
-* COPYRIGHT:    (C) 2001 by the GRASS Development Team
-*
-*               This program is free software under the GNU General Public
-*   	    	License (>=v2). Read the file COPYING that comes with GRASS
-*   	    	for details.
-*
-*****************************************************************************/
+/*!
+  \file init_head.c
+  
+  \brief Vector library - init header of vector map
+  
+  Higher level functions for reading/writing/manipulating vectors.
+
+  Initialize Head structure.  To make sure that we are not writing
+  out garbage to a file.
+
+  (C) 2001-2008 by the GRASS Development Team
+  
+  This program is free software under the 
+  GNU General Public License (>=v2). 
+  Read the file COPYING that comes with GRASS
+  for details.
+  
+  \author Original author CERL, probably Dave Gerdes or Mike Higgins.
+  Update to GRASS 5.7 Radim Blazek and David D. Gray.
+  
+  \date 2001-2008
+*/
+
 #include <string.h>
 #include <grass/gis.h>
 #include <grass/Vect.h>
 
-/*
-   **
-   **  Initialize Head structure.  To make sure that we are not writing
-   **    out garbage to a file.
-   **
- */
+/*!
+  \brief Initialize head structure
+  
+  \param Map vector map
 
+  \return 0
+*/
 int 
 Vect__init_head (struct Map_info *Map)
 {
@@ -58,10 +64,12 @@
 }
 
 /*!
- \fn int Vect_copy_head_data (struct Map_info *from, struct Map_info *to)
- \brief copy header data from one to another map
- \return 0 on success, ?? on error
- \param from Map_info structure, to Map_info structure
+  \brief Copy header data from one to another map
+
+  \param from target vector map 
+  \param to destination vector map
+
+  \return 0 on success
 */
 int 
 Vect_copy_head_data (struct Map_info *from, struct Map_info *to)

Modified: grass/trunk/lib/vector/Vlib/intersect.c
===================================================================
--- grass/trunk/lib/vector/Vlib/intersect.c	2008-01-13 12:05:46 UTC (rev 29692)
+++ grass/trunk/lib/vector/Vlib/intersect.c	2008-01-13 12:41:21 UTC (rev 29693)
@@ -1,35 +1,22 @@
 /*!
- * \file intersect.c
- *
- * \brief Higher level functions for reading/writing/manipulating vectors.
- *
- * (C) 2001 by the GRASS Development Team
- *
- * This program is free software under the GNU General Public
- *   	    	License (>=v2). Read the file COPYING that comes with GRASS
- *   	    	for details.
- *
- * \author Original author CERL, probably Dave Gerdes or Mike Higgins. Radim Blazek
- *
- */
+  \file intersect.c
+  
+  \brief Vector library - intersection
+  
+  Higher level functions for reading/writing/manipulating vectors.
 
-/*
-****************************************************************************
-*
-* MODULE:       Vector library 
-*   	    	
-* AUTHOR(S):    Original author CERL, probably Dave Gerdes or Mike Higgins.
-*               Radim Blazek
-*
-* PURPOSE:      Higher level functions for reading/writing/manipulating vectors.
-*
-* COPYRIGHT:    (C) 2001 by the GRASS Development Team
-*
-*               This program is free software under the GNU General Public
-*   	    	License (>=v2). Read the file COPYING that comes with GRASS
-*   	    	for details.
-*
-*****************************************************************************/
+  (C) 2001-2008 by the GRASS Development Team
+  
+  This program is free software under the 
+  GNU General Public License (>=v2). 
+  Read the file COPYING that comes with GRASS
+  for details.
+  
+  \author Original author CERL, probably Dave Gerdes or Mike Higgins.
+  Update to GRASS 5.7 Radim Blazek.
+  
+  \date 2001-2008
+*/
 
 #include <stdlib.h>
 #include <math.h>
@@ -103,27 +90,20 @@
 */ 
 
 /*!
- * \fn int Vect_segment_intersection (
-    double ax1, double ay1, double az1, double ax2, double ay2, double az2, 
-    double bx1, double by1, double bz1, double bx2, double by2, double bz2, 
-    double *x1, double *y1, double *z1, 
-    double *x2, double *y2, double *z2, 
-    int with_z)           
- *
  * \brief Check for intersect of 2 line segments.
  *
+ * \param[in] ax1,ay1,az1,ax2,ay2,az2 input line a
+ * \param[in] bx1,by1,bz1,bx2,by2,bz2 input line b
+ * \param[out] x1,y1,z1 intersection point1 (case 2-4)
+ * \param[out] x2,y2,z2 intersection point2 (case 2-4)
+ * \param[in] with_z use z coordinate (3D) (TODO)
+ *
  * \return 0 - do not intersect,
  * \return 1 - intersect at one point,
  * \return 2 - partial overlap,
  * \return 3 - a contains b,
  * \return 4 - b contains a,
  * \return 5 - identical
- *
- * \param[in] ax1,ay1,az1,ax2,ay2,az2 input line a
- * \param[in] bx1,by1,bz1,bx2,by2,bz2 input line b
- * \param[out] x1,y1,z1 intersection point1 (case 2-4)
- * \param[out] x2,y2,z2 intersection point2 (case 2-4)
- * \param[in] with_z use z coordinate (3D) (TODO)
 */
 int Vect_segment_intersection (
     double ax1, double ay1, double az1, double ax2, double ay2, double az2, 
@@ -484,24 +464,12 @@
 }
 
 /*!
- * \fn int Vect_line_intersection (
-    struct line_pnts *APoints, 
-    struct line_pnts *BPoints,
-    struct line_pnts ***ALines, 
-    struct line_pnts ***BLines, 
-    int    *nalines,
-    int    *nblines,
-    int    with_z)
- * 
  * \brief Intersect 2 lines.
  *
  * Creates array of new lines created from original A line, by
  * intersection with B line. Points (Points->n_points == 1) are not
  * supported.
  *
- * \return 0 no intersection 
- * \return 1 intersection found
- *
  * \param[in] APoints first input line 
  * \param[in] BPoints second input line 
  * \param[out] ALines array of new lines created from original A line
@@ -509,6 +477,9 @@
  * \param[out] nalines number of new lines (ALines)
  * \param[out] nblines number of new lines (BLines)
  * \param[in] with_z 3D, not supported!
+ *
+ * \return 0 no intersection 
+ * \return 1 intersection found
 */
 int 
 Vect_line_intersection (
@@ -950,18 +921,16 @@
 }
 
 /*!
- * \fn int Vect_line_check_intersection ( struct line_pnts *APoints, struct line_pnts *BPoints, int with_z)
- *
  * \brief Check if 2 lines intersect.
  *
  * Points (Points->n_points == 1) are also supported.
  *
- * \return 0 no intersection 
- * \return 1 intersection found
- *
  * \param[in] APoints first input line 
  * \param[in] BPoints second input line 
  * \param[in] with_z 3D, not supported (only if one or both are points)!
+ *
+ * \return 0 no intersection 
+ * \return 1 intersection found
  */
 int 
 Vect_line_check_intersection (

Modified: grass/trunk/lib/vector/Vlib/legal_vname.c
===================================================================
--- grass/trunk/lib/vector/Vlib/legal_vname.c	2008-01-13 12:05:46 UTC (rev 29692)
+++ grass/trunk/lib/vector/Vlib/legal_vname.c	2008-01-13 12:41:21 UTC (rev 29693)
@@ -3,23 +3,24 @@
   
   \brief Vector library - Check if map name is legal vector map name
   
-  \author Radim Blazek
+  (C) 2001-2008 by the GRASS Development Team
   
-  (C) 2001 by the GRASS Development Team
-  
   This program is free software under the 
   GNU General Public License (>=v2). 
   Read the file COPYING that comes with GRASS
   for details.
+
+  \author Radim Blazek
+  
+  \date 2001-2008
 */
+
 #include <string.h>
 #include <grass/gis.h>
 #include <grass/Vect.h>
 #include <grass/glocale.h>
 
 /*!
-  \fn int Vect_legal_filename (char *s)
-
   \brief  Check if output is legal vector name.
 
   Rule:  [A-Za-z][A-Za-z0-9_@]*
@@ -70,7 +71,6 @@
 }
 
 /*!
-  \fn int Vect_check_input_output_name ( char * input, char * output, int error )
   \brief Check for input and output vector map name.
 
   Check

Modified: grass/trunk/lib/vector/Vlib/level.c
===================================================================
--- grass/trunk/lib/vector/Vlib/level.c	2008-01-13 12:05:46 UTC (rev 29692)
+++ grass/trunk/lib/vector/Vlib/level.c	2008-01-13 12:41:21 UTC (rev 29693)
@@ -1,27 +1,34 @@
-/*
-****************************************************************************
-*
-* MODULE:       Vector library 
-*   	    	
-* AUTHOR(S):    Original author CERL, probably Dave Gerdes or Mike Higgins.
-*               Update to GRASS 5.7 Radim Blazek and David D. Gray.
-*
-* PURPOSE:      Higher level functions for reading/writing/manipulating vectors.
-*
-* COPYRIGHT:    (C) 2001 by the GRASS Development Team
-*
-*               This program is free software under the GNU General Public
-*   	    	License (>=v2). Read the file COPYING that comes with GRASS
-*   	    	for details.
-*
-*****************************************************************************/
+/*!
+  \file level.c
+  
+  \brief Vector library - level info
+  
+  (C) 2001-2008 by the GRASS Development Team
+  
+  This program is free software under the 
+  GNU General Public License (>=v2). 
+  Read the file COPYING that comes with GRASS
+  for details.
+
+  \author Original author CERL, probably Dave Gerdes or Mike Higgins.
+  Update to GRASS 5.7 Radim Blazek and David D. Gray.
+  
+  \date 2001-2008
+*/
+
 #include <grass/Vect.h>
+#include <grass/glocale.h>
 
 /*!
- \fn int Vect_level (struct Map_info *Map)
- \brief returns level that Map is opened at
- \return open level (1: no topology, or 2: topology support) or -1 on error
- \param Map_info structure
+  \brief Returns level that Map is opened at
+
+  - 1: no topology
+  - 2: topology support
+
+  \param Map vector map
+
+  \return open level 
+  \return -1 on error
 */
 int
 Vect_level (struct Map_info *Map)
@@ -29,9 +36,9 @@
   if (Map->open != VECT_OPEN_CODE)
     {
       if (Map->open != VECT_CLOSED_CODE)
-	fprintf (stderr, "VECT_LEVEL: Map structure was never initialized\n");
+	  G_warning ("Vect_level(): %s", _("Map structure was never initialized"));
       else
-	fprintf (stderr, "VECT_LEVEL: Map structure has been closed\n");
+	  G_warning ("Vect_level(): %s", _("Map structure has been closed"));
       return (-1);
     }
   return (Map->level);

Modified: grass/trunk/lib/vector/Vlib/level_two.c
===================================================================
--- grass/trunk/lib/vector/Vlib/level_two.c	2008-01-13 12:05:46 UTC (rev 29692)
+++ grass/trunk/lib/vector/Vlib/level_two.c	2008-01-13 12:41:21 UTC (rev 29693)
@@ -1,31 +1,32 @@
-/*
-****************************************************************************
-*
-* MODULE:       Vector library 
-*   	    	
-* AUTHOR(S):    Original author CERL, probably Dave Gerdes or Mike Higgins.
-*               Update to GRASS 5.7 Radim Blazek and David D. Gray.
-*
-* PURPOSE:      Higher level functions for reading/writing/manipulating vectors.
-*
-* COPYRIGHT:    (C) 2001 by the GRASS Development Team
-*
-*               This program is free software under the GNU General Public
-*   	    	License (>=v2). Read the file COPYING that comes with GRASS
-*   	    	for details.
-*
-*****************************************************************************/
+/*!
+  \file level_two.c
+  
+  \brief Vector library - topo level 
+  
+  (C) 2001-2008 by the GRASS Development Team
+  
+  This program is free software under the 
+  GNU General Public License (>=v2). 
+  Read the file COPYING that comes with GRASS
+  for details.
+
+  \author Original author CERL, probably Dave Gerdes or Mike Higgins.
+  Update to GRASS 5.7 Radim Blazek and David D. Gray.
+  
+  \date 2001-2008
+*/
+
+#include <stdlib.h>
 #include <grass/gis.h>
 #include <grass/Vect.h>
-#include <stdlib.h>
+#include <grass/glocale.h>
 
-/* INTERFACE LEVEL II  */
+/*!
+  \brief Get number of nodes
 
-/*!
- \fn int Vect_get_num_nodes (struct Map_info *map)
- \brief get number of nodes
- \return number of nodes
- \param Map_info structure
+  \param Map vector map
+
+  \return number of nodes
  */
 int 
 Vect_get_num_nodes (struct Map_info *map)
@@ -34,10 +35,12 @@
 }
 
 /*!
- \fn int Vect_get_num_primitives (struct Map_info *map, int type)
- \brief get number of primitives
- \return number of primitives of given type 
- \param Map_info structure
+  \brief Get number of primitives
+
+  \param map vector map
+  \patam type feature type
+
+  \return number of primitives of given type 
  */
 int 
 Vect_get_num_primitives (struct Map_info *map, int type)
@@ -55,10 +58,11 @@
 }
 
 /*!
- \fn int Vect_get_num_lines (struct Map_info *map)
- \brief get number of line vectors (points, lines, centroids)
- \return number of line vectors
- \param Map_info structure
+  \brief Fet number of line vectors (points, lines, centroids)
+
+  \param map vector map
+
+  \return number of line vectors
  */
 int 
 Vect_get_num_lines (struct Map_info *map)
@@ -67,10 +71,11 @@
 }
 
 /*!
- \fn int Vect_get_num_areas (struct Map_info *map)
- \brief get number of areas
- \return number of areas
- \param Map_info structure
+  \brief Get number of areas
+
+  \param map vector map
+
+  \return number of areas
  */
 int 
 Vect_get_num_areas (struct Map_info *map)
@@ -79,12 +84,12 @@
 }
 
 /*!
- *  \fn int Vect_get_num_faces (struct Map_info *map)
- *  \brief get number of faces
- *  \return number of faces
- *  \param Map_info structure
- *
- */
+  \brief Get number of faces
+
+  \param map vector map
+  
+  \return number of faces
+*/
 int
 Vect_get_num_faces (struct Map_info *map)
 {
@@ -92,10 +97,11 @@
 }
 
 /*!
- \fn int Vect_get_num_islands (struct Map_info *map)
- \brief get number of islands
- \return number of islands
- \param Map_info structure
+  \brief Get number of islands
+
+  \param map vector map
+
+  \return number of islands
  */
 int 
 Vect_get_num_islands (struct Map_info *map)
@@ -104,10 +110,11 @@
 }
 
 /*!
- \fn int Vect_get_num_dblinks (struct Map_info *map)
- \brief get number of defined dblinks
- \return number of dblinks
- \param Map_info structure
+  \brief Get number of defined dblinks
+
+  \param map vector map
+
+  \return number of dblinks
  */
 int 
 Vect_get_num_dblinks (struct Map_info *map)
@@ -116,10 +123,11 @@
 }
 
 /*!
- \fn int Vect_get_num_updated_lines (struct Map_info *map)
- \brief get number of updated lines
- \return number of updated lines
- \param Map_info structure
+  \brief Get number of updated lines
+
+  \param map vector map
+
+  \return number of updated lines
  */
 int 
 Vect_get_num_updated_lines (struct Map_info *map)
@@ -128,10 +136,12 @@
 }
 
 /*!
- \fn int Vect_get_updated_line (struct Map_info *map, int idx)
- \brief get updated line by index
- \return updated line
- \param Map_info structure
+  \brief Get updated line by index
+
+  \param map vector map
+  \param idx index
+
+  \return updated line
  */
 int 
 Vect_get_updated_line (struct Map_info *map, int idx)
@@ -140,10 +150,11 @@
 }
 
 /*!
- \fn int Vect_get_num_updated_nodes (struct Map_info *map)
- \brief get number of updated nodes
- \return number of updated nodes
- \param Map_info structure
+  \brief Get number of updated nodes
+
+  \param map vector map
+
+  \return number of updated nodes
  */
 int 
 Vect_get_num_updated_nodes (struct Map_info *map)
@@ -152,10 +163,12 @@
 }
 
 /*!
- \fn int Vect_get_updated_node (struct Map_info *map, int idx)
- \brief get updated node by index
- \return updated node
- \param Map_info structure
+  \brief Get updated node by index
+
+  \param map vector map
+  \param idx index
+
+  \return updated node
  */
 int 
 Vect_get_updated_node (struct Map_info *map, int idx)
@@ -164,10 +177,13 @@
 }
 
 /*!
- \fn int Vect_get_node_coor (struct Map_info *map, int num, double *x, double *y, double *z)
- \brief get 2D/3D coordinates of node
- \return 2D/3D coordinates of node
- \param Map_info structure, node number, xyz coordinates values
+  \brief Get 2D/3D coordinates of node
+
+  \param map vector map
+  \param num 
+  \param x,y,z coordinates values
+
+  \return 2D/3D coordinates of node
  */
 int 
 Vect_get_node_coor (struct Map_info *map, int num, double *x, double *y, double *z)
@@ -185,17 +201,20 @@
 }
 
 /*!
- \fn int Vect_get_line_nodes ( struct Map_info *Map, int line, int *n1, int *n2)
- \brief get starting and ending node of line
- \return numbers of line nodes
- \param Map_info structure, line number, numbers of line nodes
+  \brief Get starting and ending node of line
+  
+  \param Map vector map
+  \param line line id
+  \param n1, n2 ids of line nodes
+
+  \return numbers of line nodes
 */
 int 
 Vect_get_line_nodes ( struct Map_info *Map, int line, int *n1, int *n2)
 {
 
     if ( Map->level < 2 )
-	G_fatal_error ("Map %s@%s is not open on level >= 2\n", Map->name, Map->mapset);
+	G_fatal_error (_("Vector map <%s> is not open on level >= 2"), Vect_get_full_name(Map));
     
     if ( n1 != NULL ) 
 	*n1 = Map->plus.Line[line]->N1;
@@ -207,17 +226,20 @@
 }
 
 /*!
- \fn int Vect_get_line_areas ( struct Map_info *Map, int line, int *left, int *right)
- \brief get areas/isles on the left and right
- \return numbers of areas/isles on the left and right
- \param Map_info structure, line number, numbers of areas/isles on the left and right
+  \brief Get areas/isles on the left and right
+
+  \param Map vector map
+  \param line
+  \param[out] left,right numbers of areas/isles on the left and right
+
+  \return numbers of areas/isles on the left and right
 */
 int 
 Vect_get_line_areas ( struct Map_info *Map, int line, int *left, int *right)
 {
 
     if ( Map->level < 2 )
-	G_fatal_error ("Map %s@%s is not open on level >= 2\n", Map->name, Map->mapset);
+	G_fatal_error (_("Vector map <%s> is not open on level >= 2"), Vect_get_full_name(Map));
     
     if ( left != NULL ) 
 	*left = Map->plus.Line[line]->left;
@@ -229,67 +251,75 @@
 }
 
 /*!
- \fn int Vect_get_node_n_lines ( struct Map_info *Map, int node )
- \brief returns number of lines for node
- \return numbers of line for a node ??
- \param Map_info structure, node number
+  \brief Returns number of lines for node
+  
+  \param Map vector map
+  \param node node id
+
+  \return numbers of lines for a node
 */
 int 
 Vect_get_node_n_lines ( struct Map_info *Map, int node )
 {
 
     if ( Map->level < 2 )
-	G_fatal_error ("Map %s@%s is not open on level >= 2\n", Map->name, Map->mapset);
+	G_fatal_error (_("Vector map <%s> is not open on level >= 2"), Vect_get_full_name(Map));
     
     return ( Map->plus.Node[node]->n_lines );
 
 }
 
 /*!
- \fn int Vect_get_node_line ( struct Map_info *Map, int node, int line )
- \brief returns line number for node line index
- \return line number for node line index 
- \param Map vector map
- \param node node number
- \param line line index, range : 0 - Vect_get_node_n_lines()
+  \brief Returns line number for node line index
+  
+  \param Map vector map
+  \param node node number
+  \param line line index, range : 0 - Vect_get_node_n_lines()
+
+  \return line number for node line index 
 */
 int 
 Vect_get_node_line ( struct Map_info *Map, int node, int line )
 {
     if ( Map->level < 2 )
-	G_fatal_error ("Map %s@%s is not open on level >= 2\n", Map->name, Map->mapset);
+	G_fatal_error (_("Vector map <%s> is not open on level >= 2"), Vect_get_full_name(Map));
     
     return ( Map->plus.Node[node]->lines[line] );
 }
 
 /*!
- \fn int Vect_get_node_line_angle ( struct Map_info *Map, int node, int line )
- \brief angle of segment of the line connected to the node
- \return angle of segment of the line connected to the node
- \param Map vector map
- \param node node number
- \param line line index, range : 0 - Vect_get_node_n_lines()
+  \brief Angle of segment of the line connected to the node
+
+  \param Map vector map
+  \param node node number
+  \param line line index, range : 0 - Vect_get_node_n_lines()
+
+  \return angle of segment of the line connected to the node
 */
 float 
 Vect_get_node_line_angle ( struct Map_info *Map, int node, int line )
 {
     if ( Map->level < 2 )
-	G_fatal_error ("Map %s@%s is not open on level >= 2\n", Map->name, Map->mapset);
+	G_fatal_error (_("Vector map <%s> is not open on level >= 2"), Vect_get_full_name(Map));
     
     return ( Map->plus.Node[node]->angles[line] );
 }
 
 /*!
- \fn int Vect_get_centroid_area ( struct Map_info *Map, int centroid )
- \brief returns ID of area the centroid is within
- \return ID of area the centroid is within, 0 for not in area, negative ID if area/centroid (?) is duplicate
- \param Map_info structure, centroid number
+  \brief Returns ID of area the centroid is within
+
+  \param Map vector map
+  \param centroid centroid id
+
+  \return ID of area the centroid is within
+  \return 0 for not in area
+  \return negative ID if area/centroid (?) is duplicate
 */
 int 
 Vect_get_centroid_area ( struct Map_info *Map, int centroid )
 {
     if ( Map->level < 2 )
-	G_fatal_error ("Map %s@%s is not open on level >= 2\n", Map->name, Map->mapset);
+	G_fatal_error (_("Vector map <%s> is not open on level >= 2"), Vect_get_full_name(Map));
     
     return ( Map->plus.Line[centroid]->left );
 }

Modified: grass/trunk/lib/vector/Vlib/line.c
===================================================================
--- grass/trunk/lib/vector/Vlib/line.c	2008-01-13 12:05:46 UTC (rev 29692)
+++ grass/trunk/lib/vector/Vlib/line.c	2008-01-13 12:41:21 UTC (rev 29693)
@@ -1,35 +1,56 @@
-/*
-****************************************************************************
-*
-* MODULE:       Vector library 
-*   	    	
-* AUTHOR(S):    Original author CERL, probably Dave Gerdes or Mike Higgins.
-*               Update to GRASS 5.7 Radim Blazek and David D. Gray.
-*
-* PURPOSE:      Higher level functions for reading/writing/manipulating vectors.
-*
-* COPYRIGHT:    (C) 2001 by the GRASS Development Team
-*
-*               This program is free software under the GNU General Public
-*   	    	License (>=v2). Read the file COPYING that comes with GRASS
-*   	    	for details.
-*
-*****************************************************************************/
+/*!
+  \file line.c
+  
+  \brief Vector library - geometry manipulation
+  
+  (C) 2001-2008 by the GRASS Development Team
+  
+  This program is free software under the 
+  GNU General Public License (>=v2). 
+  Read the file COPYING that comes with GRASS
+  for details.
+
+  \author Original author CERL, probably Dave Gerdes or Mike Higgins.
+  Update to GRASS 5.7 Radim Blazek and David D. Gray.
+  
+  \date 2001-2008
+*/
+
 #include <stdlib.h>
 #include <math.h>
 #include <grass/gis.h>
 #include <grass/Vect.h>
+#include <grass/glocale.h>
 
+/*!
+  \brief Creates and initializes a struct line_pnts.
+
+  Use Vect_new_line_struct() instead.
+
+  This structure is used for reading and writing vector lines and
+  polygons.  The library routines handle all memory allocation.  If
+  3 lines in memory are needed at the same time, then simply 3
+  line_pnts structures have to be used
+
+  \param void
+
+  \return pointer to line_pnts
+  \return NULL on error
+*/
 struct line_pnts *Vect__new_line_struct (void);
 
 /*!
- \fn struct line_pnts *Vect_new_line_struct (void)
- \brief creates and initializes a struct line_pnts. This structure is
-    used for reading and writing vector lines and polygons.  The library
-   routines handle all memory allocation.  If 3 lines in memory are needed
-   at the same time, then  simply 3 line_pnts structures have to be used
- \return  struct line_pnts *  or NULL on error
- \param void
+  \brief Creates and initializes a struct line_pnts.
+
+  This structure is used for reading and writing vector lines and
+  polygons.  The library routines handle all memory allocation.  If
+  3 lines in memory are needed at the same time, then simply 3
+  line_pnts structures have to be used
+
+  \param void
+
+  \return pointer to line_pnts
+  \return NULL on error
 */
 struct line_pnts *
 Vect_new_line_struct ()
@@ -37,7 +58,7 @@
   struct line_pnts *p;
 
   if (NULL == (p = Vect__new_line_struct ()))
-    G_fatal_error ("New_line: Out of memory");
+    G_fatal_error ("Vect_new_line_struct(): %s", _("Out of memory"));
 
   return p;
 }
@@ -60,10 +81,11 @@
 }
 
 /*!
- \fn int Vect_destroy_line_struct (struct line_pnts *p)
- \brief frees all memory associated with a struct line_pnts, including the struct itself
- \return no return value
- \param  line_pnts * structure
+  \brief Frees all memory associated with a struct line_pnts, including the struct itself
+
+  \param p pointer to line_pnts structure
+
+  \return 0
 */
 int 
 Vect_destroy_line_struct (struct line_pnts *p)
@@ -72,22 +94,25 @@
     {
       if (p->alloc_points)
 	{
-	  free ((char *) p->x);
-	  free ((char *) p->y);
-	  free ((char *) p->z);
+	  G_free ((char *) p->x);
+	  G_free ((char *) p->y);
+	  G_free ((char *) p->z);
 	}
-      free ((char *) p);
+      G_free ((char *) p);
     }
 
   return 0;
 }
 
 /*!
- \fn int Vect_copy_xyz_to_pnts (
-	struct line_pnts *Points, double *x, double *y, double *z, int n)
- \brief ADD
- \return 0 on success, -1 on out of memory
- \param  line_pnts * structure, x, y, z, number of points
+  \brief Copy points from array to line structure
+
+  \param Points line structure
+  \param x,y,z  coordinates
+  \param number of points to be copied
+
+  \return 0 on success
+  \return -1 on out of memory
 */
 int 
 Vect_copy_xyz_to_pnts (
@@ -114,14 +139,16 @@
 
 
 /*!
- \fn int Vect_reset_line (struct line_pnts *Points)
- \brief ADD. Make sure line structure is clean to be re-used, i.e. it
-   has no points associated with it Points must have previously been
-   created with Vect_new_line_struct ()
- \return no return value
- \param  line_pnts * structure
+  \brief Reset line
+
+  Make sure line structure is clean to be re-used, i.e. it
+  has no points associated with it Points must have previously been
+  created with Vect_new_line_struct().
+
+  \param Points line to be reset
+
+  \return 0
 */
-/* NEW after 4.0 alpha */
 int 
 Vect_reset_line (struct line_pnts *Points)
 {
@@ -131,13 +158,17 @@
 }
 
 /*!
- \fn int Vect_append_point (struct line_pnts *Points, double x, double y, double z)
- \brief appends one point to the end of a Points structure returns new
-   number of points or -1 on out of memory Note, this will append to
-   whatever is in line struct.  If you are re-using a line struct, be
-   sure to clear out old data first by calling Vect_reset_line ()
- \return number of points
- \param line_pnts * structure, x, y, z
+  \brief Appends one point to the end of a line.
+
+  Returns new number of points or -1 on out of memory Note, this will
+  append to whatever is in line struct.  If you are re-using a line
+  struct, be sure to clear out old data first by calling
+  Vect_reset_line().
+
+  \param Points line
+  \param x,y,z point coordinates to be added
+
+  \return number of points
 */
 int 
 Vect_append_point (struct line_pnts *Points, double x, double y, double z)
@@ -151,18 +182,19 @@
   Points->x[n] = x;
   Points->y[n] = y;
   Points->z[n] = z;
+
   return ++(Points->n_points);
 }
 
 /*!
- \fn int Vect_line_insert_point (struct line_pnts *Points, int index, double x, double y, double z)
- \brief insert new point at index position and move all old points at that position and above up
- \return number of points or -1 on error (alocation)
- \param Points line structure
- \param index (from 0 to Points->n_points-1)
- \param x 
- \param y
- \param z
+  \brief Insert new point at index position and move all old points at that position and above up
+  
+  \param Points line
+  \param index (from 0 to Points->n_points-1)
+  \param x,y,z point coordinates
+
+  \return number of points
+  \return -1 on error (alocation)
 */
 int 
 Vect_line_insert_point (struct line_pnts *Points, int index, double x, double y, double z)
@@ -170,7 +202,7 @@
   register int n;
 
   if ( index < 0 || index > Points->n_points-1 )
-      G_fatal_error ("Index out of range in Vect_line_insert_point()");
+      G_fatal_error ("%s Vect_line_insert_point()", _("Index out of range in"));
   
   if (0 > dig_alloc_points (Points, Points->n_points + 1)) 
       return (-1);
@@ -189,11 +221,12 @@
 }
 
 /*!
- \fn int Vect_line_delete_point (struct line_pnts *Points, int index)
- \brief delete point at given index and move all points above down
- \return number of points
- \param Points line structure
- \param index (from 0 to Points->n_points-1)
+  \brief Delete point at given index and move all points above down
+
+  \param Points line
+  \param index (from 0 to Points->n_points-1)
+
+  \return number of points
 */
 int 
 Vect_line_delete_point (struct line_pnts *Points, int index)
@@ -201,7 +234,7 @@
   register int n;
 
   if ( index < 0 || index > Points->n_points-1 )
-      G_fatal_error ("Index out of range in Vect_line_delete_point()");
+      G_fatal_error ("%s Vect_line_insert_point()", _("Index out of range in"));
   
   if ( Points->n_points == 0 )
       return 0;
@@ -217,10 +250,11 @@
 }
 
 /*!
- \fn int Vect_line_prune (struct line_pnts *Points)
- \brief remove duplicate points, i.e. zero length segments
- \return number of points
- \param Points line structure
+  \brief Remove duplicate points, i.e. zero length segments
+
+  \param Points line
+
+  \return number of points
 */
 int 
 Vect_line_prune (struct line_pnts *Points)
@@ -246,10 +280,12 @@
 }
 
 /*!
- \fn int Vect_line_prune_thresh (struct line_pnts *Points, double threshold )
- \brief remove points in threshold
- \return number of points in result
- \param Points line structure
+  \brief Remove points in threshold
+
+  \param Points line
+  \param threshold threshold value
+
+  \return number of points in result
 */
 int 
 Vect_line_prune_thresh (struct line_pnts *Points, double threshold)
@@ -265,18 +301,22 @@
 }
 
 /*!
- \fn int Vect_append_points (struct line_pnts *Points, struct line_pnts *APoints,
-	           int direction)
- \brief appends points to the end of a Points structure. Note, this
-   will append to whatever is in line struct.  If you are re-using a
-   line struct, be sure to clear out old data first by calling
-   Vect_reset_line ()
- \return new number of points, -1 on out of memory
- \param line_pnts * structure, line_pntsA * structure, direction (GV_FORWARD, GV_BACKWARD)
+  \brief Appends points to the end of a line.
+
+  Note, this will append to whatever is in line struct.  If you are
+  re-using a line struct, be sure to clear out old data first by
+  calling Vect_reset_line().
+
+  \param Points line
+  \param APoints points to be included
+  \param direction direction (GV_FORWARD, GV_BACKWARD)
+
+  \return new number of points
+  \return -1 on out of memory
 */
 int 
 Vect_append_points (struct line_pnts *Points, struct line_pnts *APoints,
-	           int direction) /* GV_FORWARD, GV_BACKWARD */
+	           int direction)
 {
   int i, n, on, an;
 
@@ -308,11 +348,17 @@
 
 
 /*!
- \fn int Vect_copy_pnts_to_xyz (
-	  struct line_pnts *Points, double *x, double *y, double *z, int *n)
- \brief ADD. NOTE!  x/y arrays MUST be at least as large as Points->n_points
- \return number of points copied. Also note that  n  is a pointer to int.
- \param line_pnts * structure, x, y, z
+  \brief Copy points from line structure to array
+
+  x/y/z arrays MUST be at least as large as Points->n_points
+
+  Also note that  n  is a pointer to int.
+
+  \param Points line
+  \param x,y,z coordinates arrays
+  \param n number of points
+
+  \return number of points copied
 */
 int 
 Vect_copy_pnts_to_xyz (
@@ -333,23 +379,21 @@
 }
 
 /*!
- \fn int Vect_point_on_line ( struct line_pnts *Points, double distance, 
-	  double *x, double *y, double *z, double *angle, double *slope )
- \brief  Find point on line in the specified distance from the begining,
-  measured along line.
+  \brief  Find point on line in the specified distance.
 
+  From the begining, measured along line.
+
   If the distance is greater than line length or negative, error is returned.
+  
+  \param Points line
+  \param distance distance value
+  \param x,y,z pointers to point coordinates or NULL
+  \param angle pointer to angle of line in that point (radians, counter clockwise from x axis) or NULL
+  \param slope pointer to slope angle in radians (positive up)
 
-  ( G_begin_distance_calculations() must be called before. - Is not true
-    because G_distance is not used (no 3D support) )
- 
-  *x, *y, *z - pointers to point coordinates or NULL
-  *angle     - pointer to angle of line in that point (radians, 
-               counter clockwise from x axis) or NULL
-  *slope     - pointer to slope angle in radians (positive up)
- \return number of segment the point is on (first is 1),
-           0 error when point is outside the line 
- \param line_pnts * structure, distance, x, y, z, angle, slope
+  \return number of segment the point is on (first is 1),
+  \return 0 error when point is outside the line 
+
 */
 int 
 Vect_point_on_line ( struct line_pnts *Points, double distance, 
@@ -429,17 +473,21 @@
 }
 
 /*!
- \fn int Vect_line_segment ( struct line_pnts *InPoints, 
-                double start, double end,
-	        struct line_pnts *OutPoints )
- \brief  Create segment of InPoints from start to end measured along the line
-         and write it to OutPoints.
+  \brief Create line segment.
 
-  If the distance is greater than line length or negative, error is returned.
+  Creates segment of InPoints from start to end measured along the
+  line and write it to OutPoints.
 
- \return  1 success
-          0 error when start > length or end < 0 or start < 0 or end > length
- \param line_pnts * structure, start, end, line_pnts * structure 
+  If the distance is greater than line length or negative, error is
+  returned.
+
+  \param InPoints input line
+  \param start segment number
+  \param end segment number
+  \param OutPoints output line
+
+  \return 1 success
+  \return 0 error when start > length or end < 0 or start < 0 or end > length
 */
 int 
 Vect_line_segment ( struct line_pnts *InPoints, double start, double end, 
@@ -471,7 +519,7 @@
     G_debug ( 3, "  -> seg1 = %d seg2 = %d", seg1, seg2);
 
     if ( seg1 == 0 || seg2 == 0 ) { 
-	G_warning ("Segment outside line, no segment created"); 
+	G_warning (_("Segment outside line, no segment created")); 
 	return 0;
     }
     
@@ -487,17 +535,20 @@
 }
 
 /*!
- \fn double Vect_line_length ( struct line_pnts *Points )
- \brief calculate line length, 3D-length in case of 3D vector line
- \return line length
- \param line_pnts * structure
+  \brief Calculate line length, 3D-length in case of 3D vector line
+
+  For Lat-Long use Vect_line_geodesic_length() instead.
+
+  \param Points line
+
+  \return line length
 */
 double 
 Vect_line_length ( struct line_pnts *Points )
 {
     int j;
     double dx, dy, dz, len = 0;
-
+    
     if ( Points->n_points < 2 ) return 0;
     
     for ( j = 0; j < Points->n_points - 1; j++) {
@@ -512,10 +563,13 @@
 
 
 /*!
- \fn double Vect_line_geodesic_length ( struct line_pnts *Points )
- \brief calculate line length. If projection is LL, the length is measured along the geodesic.
- \return line length
- \param line_pnts * structure
+  \brief Calculate line length.
+
+  If projection is LL, the length is measured along the geodesic.
+
+  \param Points line
+
+  \return line length
 */
 double 
 Vect_line_geodesic_length ( struct line_pnts *Points )
@@ -544,34 +598,33 @@
 }
 
 /*!
-\fn int Vect_line_distance (	  struct line_pnts *points,
-		  double ux, double uy, double uz,
-		  int    with_z,
-		  double *px, double *py, double *pz,
-		  double *dist,
-		  double *spdist,
-		  double *lpdist)
- \brief calculate line distance.  Sets (if not null):
-                      px, py - point on line,
-                      dist   - distance to line,
-                      spdist - distance to point on line from segment beginning,
-                      sldist - distance to point on line form line beginning along line
- \return nearest segment (first is 1)
- \param line_pnts * structure, x, y, z of point, flag if to use z
-   coordinate, (3D calculation), point on line, distance to line,
-   distance of point from segment beginning, distance of point from line
-   beginning
+  \brief calculate line distance.
+
+  Sets (if not null):
+   - px, py - point on line,
+   - dist   - distance to line,
+   - spdist - distance to point on line from segment beginning,
+   - sldist - distance to point on line form line beginning along line
+
+  \param points line
+  \param ux,uy,uz point coordinates
+  \param with_z flag if to use z coordinate (3D calculation)
+  \param[out] px,py,pz point on line
+  \param[out] dist distance to line,
+  \param[out] spdist distance of point from segment beginning
+  \param[out] lpdist distance of point from line
+
+  \return nearest segment (first is 1)
 */
-/* original dig__check_dist () in grass50 */
 int 
 Vect_line_distance (
-		  struct line_pnts *points, /* line */
-		  double ux, double uy, double uz,    /* point */
-		  int    with_z,   /* use z coordinate, (3D calculation) */
-		  double *px, double *py, double *pz, /* point on line */
-		  double *dist,             /* distance to line */
-		  double *spdist,           /* distance of point from segment beginning */
-		  double *lpdist)           /* distance of point from line beginning */
+		  struct line_pnts *points, 
+		  double ux, double uy, double uz, 
+		  int    with_z,   
+		  double *px, double *py, double *pz, 
+		  double *dist,            
+		  double *spdist,          
+		  double *lpdist)          
 {
   register int i;
   register double distance;
@@ -655,12 +708,15 @@
 
 
 /*!
- \fn double Vect_points_distance ( double x1, double y1, double z1,
-		  double x2, double y2, double z2,
-		  int with_z)
- \brief distance of 2 points. with_z - use z coordinate
- \return distance
- \param x1, y1, z1, x2, y2, z2, with_z
+  \brief Calculate distance of 2 points
+
+  Simply uses Pythagoras.
+
+  \param x1,y1,z1 first point
+  \param x2,y2,z2 second point
+  \param with_z use z coordinate
+
+  \return distance
 */
 double
 Vect_points_distance (
@@ -683,10 +739,12 @@
 }
 
 /*!
- \fn int Vect_line_box ( struct line_pnts *Points, BOUND_BOX *Box )
- \brief get bounding box of line
- \return 0 on success, ADD on error
- \param line_pnts * structure, BOUND_BOX
+  \brief Get bounding box of line
+
+  \param Points line
+  \param[out] Box bounding box
+
+  \return 0
 */
 int
 Vect_line_box ( struct line_pnts *Points, BOUND_BOX *Box )
@@ -696,11 +754,12 @@
 }
 
 /*!
- \fn void Vect_line_reverse ( struct line_pnts *Points )
- \brief reverse the order of vertices
- \param Points line to be changed
+  \brief Reverse the order of vertices
+
+  \param Points line to be changed
+
+  \return void
 */
-/* reverse_line - reverse order of Points ( direction of line ) */
 void Vect_line_reverse ( struct line_pnts *Points )
 {
     int    i, j, np;
@@ -722,14 +781,15 @@
     }
 }
 
+/*!
+  \brief Fetches FIRST category number for given vector line and field
 
-/*!
-\brief fetches FIRST category number for given vector line and field
-\param vmap: Map input
-\param varea: line number
-\param vfield: field number
-\return -1 no category
-\return category number (>=0)
+  \param Map vector map
+  \param line line id
+  \param field layer number
+
+  \return -1 no category
+  \return category number (>=0)
 */
 int
 Vect_get_line_cat ( struct Map_info *Map, int line, int field ) {
@@ -746,4 +806,3 @@
 
     return cat;
 }
-

Modified: grass/trunk/lib/vector/Vlib/list.c
===================================================================
--- grass/trunk/lib/vector/Vlib/list.c	2008-01-13 12:05:46 UTC (rev 29692)
+++ grass/trunk/lib/vector/Vlib/list.c	2008-01-13 12:41:21 UTC (rev 29693)
@@ -1,44 +1,27 @@
 /**
  * \file list.c
  *
- * \brief Vector library
+ * \brief Vector library - list definition
  *
  * Higher level functions for reading/writing/manipulating vectors.
  *
+ * (C) 2001-2008 by the GRASS Development Team
+ *
  * This program is free software under the GNU General Public
  * License (>=v2). Read the file COPYING that comes with GRASS
  * for details.
  *
  * \author Original author CERL, probably Dave Gerdes or Mike Higgins.
  * Update to GRASS 5.7 Radim Blazek and David D. Gray
+ *
+ * \date 2001-2008
  */
 
-/*
-****************************************************************************
-*
-* MODULE:       Vector library 
-*   	    	
-* AUTHOR(S):    Original author CERL, probably Dave Gerdes or Mike Higgins.
-*               Update to GRASS 5.7 Radim Blazek and David D. Gray.
-*
-* PURPOSE:      Higher level functions for reading/writing/manipulating vectors.
-*
-* COPYRIGHT:    (C) 2001 by the GRASS Development Team
-*
-*               This program is free software under the GNU General Public
-*   	    	License (>=v2). Read the file COPYING that comes with GRASS
-*   	    	for details.
-*
-*****************************************************************************/
 #include <stdlib.h>
 #include <grass/Vect.h>
 #include <grass/gis.h>
 
-/* ADD comment what and why a list */
-
 /**
- * \fn struct ilist *Vect_new_list (void)
- *
  * \brief Creates and initializes a struct ilist.
  *
  * This structure is used as container for integer values. The
@@ -64,15 +47,14 @@
 }
 
 /**
- * \fn int Vect_reset_list (struct ilist *list)
+ * \brief Reset ilist structure.
  *
- * \brief Reset ilist structure to make sure ilist structure is clean
- * to be re-used. List must have previously been created with
- * Vect_new_list()
- * 
- * \return 0
+ * To make sure ilist structure is clean to be re-used. List must have
+ * previously been created with Vect_new_list().
  *
  * \param[in,out] list pointer to struct ilist
+ * 
+ * \return 0
  */
 int 
 Vect_reset_list (struct ilist *list)
@@ -83,14 +65,12 @@
 }
 
 /**
- * \fn int Vect_destroy_list (struct ilist *list)
- *
  * \brief Frees all memory associated with a struct ilist, including
  * the struct itself
  *
- * \return 0
- *
  * \param[in,out] list pointer to ilist structure
+ *
+ * \return 0
  */
 int 
 Vect_destroy_list (struct ilist *list)
@@ -109,15 +89,13 @@
 }
 
 /**
- * \fn int Vect_list_append (struct ilist *list, int val )
- *
  * \brief Append new item to the end of list if not yet present 
  *
- * \return 0 on success
- * \return 1 on error
- *
  * \param[in,out] list pointer to ilist structure
  * \param[in] val new item to append to the end of list
+ *
+ * \return 0 on success
+ * \return 1 on error
  */
 int
 Vect_list_append ( struct ilist *list, int val )
@@ -146,15 +124,13 @@
 }
 
 /**
- * \fn int Vect_list_append_list (struct ilist *alist,  struct ilist *blist )
- *
  * \brief Append new items to the end of list if not yet present 
  *
- * \return 0 on success
- * \return 1 on error
- *
  * \param[in,out] alist pointer to ilist structure where items will be appended
  * \param[in] blist pointer to ilist structure with new items
+ *
+ * \return 0 on success
+ * \return 1 on error
  */
 int
 Vect_list_append_list ( struct ilist *alist,  struct ilist *blist )
@@ -171,15 +147,13 @@
 }
 
 /**
- * \fn int Vect_list_delete (struct ilist *list, int val )
- *
  * \brief Remove a given value (item) from list
  *
- * \return 0 on success
- * \return 1 on error
- *
  * \param[in,out] list pointer to ilist structure
  * \param[in] val to remove
+ *
+ * \return 0 on success
+ * \return 1 on error
  */
 int
 Vect_list_delete ( struct ilist *list, int val )
@@ -203,15 +177,13 @@
 }
 
 /**
- * \fn int Vect_list_delete_list ( struct ilist *alist,  struct ilist *blist )
- *
  * \brief Delete list from existing list 
  *
- * \return 0 on success
- * \return 1 on error
- *
  * \param[in,out] alist pointer to original ilist structure,
  * \param[in] blist pointer to ilist structure with items to delete
+ *
+ * \return 0 on success
+ * \return 1 on error
  */
 int
 Vect_list_delete_list ( struct ilist *alist,  struct ilist *blist )
@@ -228,15 +200,13 @@
 }
 
 /**
- * \fn int Vect_val_in_list ( struct ilist *list, int val )
- *
  * \brief Find a given item in the list
  *
- * \return 1 if an item is found
- * \return 0 no found item in the list
- *
  * \param[in] list pointer to ilist structure
  * \param[in] val value of item
+ *
+ * \return 1 if an item is found
+ * \return 0 no found item in the list
 */
 int
 Vect_val_in_list ( struct ilist *list, int val )

Modified: grass/trunk/lib/vector/Vlib/map.c
===================================================================
--- grass/trunk/lib/vector/Vlib/map.c	2008-01-13 12:05:46 UTC (rev 29692)
+++ grass/trunk/lib/vector/Vlib/map.c	2008-01-13 12:41:21 UTC (rev 29693)
@@ -5,16 +5,19 @@
  *
  * Higher level functions for reading/writing/manipulating vectors.
  *
- * \author Original author CERL, probably Dave Gerdes or Mike
- * Higgins. Update to GRASS 5.7 Radim Blazek and David D. Gray.
+ * (C) 2001-2008 by the GRASS Development Team
  *
- * (C) 2001 by the GRASS Development Team
- *
  * This program is free software under the 
  * GNU General Public License (>=v2). 
  * Read the file COPYING that comes with GRASS
  * for details.
+ *
+ * \author Original author CERL, probably Dave Gerdes or Mike
+ * Higgins. Update to GRASS 5.7 Radim Blazek and David D. Gray.
+ *
+ * \date 2001-2008
  */
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <dirent.h>
@@ -28,8 +31,8 @@
 #include <grass/Vect.h>
 #include <grass/dbmi.h>
 #include <grass/glocale.h>
+
 /*!
-  \fn int Vect_copy_map_lines ( struct Map_info *In, struct Map_info *Out )
   \brief Copy all alive elements of opened vector map to another opened vector map
 
   \param[in] In input vector map
@@ -49,7 +52,7 @@
     Cats = Vect_new_cats_struct ();
    
     if ( Vect_level ( In ) < 1 )
-	G_fatal_error ("Vect_copy_map_lines(): input vector map is not open");
+	G_fatal_error ("Vect_copy_map_lines(): %s", _("input vector map is not open"));
     
     ret = 0;
     /* Note: sometimes is important to copy on level 2 (pseudotopo centroids) 
@@ -59,7 +62,7 @@
 	for ( i = 1; i <= nlines; i++ ) {
 	    type =  Vect_read_line (In, Points, Cats, i);
 	    if ( type == -1 ) {
-		G_warning (_("Unable to read vector map <%s%s>"), In->name, In->mapset);
+		G_warning (_("Unable to read vector map <%s>"), Vect_get_full_name(In));
 		ret = 1;
 		break;
 	    } 
@@ -72,7 +75,7 @@
 	while ( 1 ) {
 	    type =  Vect_read_next_line (In, Points, Cats);
 	    if ( type == -1 ) {
-		G_warning (_("Unable to read vector map <%s%s>"), In->name, In->mapset);
+		G_warning (_("Unable to read vector map <%s>"), Vect_get_full_name(In));
 		ret = 1;
 		break;
 	    } else if ( type == -2 ) { /* EOF */ 
@@ -133,7 +136,6 @@
 }
 
 /*!
-  \fn int Vect_copy ( char *in, char *mapset, char *out, FILE *msgout )
   \brief Copy a map including attribute tables
   
   Old vector is deleted
@@ -152,7 +154,7 @@
     int i, n, ret, type;
     struct Map_info In, Out;
     struct field_info *Fi, *Fin;
-    char   old_path[1000], new_path[1000], buf[1000]; 
+    char   old_path[GPATH_MAX], new_path[GPATH_MAX], buf[GPATH_MAX]; 
     struct stat info;
     char *files[] = { GRASS_VECT_FRMT_ELEMENT, GRASS_VECT_COOR_ELEMENT,
                       GRASS_VECT_HEAD_ELEMENT, GRASS_VECT_HIST_ELEMENT,
@@ -262,18 +264,19 @@
 }
 
 /*!
- \fn int Vect_rename ( char *in, char *out, FILE *msgout )
- \brief Rename a map, attribute tables are created in the same database where input tables were stored.
+  \brief Rename a map.
 
- The original format (native/OGR) is used.
- Old map ('out') is deleted!!!
+  Attribute tables are created in the same database where input tables were stored.
 
- \param[in] in input vector map name
- \param[in] out output vector map name
- \param[in] msgout output file for messages or NULL 
+  The original format (native/OGR) is used.
+  Old map ('out') is deleted!!!
 
- \return -1 error
- \return 0 success
+  \param[in] in input vector map name
+  \param[in] out output vector map name
+  \param[in] msgout output file for messages or NULL 
+
+  \return -1 error
+  \return 0 success
 */
 int 
 Vect_rename ( char *in, char *out, FILE *msgout )
@@ -388,13 +391,12 @@
 }
 
 /*!
- \fn int Vect_delete ( char *map )
- \brief Delete vector map including attribute tables
-
- \param[in] map vector map name
-
- \return -1 error
- \return 0 success
+  \brief Delete vector map including attribute tables
+  
+  \param[in] map vector map name
+  
+  \return -1 error
+  \return 0 success
 */
 int 
 Vect_delete ( char *map )
@@ -402,7 +404,7 @@
     int i, n, ret;
     struct Map_info Map;
     struct field_info *Fi;
-    char   buf[5000];
+    char   buf[GPATH_MAX];
     DIR    *dir;
     struct dirent *ent; 
     char *tmp;
@@ -412,7 +414,7 @@
     G_chop ( map );
 
     if ( map == NULL || strlen ( map ) == 0 ) {
-	G_warning ( "Invalid vector map name <%s>", map ? map : "null");
+	G_warning (_("Invalid vector map name <%s>"), map ? map : "null");
 	return -1;
     }
 
@@ -428,7 +430,7 @@
 	Vect_set_open_level (1); /* Topo not needed */
 	ret = Vect_open_old_head (&Map, map, G_mapset());
 	if ( ret < 1 ) {
-	    G_warning ( "Unable to open header file for vector map <%s>", map );
+	    G_warning (_("Unable to open header file for vector map <%s>"), map );
 	    return -1;
 	}
 
@@ -462,7 +464,7 @@
 			return -1;
 		    }
 		} else {
-		    G_warning ( "Table <%s> linked to vector map <%s> does not exist",
+		    G_warning (_("Table <%s> linked to vector map <%s> does not exist"),
 				Fi->table, map);
 		}
 	    }
@@ -520,17 +522,16 @@
 }
 
 /*!
- \fn int Vect_copy_tables ( struct Map_info *In, struct Map_info *Out, int field )
- \brief Copy tables linked to vector map.
-
- All if field = 0, or table defined by given field if field > 0
-
- \param[in] In input vector map
- \param[out] Out output vector map
- \param[in] field layer number
-
- \return 0 on success
- \return -1 on error
+  \brief Copy tables linked to vector map.
+  
+  All if field = 0, or table defined by given field if field > 0
+  
+  \param[in] In input vector map
+  \param[out] Out output vector map
+  \param[in] field layer number
+  
+  \return 0 on success
+  \return -1 on error
 */
 int 
 Vect_copy_tables ( struct Map_info *In, struct Map_info *Out, int field )
@@ -589,19 +590,17 @@
 }
 
 /*!
- \fn int Vect_copy_table ( struct Map_info *In, struct Map_info *Out, int field_in, 
-                           int field_out, char *field_name, int type )
- \brief Copy table linked to vector map based on type.
-
- \param[in] In input vector map
- \param[out] Out output vector map
- \param[in] field_in input layer number
- \param[in] field_out output layer number
- \param[in] field_name layer name
- \param[in] type feature type
-
- \return 0 on success
- \return -1 on error
+  \brief Copy table linked to vector map based on type.
+  
+  \param[in] In input vector map
+  \param[out] Out output vector map
+  \param[in] field_in input layer number
+  \param[in] field_out output layer number
+  \param[in] field_name layer name
+  \param[in] type feature type
+  
+  \return 0 on success
+  \return -1 on error
 */
 int 
 Vect_copy_table ( struct Map_info *In, struct Map_info *Out, int field_in, 
@@ -611,21 +610,19 @@
 }
 
 /*!
- \fn int Vect_copy_table_by_cats ( struct Map_info *In, struct Map_info *Out, int field_in, 
-                           int field_out, char *field_name, int type, int *cats, int ncats )
- \brief Copy table linked to vector map based on category numbers.
-
- \param[in] In input vector map
- \param[out] Out output vector map
- \param[in] field_in input layer number
- \param[in] field_out output layer number
- \param[in] field_name layer name
- \param[in] type feature type
- \param[in] cats pointer to array of cats or NULL
- \param[in] ncats number of cats in 'cats'
-
- \return 0 on success
- \return -1 on error
+  \brief Copy table linked to vector map based on category numbers.
+  
+  \param[in] In input vector map
+  \param[out] Out output vector map
+  \param[in] field_in input layer number
+  \param[in] field_out output layer number
+  \param[in] field_name layer name
+  \param[in] type feature type
+  \param[in] cats pointer to array of cats or NULL
+  \param[in] ncats number of cats in 'cats'
+  
+  \return 0 on success
+  \return -1 on error
 */
 int 
 Vect_copy_table_by_cats ( struct Map_info *In, struct Map_info *Out, int field_in, 

Modified: grass/trunk/lib/vector/Vlib/net.c
===================================================================
--- grass/trunk/lib/vector/Vlib/net.c	2008-01-13 12:05:46 UTC (rev 29692)
+++ grass/trunk/lib/vector/Vlib/net.c	2008-01-13 12:41:21 UTC (rev 29693)
@@ -1,26 +1,30 @@
-/*
-****************************************************************************
-*
-* MODULE:       Vector library 
-*   	    	
-* AUTHOR(S):    Radim Blazek
-*
-* PURPOSE:      Higher level functions for reading/writing/manipulating vectors.
-*
-* COPYRIGHT:    (C) 2001 by the GRASS Development Team
-*
-*               This program is free software under the GNU General Public
-*   	    	License (>=v2). Read the file COPYING that comes with GRASS
-*   	    	for details.
-*
-*****************************************************************************/
-#include <stdlib.h>
-#include <string.h>
-#include <grass/gis.h>
-#include <grass/dbmi.h>
-#include <grass/Vect.h>
-#include <grass/glocale.h>
+/*!
+ * \file map.c
+ *
+ * \brief Vector library - net releated fns
+ *
+ * Higher level functions for reading/writing/manipulating vectors.
+ *
+ * (C) 2001-2008 by the GRASS Development Team
+ *
+ * This program is free software under the 
+ * GNU General Public License (>=v2). 
+ * Read the file COPYING that comes with GRASS
+ * for details.
+ *
+ * \author Radim Blazek
+ *
+ * \date 2001-2008
+ */
 
+#include<stdlib.h>
+#include<string.h>
+#include<fcntl.h>
+#include<grass/gis.h>
+#include<grass/dbmi.h>
+#include<grass/Vect.h>
+#include<grass/glocale.h>
+
 static int From_node;   /* from node set in SP and used by clipper for first arc */  
 
 static int clipper ( dglGraph_s    *pgraph ,
@@ -59,43 +63,38 @@
 }
 
 /*!
- \fn Vect_net_build_graph (  struct Map_info *Map,
-			int ltype, 
-       			int afield,
-			int nfield,
+  \brief Build network graph.
+  
+  Internal format for edge costs is integer, costs are multiplied
+  before conversion to int by 1000 and for lenghts LL without geo flag by 1000000.
+  The same multiplication factor is used for nodes.
+  Costs in database column may be 'integer' or 'double precision' number >= 0
+  or -1 for infinity i.e. arc or node is closed and cannot be traversed
+  If record in table is not found for arcs, arc is skip.
+  If record in table is not found for node, costs for node are set to 0.
+  
+  \param Map vector map
+  \param ltype line type for arcs
+  \param afield arc costs field (if 0, use length)
+  \param nfield node costs field (if 0, do not use node costs)
+  \param afcol column with forward costs for arc
+  \param abcol column with backward costs for arc (if NULL, back costs = forward costs), 
+  \param ncol column with costs for nodes (if NULL, do not use node costs), 
+  \param geo use geodesic calculation for length (LL), 
+  \param algorithm not used (in future code for algorithm)
+
+   \return 0 on success, 1 on error
+*/
+int
+Vect_net_build_graph (  struct Map_info *Map,
+			int ltype,  
+       			int afield, 
+			int nfield, 
 			char *afcol,
 			char *abcol,
 			char *ncol, 
-			int geo, 
-		        int algorithm ) 
- \brief Build network graph. Internal format for edge costs is integer, costs are multiplied
-        before conversion to int by 1000 and for lenghts LL without geo flag by 1000000.
-	The same multiplication factor is used for nodes.
-	Costs in database column may be 'integer' or 'double precision' number >= 0
-	or -1 for infinity i.e. arc or node is closed and cannot be traversed
-	If record in table is not found for arcs, arc is skip.
-	If record in table is not found for node, costs for node are set to 0.
- \return 0 on success, 1 on error
- \param Map_info structure, 
-   line type for arcs, 
-   arc costs field,
-   node costs field, 
-   column with forward costs for arc (if NULL use length),
-   column with backward costs for arc (if NULL, back costs = forward costs), 
-   column with costs for nodes (if NULL, do not use node costs), 
-   use geodesic calculation for length (LL), 
-   not used (in future code for algorithm)
-*/
-int
-Vect_net_build_graph (  struct Map_info *Map,
-			int ltype,   /* line type for arcs */
-       			int afield,  /* arc costs field (if 0, use length) */
-			int nfield,  /* node costs field (if 0, do not use node costs) */
-			char *afcol, /* column with forward costs for arc */
-			char *abcol, /* column with backward costs for arc (if NULL, back = forward) */
-			char *ncol,  /* column with costs for nodes */
-			int geo,     /* use geodesic calculation for length (LL) */
-		        int algorithm ) /* not used, in future code for algorithm */
+			int geo,    
+		        int algorithm )
 {
     int    i, j, from, to, line, nlines, nnodes, ret, type, cat, skipped, cfound;
     int    dofw, dobw;
@@ -117,7 +116,7 @@
     G_debug (1, "Vect_build_graph(): ltype = %d, afield = %d, nfield = %d", ltype, afield, nfield); 
     G_debug (1, "    afcol = %s, abcol = %s, ncol = %s", afcol, abcol, ncol); 
 
-    G_message (_("Building graph ..."));
+    G_message (_("Building graph..."));
 
     Map->graph_line_type = ltype;
 
@@ -153,7 +152,7 @@
     else
         dglInitialize(gr, (dglByte_t)1, (dglInt32_t)0, (dglInt32_t)0, opaqueset);
 
-    if ( gr == NULL ) G_fatal_error (_("Cannot build network graph")); 
+    if ( gr == NULL ) G_fatal_error (_("Unable build network graph")); 
 
     db_init_handle (&handle);
     db_init_string ( &stmt);
@@ -167,22 +166,26 @@
 	/* Get field info */
 	if ( afield < 1 ) G_fatal_error (_("Arc field < 1"));
         Fi = Vect_get_field( Map, afield);
-	if ( Fi == NULL ) G_fatal_error (_("Cannot get field info"));
+	if ( Fi == NULL )
+	  G_fatal_error (_("Database connection not defined for layer %d"),
+			 afield);
 	
 	/* Open database */
 	driver = db_start_driver_open_database ( Fi->driver, Fi->database );
 	if ( driver == NULL )
-	    G_fatal_error(_("Cannot open database <%s> by driver <%s>"),
+	    G_fatal_error(_("Unable to open database <%s> by driver <%s>"),
 			  Fi->database, Fi->driver) ;
 
 	/* Load costs to array */
 	if ( db_get_column ( driver, Fi->table, afcol, &Column ) != DB_OK) 
-            G_fatal_error(_("Cannot get column info"));
+	    G_fatal_error(_("Column <%s> not found in table <%s>"),
+			  afcol, Fi->table);
 
 	fctype = db_sqltype_to_Ctype ( db_get_column_sqltype(Column) );
 	
 	if ( fctype != DB_C_TYPE_INT && fctype != DB_C_TYPE_DOUBLE )
-	    G_fatal_error (_("Column type not supported"));
+	    G_fatal_error (_("Data type of column <%s> not supported (must be numeric)"),
+			   afcol);
 
 	db_CatValArray_init ( &fvarr );
 	nrec = db_select_CatValArray ( driver, Fi->table, Fi->key, afcol, NULL, &fvarr );
@@ -190,12 +193,14 @@
 
 	if ( abcol != NULL ) { 
 	    if ( db_get_column ( driver, Fi->table, abcol, &Column ) != DB_OK) 
-		G_fatal_error(_("Cannot get column info"));
+		G_fatal_error(_("Column <%s> not found in table <%s>"),
+			      abcol, Fi->table);
 
 	    bctype = db_sqltype_to_Ctype ( db_get_column_sqltype(Column) );
 	    
 	    if ( bctype != DB_C_TYPE_INT && bctype != DB_C_TYPE_DOUBLE )
-		G_fatal_error (_("Column type not supported"));
+		G_fatal_error (_("Data type of column <%s> not supported (must be numeric)"),
+			       abcol);
 
 	    db_CatValArray_init ( &bvarr );
 	    nrec = db_select_CatValArray ( driver, Fi->table, Fi->key, abcol, NULL, &bvarr );
@@ -205,7 +210,7 @@
 	
     skipped = 0;
     
-    G_message (_("Registering arcs ..."));
+    G_message (_("Registering arcs..."));
     
     for ( i = 1; i <= nlines; i++ ) {
 	G_percent ( i, nlines, 1 ); /* must be before any continue */
@@ -296,24 +301,28 @@
         G_debug ( 2, "Set nodes' costs");
 	if ( nfield < 1 ) G_fatal_error ("Node field < 1");
 
-        G_message (_("Setting node costs ..."));
+        G_message (_("Setting node costs..."));
 
         Fi = Vect_get_field( Map, nfield);
-	if ( Fi == NULL ) G_fatal_error (_("Cannot get field info"));
+	if ( Fi == NULL )
+	    G_fatal_error (_("Database connection not defined for layer %d"),
+			   nfield);
 	
 	driver = db_start_driver_open_database ( Fi->driver, Fi->database );
 	if ( driver == NULL )
-	    G_fatal_error(_("Cannot open database <%s> by driver <%s>"),
+	    G_fatal_error(_("Unable to open database <%s> by driver <%s>"),
 			  Fi->database, Fi->driver) ;
 
 	/* Load costs to array */
 	if ( db_get_column ( driver, Fi->table, ncol, &Column ) != DB_OK) 
-            G_fatal_error(_("Cannot get column info"));
+            G_fatal_error(_("Column <%s> not found in table <%s>"),
+			  ncol, Fi->table);
 
 	fctype = db_sqltype_to_Ctype ( db_get_column_sqltype(Column) );
 	
 	if ( fctype != DB_C_TYPE_INT && fctype != DB_C_TYPE_DOUBLE )
-	    G_fatal_error (_("Column type not supported"));
+	    G_fatal_error (_("Data type of column <%s> not supported (must be numeric)"),
+			   ncol);
 
 	db_CatValArray_init ( &fvarr );
 	nrec = db_select_CatValArray ( driver, Fi->table, Fi->key, ncol, NULL, &fvarr );
@@ -365,9 +374,10 @@
 	db_CatValArray_free ( &fvarr);
     }
     
-    G_message (_("Flattening the graph ...")); 
+    G_message (_("Flattening the graph...")); 
     ret = dglFlatten ( gr );
-    if ( ret < 0 ) G_fatal_error (_("GngFlatten error"));
+    if ( ret < 0 )
+	G_fatal_error (_("GngFlatten error"));
     
     /* init SP cache */
     /* Disabled because of BUG1 in dglib. Without cache it is terribly slow, but with cache there
@@ -381,15 +391,23 @@
 
 
 /*!
- \fn int Vect_net_shortest_path ( struct Map_info *Map, int from, int to, struct ilist *List, double *cost ) 
- \brief Find shortest path. Costs for 'from' and 'to' nodes are not considered (SP found even if
-        'from' or 'to' are 'closed' (costs = -1) and costs of these nodes are not added to SP costs result.
- \return number of segments : ( 0 is correct for from = to, or List == NULL ),
-              ? sum of costs is better return value,
-           -1 : destination unreachable
- \param Map_info structure, from?, to?, ilist? cost
+  \brief Find shortest path.
+
+  Costs for 'from' and 'to' nodes are not considered (SP found even if
+  'from' or 'to' are 'closed' (costs = -1) and costs of these
+  nodes are not added to SP costs result.
+
+  \param Map vector map
+  \param from from node
+  \param to to node
+  \param[out] List list of line ids (path)
+  \param[out] cost costs value
+
+  \return number of segments
+  \return 0 is correct for from = to, or List == NULL ) ? sum of costs is better return value,
+  \return -1 : destination unreachable
+
 */
-#include<fcntl.h>
 int
 Vect_net_shortest_path ( struct Map_info *Map, int from, int to, struct ilist *List, double *cost ) 
 {
@@ -428,7 +446,7 @@
 	return -1;
     }
     else if ( nRet < 0 ) {
-        fprintf( stderr , "dglShortestPath error: %s\n", dglStrerror( &(Map->graph) ) );
+        G_warning(_("dglShortestPath error: %s"), dglStrerror( &(Map->graph) ) );
 	return -1;
     }
     
@@ -462,11 +480,17 @@
     return (cArc);
 }
 
-/* 
-*  Returns in cost for given direction (GV_FORWARD,GV_BACKWARD) in *cost.
-*  cost is set to -1 if closed.
-*  Return : 1 : OK
-*           0 : does not exist (was not inserted)
+/*! 
+  \brief Returns in cost for given direction in *cost.
+
+  cost is set to -1 if closed.
+
+  \param Map vector map
+  \param line line id
+  \param direction direction (GV_FORWARD, GV_BACKWARD) 
+
+  \return 1 OK
+  \return 0 does not exist (was not inserted)
 */
 int
 Vect_net_get_line_cost ( struct Map_info *Map, int line, int direction, double *cost )
@@ -504,9 +528,14 @@
     return 1;
 }
 
-/* 
-*  Returns in cost for given node in *cost.
-*  Return : 1 : OK
+/*!
+  \brief Get cost of node
+
+  \param Map vector map
+  \param node node id
+  \param[out] cost costs value
+
+  \return 1
 */
 int
 Vect_net_get_node_cost ( struct Map_info *Map, int node, double *cost )
@@ -521,27 +550,22 @@
 }
 
 /*!
- \fn int Vect_net_nearest_nodes ( struct Map_info *Map, double x, double y, double z, 
- 		int direction, double maxdist,
-		int *node1, int *node2, int *ln, double *costs1, double costs2,
-                struct line_pnts *Points1, struct line_pnts *Points1 )
- \brief Find nearest node(s) on network. 
- 
- \return number of nodes found (0,1,2)
- \param Map
- \param x point x coordinate
- \param y point y coordinate
- \param z point z coordinate (NOT USED !)
- \param direction (GV_FORWARD - from point to net, GV_BACKWARD - from net to point)
- \param maxdist maximum distance to the network
- \param node1 pointer where to store the node number (or NULL)
- \param node2 pointer where to store the node number (or NULL)
- \param ln    pointer where to store the nearest line number (or NULL)
- \param costs1 pointer where to store costs on nearest line to node1 (not costs from x,y,z to the line) (or NULL)
- \param costs2 pointer where to store costs on nearest line to node2 (not costs from x,y,z to the line) (or NULL)
- \param Points1 pointer to structure where to store vertices on nearest line to node1 (or NULL)
- \param Points2 pointer to structure where to store vertices on nearest line to node2 (or NULL)
- \param pointer where to distance to the line (or NULL)
+  \brief Find nearest node(s) on network. 
+  
+  \param Map vetor map
+  \param x,y,z point coordinates (z coordinate NOT USED !)
+  \param direction (GV_FORWARD - from point to net, GV_BACKWARD - from net to point)
+  \param maxdist maximum distance to the network
+  \param node1 pointer where to store the node number (or NULL)
+  \param node2 pointer where to store the node number (or NULL)
+  \param ln    pointer where to store the nearest line number (or NULL)
+  \param costs1 pointer where to store costs on nearest line to node1 (not costs from x,y,z to the line) (or NULL)
+  \param costs2 pointer where to store costs on nearest line to node2 (not costs from x,y,z to the line) (or NULL)
+  \param Points1 pointer to structure where to store vertices on nearest line to node1 (or NULL)
+  \param Points2 pointer to structure where to store vertices on nearest line to node2 (or NULL)
+  \param pointer where to distance to the line (or NULL)
+
+  \return number of nodes found (0,1,2)
 */
 int Vect_net_nearest_nodes ( struct Map_info *Map, 
 	                     double x, double y, double z, 
@@ -706,31 +730,22 @@
 }
 
 /*!
- \fn int Vect_net_shortest_path_coor ( struct Map_info *Map, 
-                double fx, double fy, double fz, double tx, double ty, double tz,
-		double fmax, double tmax,
-		double *costs, struct line_pnts *Points,
-		double *fdist, double *tdist )
- \brief Find shortest path on network between 2 points given by coordinates. 
+  \brief Find shortest path on network between 2 points given by coordinates. 
+  
+  \param Map vector map
+  \param fx,fy,fz from point x coordinate (z ignored)
+  \param tx,ty,tz to point x coordinate (z ignored)
+  \param fmax maximum distance to the network from 'from'
+  \param tmax maximum distance to the network from 'to'
+  \param costs pointer where to store costs on the network (or NULL)
+  \param Points pointer to the structure where to store vertices of shortest path (or NULL)
+  \param List pointer to the structure where list of lines on the network is stored (or NULL)
+  \param FPoints pointer to the structure where to store line from 'from' to first network node (or NULL)
+  \param TPoints pointer to the structure where to store line from last network node to 'to' (or NULL)
+  \param fdist distance from 'from' to the net (or NULL)
+  \param tdist distance from 'to' to the net (or NULL)
 
- \return 1 OK, 0 not reachable
- 
- \param Map
- \param fx from point x coordinate
- \param fy from point y coordinate
- \param fz from point z coordinate (ignored)
- \param tx to point x coordinate
- \param ty to point y coordinate
- \param tz to point z coordinate (ignored)
- \param fmax maximum distance to the network from 'from'
- \param tmax maximum distance to the network from 'to'
- \param costs pointer where to store costs on the network (or NULL)
- \param Points pointer to the structure where to store vertices of shortest path (or NULL)
- \param List pointer to the structure where list of lines on the network is stored (or NULL)
- \param FPoints pointer to the structure where to store line from 'from' to first network node (or NULL)
- \param TPoints pointer to the structure where to store line from last network node to 'to' (or NULL)
- \param fdist distance from 'from' to the net (or NULL)
- \param tdist distance from 'to' to the net (or NULL)
+  \return 1 OK, 0 not reachable
 */
 int 
 Vect_net_shortest_path_coor ( struct Map_info *Map, 

Modified: grass/trunk/lib/vector/Vlib/open.c
===================================================================
--- grass/trunk/lib/vector/Vlib/open.c	2008-01-13 12:05:46 UTC (rev 29692)
+++ grass/trunk/lib/vector/Vlib/open.c	2008-01-13 12:41:21 UTC (rev 29693)
@@ -5,15 +5,17 @@
  *
  * Higher level functions for reading/writing/manipulating vectors.
  *
- * \author Original author CERL, probably Dave Gerdes or Mike
- * Higgins. Update to GRASS 5.7 Radim Blazek and David D. Gray.
+ * (C) 2001-2008 by the GRASS Development Team
  *
- * (C) 2001 by the GRASS Development Team
- *
  * This program is free software under the 
  * GNU General Public License (>=v2). 
  * Read the file COPYING that comes with GRASS
  * for details.
+ *
+ * \author Original author CERL, probably Dave Gerdes or Mike
+ * Higgins. Update to GRASS 5.7 Radim Blazek and David D. Gray.
+ *
+ * \date 2001-2008
  */
 #include <stdlib.h>
 #include <stdio.h>
@@ -44,7 +46,7 @@
 #endif
 };
 
-void 
+static void 
 fatal_error ( int ferror, char *errmsg ) 
 {
       switch ( ferror ) {
@@ -61,8 +63,6 @@
 
 
 /*!
- * \fn int Vect_set_open_level (int level)
- *
  * \brief Predetermine level at which a map will be opened for
  * reading.
  *
@@ -100,8 +100,6 @@
 
 
 /*! 
- * \fn Vect__open_old (struct Map_info *Map, char *name, char *mapset, int update, int head_only)
- * 
  * \brief Open old vector for reading.
  *
  * In case of error, the functions respect fatal error settings.
@@ -363,8 +361,6 @@
 }
 
 /*!
- * \fn int Vect_open_old ( struct Map_info *Map, char *name, char *mapset)
- *
  * \brief Open existing vector for reading
  *
  * In case of error, the functions respect fatal error settings.
@@ -386,8 +382,6 @@
 }
 
 /*!
- * \fn int Vect_open_update ( struct Map_info *Map, char *name, char *mapset)
- *
  * \brief Open existing vector for reading/writing
  *
  * In case of error, the functions respect fatal error settings.
@@ -424,8 +418,6 @@
 }
 
 /*! 
- * \fn Vect_open_old_head (struct Map_info *Map,char *name, char *mapset)
- *
  * \brief Reads only info about vector from headers of 'head', 'dbln',
  * 'topo' and 'cidx' file.
  *
@@ -445,8 +437,6 @@
 }
 
 /*!
- * \fn int Vect_open_update_head ( struct Map_info *Map, char *name, char *mapset)
- *
  * \brief Open old vector head for updating (mostly for database link updates)
  *
  * In case of error, the functions respect fatal error settings.
@@ -480,8 +470,6 @@
 }
 
 /*!
- * \fn int Vect_open_new ( struct Map_info *Map, char *name, int with_z)
- *
  * \brief Open new vector for reading/writing
  *
  * \param[out] Map vector map
@@ -565,8 +553,6 @@
 }
 
 /*!
- * \fn int Vect_coor_info ( struct Map_info *Map, struct Coor_info *Info )
- *
  * \brief Update Coor_info structure
  *
  * \param[in] Map vector map
@@ -615,8 +601,6 @@
 }
 
 /*!
- * \fn char * Vect_maptype_info ( struct Map_info *Map )
- *
  * \brief Gets maptype (native, shape, postgis)
  *
  * \param[in] Map vector map
@@ -646,8 +630,6 @@
 
 
 /*!
- * \fn int Vect_open_topo (struct Map_info *Map, int head_only)
- *
  * \brief Open topo file
  *
  * \param[in,out] Map vector map
@@ -728,8 +710,6 @@
 }
 
 /*!
- * \fn int Vect_open_spatial_index (struct Map_info *Map)
- *
  * \brief Open spatial index file
  *
  * \param[in,out] Map vector map

Modified: grass/trunk/lib/vector/Vlib/overlay.c
===================================================================
--- grass/trunk/lib/vector/Vlib/overlay.c	2008-01-13 12:05:46 UTC (rev 29692)
+++ grass/trunk/lib/vector/Vlib/overlay.c	2008-01-13 12:41:21 UTC (rev 29693)
@@ -1,33 +1,40 @@
-/*
-****************************************************************************
-*
-* MODULE:       Vector library 
-*   	    	
-* AUTHOR(S):    Radim Blazek
-*
-* PURPOSE:      Higher level functions for reading/writing/manipulating vectors.
-*
-* COPYRIGHT:    (C) 2001 by the GRASS Development Team
-*
-*               This program is free software under the GNU General Public
-*   	    	License (>=v2). Read the file COPYING that comes with GRASS
-*   	    	for details.
-*
-*****************************************************************************/
+/*!
+  \file overlay.c
+  
+  \brief Vector library - overlays
+  
+  Higher level functions for reading/writing/manipulating vectors.
+
+  This is file is just example and starting point for writing overlay
+  functions!!!
+
+  (C) 2001-2008 by the GRASS Development Team
+  
+  This program is free software under the 
+  GNU General Public License (>=v2). 
+  Read the file COPYING that comes with GRASS
+  for details.
+  
+  \author Radim Blazek
+  
+  \date 2001
+*/
+
 #include <string.h>
 #include <grass/Vect.h>
+#include <grass/glocale.h>
 
-/* This is file is just example and starting point for writing overlay functions!!! */
-int Vect_overlay_and ( struct Map_info *, int, struct ilist *, struct ilist *,
-	               struct Map_info *, int, struct ilist *, struct ilist *,
-		       struct Map_info *);
+int Vect_overlay_and (struct Map_info *, int, struct ilist *, struct ilist *,
+		      struct Map_info *, int, struct ilist *, struct ilist *,
+		      struct Map_info *);
 
+/*!
+  \brief Get operator code from string
 
-/*!
- \fn int Vect_overlay_str_to_operator ( char *str )
- \brief Get operator code from string
- \return operator code, -1 on error
- \param operator code string
+  \param str operator code string
+
+  \return operator code
+  \return -1 on error
 */
 int 
 Vect_overlay_str_to_operator ( char *str )
@@ -41,16 +48,19 @@
     return -1;
 }
     
-
 /*!
- \fn int Vect_overlay ( struct Map_info *AMap, int atype, struct ilist *AList, struct ilist *AAList,
-               struct Map_info *BMap, int btype, struct ilist *BList, struct ilist *BAList,
-	       int operator,  struct Map_info *OMap )
+  \brief Overlay 2 vector maps and create new one
 
- \brief Overlay 2 maps and create new one
- \return 0 on success,?? on error
- \param AMap, atype, AList, AAList, BMap, btype, BList, BAList,
-   operator, OMap
+  \param AMap vector map A
+  \param AList unused ?
+  \param AAList unused ?
+  \param BMap vector map B
+  \param BList unused ?
+  \param BAList unused ?
+  \param operator operator code
+  \param OMap output vector map
+
+  \return 0 on success
 */
 int 
 Vect_overlay ( struct Map_info *AMap, int atype, struct ilist *AList, struct ilist *AAList, /* map A */
@@ -63,23 +73,32 @@
             Vect_overlay_and ( AMap, atype, AList, AAList, BMap, btype, BList, BAList, OMap );
             break;
 	default:
-	    G_fatal_error (" Vect_overlay(): unknown operator" );
+	    G_fatal_error ("Vect_overlay(): %s", _("unknown operator"));
     }
     
     return 0;
 }
 
 /*!
- \fn int Vect_overlay_and ( struct Map_info *AMap, int atype, struct ilist *AList, struct ilist *AAList,
-                   struct Map_info *BMap, int btype, struct ilist *BList, struct ilist *BAList,
-                   struct Map_info *OMap )
- \brief overlay 2 vector maps with AND.  AND supports:       point line area
+  \brief Overlay 2 vector maps with AND.
+
+  AND supports:point line area
                point  +     -    +
                line   -     -    -
                area   +     -    -
- \return 1 on success, 0 on error
- \param AMap,  atype,  AList, AAList, BMap, btype, BList, BAList,
-                   OMap )
+
+  \param AMap vector map A
+  \param atype feature type for A
+  \param AList unused ?
+  \param AAList unused ?
+  \param BMap vector map B
+  \param btype feature type for B
+  \param BList unused ?
+  \param BAList unused ?
+  \param operator operator code
+
+  \return 1 on success
+  \return 0 on error
 */
 int 
 Vect_overlay_and ( struct Map_info *AMap, int atype, struct ilist *AList, struct ilist *AAList,
@@ -102,10 +121,10 @@
     
     /* TODO: support all types; at present only point x point, area x point and point x area supported  */
     if ( ( atype & GV_LINES ) || (btype & GV_LINES) )
-        G_warning ("overlay: line/boundary types not supported by AND operator"); 
+        G_warning (_("Overlay: line/boundary types not supported by AND operator")); 
     
     if ( ( atype & GV_AREA ) && (btype & GV_AREA) )
-        G_warning ("overlay: area x area types not supported by AND operator"); 
+        G_warning (_("Overlay: area x area types not supported by AND operator")); 
 	
     /* TODO: more points in one node in one map */
     
@@ -213,4 +232,3 @@
 
     return 0;
 }
-

Modified: grass/trunk/lib/vector/Vlib/poly.c
===================================================================
--- grass/trunk/lib/vector/Vlib/poly.c	2008-01-13 12:05:46 UTC (rev 29692)
+++ grass/trunk/lib/vector/Vlib/poly.c	2008-01-13 12:41:21 UTC (rev 29693)
@@ -1,25 +1,29 @@
-/*
-****************************************************************************
-*
-* MODULE:       Vector library 
-*   	    	
-* AUTHOR(S):    Original author CERL, probably Dave Gerdes or Mike Higgins.
-*               Update to GRASS 5.7 Radim Blazek and David D. Gray.
-*
-* PURPOSE:      Higher level functions for reading/writing/manipulating vectors.
-*
-* COPYRIGHT:    (C) 2001 by the GRASS Development Team
-*
-*               This program is free software under the GNU General Public
-*   	    	License (>=v2). Read the file COPYING that comes with GRASS
-*   	    	for details.
-*
-*****************************************************************************/
+/*!
+  \file poly.c
+  
+  \brief Vector library - polygon related fns
+  
+  Higher level functions for reading/writing/manipulating vectors.
+
+  (C) 2001-2008 by the GRASS Development Team
+  
+  This program is free software under the 
+  GNU General Public License (>=v2). 
+  Read the file COPYING that comes with GRASS
+  for details.
+  
+  \author Original author CERL, probably Dave Gerdes or Mike Higgins.
+  Update to GRASS 5.7 Radim Blazek and David D. Gray.
+  
+  \date 2001
+*/
+
 #include <math.h>
 #include <stdlib.h>
 #include <grass/Vect.h>
 #include <grass/gis.h>
 #include <grass/linkm.h>
+#include <grass/glocale.h>
 
 struct Slink
   {
@@ -38,14 +42,19 @@
 
 
 /*!
- \fn int Vect_get_point_in_area ( struct Map_info *Map, int area, double *X, double *Y)
- \brief get point inside area and outside all islands
-        Take a line and intersect it with the polygon and any islands.
-        sort the list of X values from these intersections.  This will
-        be a list of segments alternating  IN/OUT/IN/OUT of the polygon.
-        Pick the largest IN segment and take the midpoint. 
- \return 0 on success, -1 on error
- \param Map_info structure, area number, x, y
+  \brief Get point inside area and outside all islands.
+  
+  Take a line and intersect it with the polygon and any islands.
+  sort the list of X values from these intersections.  This will
+  be a list of segments alternating  IN/OUT/IN/OUT of the polygon.
+  Pick the largest IN segment and take the midpoint. 
+  
+  \param Map vector map
+  \param area area id
+  \param[out] X,Y point coordinateds
+
+  \return 0 on success
+  \return -1 on error
 */
 int 
 Vect_get_point_in_area ( struct Map_info *Map, int area, double *X, double *Y)
@@ -113,15 +122,20 @@
 }
 
 /*
-   **
-   **  For each intersection of a polygon w/ a line, stuff the 
-   **   X value in the Inter  Points array.  I used line_pnts, just
-   **   cuz the memory management was already there.  I am getting real
-   **   tired of managing realloc stuff.
-   **  Assumes that no vertex of polygon lies on Y
-   **  This is taken care of by functions calling this function
-   **
-   ** returns 0  or  -1 on error 
+  \brief Intersects line with polygon
+
+  For each intersection of a polygon w/ a line, stuff the X value in
+  the Inter Points array.  I used line_pnts, just cuz the memory
+  management was already there.  I am getting real tired of managing
+  realloc stuff.  Assumes that no vertex of polygon lies on Y This is
+  taken care of by functions calling this function
+
+  \param Points line
+  \param y ?
+  \param Iter intersection ?
+
+  \return 0 on success
+  \return -1 on error 
  */
 int 
 Vect__intersect_line_with_poly (
@@ -157,10 +171,15 @@
 }
 
 /*!
- \fn int Vect_get_point_in_poly (struct line_pnts *Points, double *X, double *Y)
- \brief get point inside polygon. This does NOT consider ISLANDS!
- \return 0 on success, -1 on error
- \param line_pnts structure
+  \brief Get point inside polygon.
+
+  This does NOT consider ISLANDS!
+
+  \param Points polygon
+  \param[out] X,Y point coordinates
+
+  \return 0 on success
+  \return -1 on error
 */
 int 
 Vect_get_point_in_poly (struct line_pnts *Points, double *X, double *Y)
@@ -221,28 +240,36 @@
 
   if (ret < 0)
     {
-      fprintf (stderr, "Could not find point in polygon\n");
+      G_warning ("Vect_get_point_in_poly(): %s", _("Unable to find point in polygon"));
       return -1;
     }
 
-/*DEBUG fprintf (stderr, "Found point in %d iterations\n", 10 - ret); */
+  G_debug(3, "Found point in %d iterations", 10 - ret); 
 
   return 0;
 }
 
 
 /*
-   ** provide a breadth first binary division of real space along line segment
-   **  looking for a point w/in the polygon.
-   **
-   **  This routine walks along the list of points on line segment
-   **  and divides each pair in half. It sticks that new point right into
-   **  the list, and then checks to see if it is inside the poly. 
-   **
-   **  after going through the whole list, it calls itself.  The list 
-   **   now has a whole extra set of points to divide again.
-   **
-   **  returns # levels it took  or -1 if exceeded # of levels
+  \brief Provide a breadth first binary division of real space along line segment.
+
+  Looking for a point w/in the polygon.
+  
+  This routine walks along the list of points on line segment
+  and divides each pair in half. It sticks that new point right into
+  the list, and then checks to see if it is inside the poly. 
+  
+  After going through the whole list, it calls itself.  The list 
+  now has a whole extra set of points to divide again.
+  
+  \param Head 
+  \param Points
+  \param Token
+  \param X,Y
+  \param levels
+
+  \return # levels it took
+  \return -1 if exceeded # of levels
  */
 static int 
 Vect__divide_and_conquer (
@@ -254,7 +281,7 @@
 {
   struct Slink *A, *B, *C;
 
-/*DEBUG fprintf (stderr, "              LEVEL %d\n", levels); */
+  G_debug (3, "Vect__divide_and_conquer(): LEVEL %d", levels);
   A = Head;
   B = Head->next;
 
@@ -288,7 +315,6 @@
   return Vect__divide_and_conquer (Head, Points, Token, X, Y, --levels);
 }
 
-
 static void 
 destroy_links (struct Slink *Head)
 {
@@ -306,11 +332,13 @@
 
 
 /*!
- \fn int Vect_find_poly_centroid ( struct line_pnts *points,
-			  double *cent_x, double *cent_y)
- \brief get centroid of polygon
- \return 0 on success, -1 on error
- \param line_pnts * structure, x, y of centroid
+  \brief Get centroid of polygon
+
+  \param points polygon
+  \param[out] cent_x,cent_y centroid coordinates
+
+  \return 0 on success
+  \return -1 on error
 */
 int 
 Vect_find_poly_centroid (
@@ -393,16 +421,20 @@
 */
 
 /*!
- \fn int Vect_get_point_in_poly_isl ( struct line_pnts *Points, struct line_pnts **IPoints,
-			     int n_isles,
-			     double *att_x, double *att_y)
- \brief get point inside polygon but outside the islands specifiled in IPoints.
-        Take a line and intersect it with the polygon and any islands.
-        sort the list of X values from these intersections.  This will
-        be a list of segments alternating  IN/OUT/IN/OUt of the polygon.
-        Pick the largest IN segment and take the midpoint. 
- \return 0 on success, -1 on error
- \param Map_info structure
+  \brief Get point inside polygon but outside the islands specifiled in IPoints.
+  
+  Take a line and intersect it with the polygon and any islands.
+  sort the list of X values from these intersections.  This will
+  be a list of segments alternating  IN/OUT/IN/OUt of the polygon.
+  Pick the largest IN segment and take the midpoint. 
+
+  \param Points polygon
+  \param IPoints isles
+  \param n_isles number of isles
+  \param[out] att_x,att_y point coordinates
+
+  \return 0 on success
+  \return -1 on error
 */
 int 
 Vect_get_point_in_poly_isl (
@@ -458,7 +490,7 @@
 	  return 0;
 	}
     }
-/* guess we have to do it the hard way... */
+  /* guess we have to do it the hard way... */
 
   /* first find att_y close to cent_y so that no points lie on the line */
   /* find the point closest to line from below, and point close to line
@@ -543,7 +575,7 @@
  * Returns: -1 point exactly on segment
  *          number of intersections
  */
-int 
+static int 
 segments_x_ray ( double X, double Y, struct line_pnts *Points)
 {
     double x1, x2, y1, y2;
@@ -625,19 +657,22 @@
 	}
 	/* should not be reached (one condition is not necessary, but it is may be better readable
 	 * and it is a check) */
-	G_warning ( "segments_x_ray() conditions failed:" );
-        G_warning ( "X = %f Y = %f x1 = %f y1 = %f x2 = %f y2 = %f", X, Y, x1, y1, x2, y2 );
+	G_warning ("segments_x_ray() %s: X = %f Y = %f x1 = %f y1 = %f x2 = %f y2 = %f",
+		   _("conditions failed"), X, Y, x1, y1, x2, y2 );
     }
 
     return  n_intersects;
 }
 
-/*
- *  Determines if a point (X,Y) is inside a polygon.
- *
- *  Returns: 0 - outside
- *           1 - inside 
- *           2 - on the boundary (exactly may be said only for vertex of vertical/horizontal line)
+/*!
+  \brief Determines if a point (X,Y) is inside a polygon.
+
+  \param X,Y point coordinates
+  \param Points polygon
+
+  \return 0 - outside
+  \return 1 - inside 
+  \return 2 - on the boundary (exactly may be said only for vertex of vertical/horizontal line)
  */
 int
 Vect_point_in_poly ( double X, double Y, struct line_pnts *Points)
@@ -656,13 +691,17 @@
         return 0;
 }
 
-/*
- *  Determines if a point (X,Y) is inside an area outer ring. Islands are not considered.
- *
- *  Returns: 0 - outside
- *           1 - inside 
- *           2 - on the boundary (exactly may be said only for vertex of vertical/horizontal line)
- */
+/*!
+  \brief Determines if a point (X,Y) is inside an area outer ring. Islands are not considered.
+ 
+  \param X,Y point coordinates
+  \param Map vector map
+  \param area area id
+
+  \return 0 - outside
+  \return 1 - inside 
+  \return 2 - on the boundary (exactly may be said only for vertex of vertical/horizontal line)
+*/
 int
 Vect_point_in_area_outer_ring ( double X, double Y, struct Map_info *Map, int area)
 {
@@ -713,13 +752,17 @@
         return 0;
 }
 
-/*
- *  Determines if a point (X,Y) is inside an island.
- *
- *  Returns: 0 - outside
- *           1 - inside 
- *           2 - on the boundary (exactly may be said only for vertex of vertical/horizontal line)
- */
+/*!
+  \brief Determines if a point (X,Y) is inside an island.
+
+  \param X,Y point coordinates
+  \param Map vector map
+  \param isle isle id
+
+  \return 0 - outside
+  \return 1 - inside 
+  \return 2 - on the boundary (exactly may be said only for vertex of vertical/horizontal line)
+*/
 int
 Vect_point_in_island ( double X, double Y, struct Map_info *Map, int isle)
 {
@@ -764,4 +807,3 @@
     else
         return 0;
 }
-

Modified: grass/trunk/lib/vector/Vlib/read.c
===================================================================
--- grass/trunk/lib/vector/Vlib/read.c	2008-01-13 12:05:46 UTC (rev 29692)
+++ grass/trunk/lib/vector/Vlib/read.c	2008-01-13 12:41:21 UTC (rev 29693)
@@ -1,27 +1,30 @@
-/*
-****************************************************************************
-*
-* MODULE:       Vector library 
-*   	    	
-* AUTHOR(S):    Original author CERL, probably Dave Gerdes or Mike Higgins.
-*               Update to GRASS 5.7 Radim Blazek and David D. Gray.
-*
-* PURPOSE:      Higher level functions for reading/writing/manipulating vectors.
-*
-* COPYRIGHT:    (C) 2001 by the GRASS Development Team
-*
-*               This program is free software under the GNU General Public
-*   	    	License (>=v2). Read the file COPYING that comes with GRASS
-*   	    	for details.
-*
-*****************************************************************************/
+/*!
+  \file read.c
+  
+  \brief Vector library - reading data
+  
+  Higher level functions for reading/writing/manipulating vectors.
+
+  (C) 2001-2008 by the GRASS Development Team
+  
+  This program is free software under the 
+  GNU General Public License (>=v2). 
+  Read the file COPYING that comes with GRASS
+  for details.
+  
+  \author Original author CERL, probably Dave Gerdes or Mike Higgins.
+  Update to GRASS 5.7 Radim Blazek and David D. Gray.
+  
+  \date 2001
+*/
+
 #include <grass/Vect.h>
+#include <grass/glocale.h>
 
-
 static int read_next_dummy () { return -1; }
 
 #ifndef HAVE_OGR
-static int format () { G_fatal_error ("Requested format is not compiled in this version"); return 0; }
+static int format () { G_fatal_error (_("Requested format is not compiled in this version")x); return 0; }
 #endif
 
 static int (*Read_next_line_array[][3]) () =
@@ -45,14 +48,16 @@
 };
 
 /*!
- \fn int Vect_read_next_line ( struct Map_info *Map,
-    struct line_pnts *line_p,
-    struct line_cats *line_c)
- \brief get next vector line ?
- \return line type,
-           -1 on Out of memory,
-           -2 on EOF   
- \param Map_info structure, line_pnts structure, line_cats structure
+  \brief Get next vector line
+
+  \param Map vector map
+  \param[out] line_p line geometry
+  \param[out] line_c line categories
+
+  \return line type,
+  \return -1 on Out of memory,
+  \return -2 on EOF   
+
 */
 int
 Vect_read_next_line (
@@ -60,9 +65,8 @@
     struct line_pnts *line_p,
     struct line_cats *line_c)
 {
-#ifdef GDEBUG
+
     G_debug (3, "Vect_read_next_line()");
-#endif    
   
     if (!VECT_OPEN (Map))
         return -1;
@@ -71,15 +75,15 @@
 }
 
 /*!
- \fn int Vect_read_line ( struct Map_info *Map,
-    struct line_pnts *line_p,
-    struct line_cats *line_c,
-    int    line)
- \brief get vector line ?
- \return line type,
-           -1 on Out of memory,
-           -2 on EOF   
- \param Map_info structure, line_pnts structure, line_cats structure, line number
+  \brief Get vector line
+
+  \param Map vector map
+  \param[out] line_p line geometry
+  \param[out] line_c line categories
+  \param line line id 
+  \return line type,
+  \return -1 on Out of memory,
+  \return -2 on EOF   
 */
 int
 Vect_read_line (
@@ -92,20 +96,23 @@
     G_debug (3, "Vect_read_line()");
   
     if (!VECT_OPEN (Map))
-        G_fatal_error ( "Vect_read_line(): vector is not opened" );
+	G_fatal_error ("Vect_read_line(): %s", _("vector map is not opened"));
 
     if (line < 1 || line > Map->plus.n_lines)
-        G_fatal_error ( "Vect_read_line(): line '%d' is not reasonable (max line in map: %d)",
-	                 line, Map->plus.n_lines );
+        G_fatal_error (_("Vect_read_line(): line %d is not reasonable (max line in vector map: %d)"),
+		       line, Map->plus.n_lines );
     
     return (*V2_read_line_array[Map->format]) (Map, line_p, line_c, line);
 }
 
 /*!
- \fn int Vect_line_alive ( struct Map_info *Map, int line )
- \brief check if line is alive or dead
- \return 1 if line alive, 0 if line is dead
- \param Map_info structure, line number
+  \brief Check if line is alive or dead
+
+  \param Map vector map
+  \param line line id
+
+  \return 1 if line alive
+  \return 0 if line is dead
 */
 int
 Vect_line_alive ( struct Map_info *Map, int line )
@@ -116,10 +123,13 @@
 }
 
 /*!
- \fn int Vect_node_alive ( struct Map_info *Map, int node )
- \brief check if node is alive or dead
- \return 1 if node alive, 0 if node is dead
- \param Map_info structure, node number
+  \brief Check if node is alive or dead
+
+  \param Map vector map
+  \param node node id
+
+  \return 1 if node alive
+  \return 0 if node is dead
 */
 int
 Vect_node_alive ( struct Map_info *Map, int node )
@@ -130,10 +140,13 @@
 }
 
 /*!
- \fn int Vect_area_alive ( struct Map_info *Map, int area )
- \brief check if area is alive or dead
- \return 1 if area alive, 0 if area is dead
- \param Map_info structure, area number
+  \brief Check if area is alive or dead
+
+  \param Map vector map
+  \param area area id
+
+  \return 1 if area alive
+  \return 0 if area is dead
 */
 int
 Vect_area_alive ( struct Map_info *Map, int area )
@@ -144,10 +157,13 @@
 }
 
 /*!
- \fn int Vect_isle_alive ( struct Map_info *Map, int isle )
- \brief check if isle is alive or dead
- \return 1 if isle alive, 0 if isle is dead
- \param Map_info structure, isle number
+  \brief Check if isle is alive or dead
+
+  \param Map vector map
+  \param isle isle id
+
+  \return 1 if isle alive
+  \return 0 if isle is dead
 */
 int
 Vect_isle_alive ( struct Map_info *Map, int isle )
@@ -156,4 +172,3 @@
     
     return 0;
 }
-

Modified: grass/trunk/lib/vector/Vlib/read_nat.c
===================================================================
--- grass/trunk/lib/vector/Vlib/read_nat.c	2008-01-13 12:05:46 UTC (rev 29692)
+++ grass/trunk/lib/vector/Vlib/read_nat.c	2008-01-13 12:41:21 UTC (rev 29693)
@@ -1,59 +1,50 @@
-/*
-****************************************************************************
-*
-* MODULE:       Vector library 
-*   	    	
-* AUTHOR(S):    Original author CERL, probably Dave Gerdes or Mike Higgins.
-*               Update to GRASS 5.7 Radim Blazek and David D. Gray.
-*
-* PURPOSE:      Higher level functions for reading/writing/manipulating vectors.
-*
-* COPYRIGHT:    (C) 2001 by the GRASS Development Team
-*
-*               This program is free software under the GNU General Public
-*   	    	License (>=v2). Read the file COPYING that comes with GRASS
-*   	    	for details.
-*
-*****************************************************************************/
-/*
- *V1_read_next_line (Map, line_p)
- *              reads thru digit file looking for next line within window,
- *              stores info in struct instead of args.
- *      NOTE:  line_p->alloc_points better be set to 0 for the first call.
- * 
- * returns:  -1 on error
- *           -2 EOF
- *           line type (positive value) if it found a line
+/*!
+  \file read_nat.c
+  
+  \brief Vector library - reading data (native format)
+  
+  Higher level functions for reading/writing/manipulating vectors.
 
- **
- **
- **  The action of this routine can be modified by:
- **    Vect_read_constraint_region ()
- **    Vect_read_constraint_type   ()
- **    Vect_remove_constraints     ()
- **
- */
+  The action of this routine can be modified by:
+   - Vect_read_constraint_region()
+   - Vect_read_constraint_type()
+   - Vect_remove_constraints()
 
+  (C) 2001-2008 by the GRASS Development Team
+  
+  This program is free software under the 
+  GNU General Public License (>=v2). 
+  Read the file COPYING that comes with GRASS
+  for details.
+  
+  \author Original author CERL, probably Dave Gerdes or Mike Higgins.
+  Update to GRASS 5.7 Radim Blazek and David D. Gray.
+  
+  \date 2001
+*/
+
 #include <grass/gis.h>
 #include <grass/Vect.h>
 #include <grass/glocale.h>
 
-int Vect__Read_line_nat (struct Map_info *, struct line_pnts *, struct line_cats *, long);
+static int
+Vect__Read_line_nat (struct Map_info *,
+		     struct line_pnts *,
+		     struct line_cats *,
+		     long);
 
 /*!
- * \fn int V1_read_line_nat (struct Map_info *Map, struct line_pnts *Points, struct line_cats *Cats, long offset)
- *	      
  * \brief Read line from coor file on given offset.
  *
+ * \param Map vector map 
+ * \param Points container used to store line points within
+ * \param Cats container used to store line categories within
+ * \param offset given offset 
+ *
  * \return line type
  * \return 0 dead line
  * \return -2 end of table (last row)
  * \return -1 out of memory
- *
- * \param Map vector map layer
- * \param Points container used to store line points within
- * \param Cats container used to store line categories within
- * \param offset given offset 
  */
 int 
 V1_read_line_nat (
@@ -66,18 +57,16 @@
 }
 
 /*!
- * \fn int V1_read_next_line_nat (struct Map_info *Map, struct line_pnts *line_p, struct line_cats *line_c)
- *
  * \brief Read next line from coor file.
  *
+ * \param Map vector map layer
+ * \param line_p container used to store line points within
+ * \param line_c container used to store line categories within
+ *
  * \return line type
  * \return 0 dead line
  * \return -2 end of table (last row)
  * \return -1 out of memory
- *
- * \param Map vector map layer
- * \param line_p container used to store line points within
- * \param line_c container used to store line categories within
  */
 int 
 V1_read_next_line_nat (
@@ -124,23 +113,20 @@
       return (itype);
     }
   /* NOTREACHED */
+} 
 
-}				/*  dig_read_line_struct_in_box()  */
-
 /*!
- * \fn int V2_read_line_nat (struct Map_info *Map, struct line_pnts *line_p, struct line_cats *line_c, int line)
- *
  * \brief Reads any specified line, this is NOT affected by constraints
  *
- * \return line type ( > 0 )
- * \return 0 dead line
- * \return -1 out of memory
- * \return -2 end of file
- *
  * \param Map vector map layer
  * \param line_p container used to store line points within
  * \param line_c container used to store line categories within
  * \param line line id
+ *
+ * \return line type ( > 0 )
+ * \return 0 dead line
+ * \return -1 out of memory
+ * \return -2 end of file
  */
 int 
 V2_read_line_nat (
@@ -157,24 +143,22 @@
     Line = Map->plus.Line[line]; 
 
     if ( Line == NULL )
-	G_fatal_error (_("Attempt to read dead line [%d]"), line );
+      G_fatal_error ("V2_read_line_nat(): %s %d", _("Attempt to read dead line"), line );
 	    
     return Vect__Read_line_nat (Map, line_p, line_c, Line->offset);
 }
 
 /*!
- * \fn int V2_read_next_line_nat (struct Map_info *Map, struct line_pnts *line_p, struct line_cats *line_c)
- *
  * \brief Reads next unread line each time called.  Use Vect_rewind to reset.
+ *
+ * \param Map vector map layer
+ * \param line_p container used to store line points within
+ * \param line_c container used to store line categories within
  * 
  * \return line type ( > 0 )
  * \return 0 dead line
  * \return -1 out of memory
  * \return -2 end of file
- *
- * \param Map vector map layer
- * \param line_p container used to store line points within
- * \param line_c container used to store line categories within
  */
 int 
 V2_read_next_line_nat (
@@ -222,24 +206,21 @@
       return V2_read_line_nat (Map, line_p, line_c, Map->next_line++);
     }
 
-  /* NOTREACHED */
-}
+  /* NOTREACHED */}
 
 
 /*!  
- * \fn int Vect__Read_line_nat (struct Map_info *Map, struct line_pnts *p, struct line_cats *c, long offset)
- *
  * \brief Read line from coor file 
  *
- * \return line type ( > 0 )
- * \return 0 dead line
- * \return -1 out of memory
- * \return -2 end of file
- *
  * \param Map vector map layer
  * \param p container used to store line points within
  * \param c container used to store line categories within
  * \param offset given offset
+ *
+ * \return line type ( > 0 )
+ * \return 0 dead line
+ * \return -1 out of memory
+ * \return -2 end of file
  */
 int
 Vect__Read_line_nat (
@@ -331,9 +312,7 @@
       if (0 >= dig__fread_port_I (&n_points, 1, &(Map->dig_fp) )) return (-2);
   }
 
-#ifdef GDEBUG
   G_debug (3, "    n_points = %d", n_points);
-#endif
 
   if ( p != NULL ) {	  
       if (0 > dig_alloc_points (p, n_points + 1))
@@ -364,4 +343,3 @@
   
   return (type);
 }
-

Modified: grass/trunk/lib/vector/Vlib/read_ogr.c
===================================================================
--- grass/trunk/lib/vector/Vlib/read_ogr.c	2008-01-13 12:05:46 UTC (rev 29692)
+++ grass/trunk/lib/vector/Vlib/read_ogr.c	2008-01-13 12:41:21 UTC (rev 29693)
@@ -1,18 +1,22 @@
-/****************************************************************************
-*
-* MODULE:       Vector library 
-*   	    	
-* AUTHOR(S):    Radim Blazek, Piero Cavalieri 
-*
-* PURPOSE:      Higher level functions for reading/writing/manipulating vectors.
-*
-* COPYRIGHT:    (C) 2001 by the GRASS Development Team
-*
-*               This program is free software under the GNU General Public
-*   	    	License (>=v2). Read the file COPYING that comes with GRASS
-*   	    	for details.
-*
-*****************************************************************************/
+/*!
+  \file read_ogr.c
+  
+  \brief Vector library - reading data (OGR format)
+  
+  Higher level functions for reading/writing/manipulating vectors.
+
+  (C) 2001-2008 by the GRASS Development Team
+  
+  This program is free software under the 
+  GNU General Public License (>=v2). 
+  Read the file COPYING that comes with GRASS
+  for details.
+  
+  \author Radim Blazek, Piero Cavalieri
+  
+  \date 2001
+*/
+
 #include <grass/gis.h>
 #include <grass/Vect.h>
 #include <grass/glocale.h>
@@ -21,18 +25,16 @@
 #include <ogr_api.h>
 
 /*!
- * \fn int cache_feature ( struct Map_info *Map, OGRGeometryH hGeom, int ftype ) 
- *
  * \brief Recursively read feature and add all elements to points_cache and types_cache.
  *
  * ftype : if > 0 use this type (because parts of Polygon are read as wkbLineString)
- * 
- * \return 0 OK
- * \return 1 error
  *
  * \param Map vector map layer
  * \param hGeom OGR geometry
  * \param ftype feature type
+ * 
+ * \return 0 OK
+ * \return 1 error
  */
 static int cache_feature ( struct Map_info *Map, OGRGeometryH hGeom, int ftype ) 
 {
@@ -107,29 +109,27 @@
 	    break;
 
 	default:
-	    G_warning (_("OGR feature type [%d] not supported"), type);
+	    G_warning (_("OGR feature type %d not supported"), type);
 	    return 1;
 	    break;
     }
 }
 
 /*!
- * \fn int V1_read_next_line_ogr (struct Map_info *Map, struct line_pnts *line_p, struct line_cats *line_c)
- *
  * \brief Read next line from OGR layer. Skip empty features.
  *
  *  The action of this routine can be modified by:
- *    Vect_read_constraint_region ()
- *    Vect_read_constraint_type   ()
- *    Vect_remove_constraints     ()
+ *   - Vect_read_constraint_region()
+ *   - Vect_read_constraint_type()
+ *   - Vect_remove_constraints()
  *
- * \return  line type
- * \return  -2 no more features (EOF)
- * \return  -1 out of memory
- *
  * \param Map vector map layer
  * \param line_p container used to store line points within
  * \param line_c container used to store line categories within
+ *
+ * \return  line type
+ * \return  -2 no more features (EOF)
+ * \return  -1 out of memory
  */
 int
 V1_read_next_line_ogr (struct Map_info *Map, struct line_pnts *line_p, struct line_cats *line_c)
@@ -162,7 +162,7 @@
 
 		Map->fInfo.ogr.feature_cache_id = (int) OGR_F_GetFID ( hFeature );
 		if ( Map->fInfo.ogr.feature_cache_id == OGRNullFID ) {
-		    G_warning (_("OGR feature without ID."));
+		    G_warning (_("OGR feature without ID"));
 		}
 
 		/* Cache the feature */
@@ -212,17 +212,15 @@
 }
 
 /*!
- * \fn int V2_read_next_line_ogr (struct Map_info *Map, struct line_pnts *line_p, struct line_cats *line_c)
- * 
  * \brief Read next line from OGR layer.
  *
- * \return  line type
- * \return  -2 no more features (EOF)
- * \return  -1 out of memory
- *
  * \param Map vector map layer
  * \param line_p container used to store line points within
  * \param line_c container used to store line categories within
+ *
+ * \return  line type
+ * \return  -2 no more features (EOF)
+ * \return  -1 out of memory
  */
 int
 V2_read_next_line_ogr (struct Map_info *Map, struct line_pnts *line_p, struct line_cats *line_c)
@@ -233,17 +231,15 @@
 }
 
 /*!
- * \fn int read_line ( struct Map_info *Map, OGRGeometryH hGeom, long offset, struct line_pnts *Points ) 
- *
  * \brief Recursively descend to feature and read the part
  *
- * \return 0 OK
- * \return 1 error
- *
  * \param Map vector map layer
  * \param hGeom OGR geometry
  * \param offset given offset
  * \param Points container used to store line pointes within
+ *
+ * \return 0 OK
+ * \return 1 error
  */
 static int read_line ( struct Map_info *Map, OGRGeometryH hGeom, long offset, struct line_pnts *Points )
 {
@@ -286,25 +282,23 @@
 	    break;
 
 	default:
-	    G_warning (_("OGR feature type [%d] not supported"), eType);
+	    G_warning (_("OGR feature type %d not supported"), eType);
 	    break;
     }
     return 1;
 }
 
 /*!
- * \fn int V2_read_line_ogr (struct Map_info *Map, struct line_pnts *line_p,  struct line_cats *line_c, int line)
- *
  * \brief Read line from layer on given offset.
  *
- * \return line type
- * \return -2 end of table (last row)
- * \return -1 out of memory
- *
  * \param Map vector map layer
  * \param line_p container used to store line points within
  * \param line_c container used to store line categories within
  * \param line line id
+ *
+ * \return line type
+ * \return -2 end of table (last row)
+ * \return -1 out of memory
  */
 int
 V2_read_line_ogr (struct Map_info *Map, struct line_pnts *line_p,  struct line_cats *line_c, int line)
@@ -355,14 +349,14 @@
 		}
 		Map->fInfo.ogr.feature_cache = OGR_L_GetFeature ( Map->fInfo.ogr.layer, FID );
 		if ( Map->fInfo.ogr.feature_cache == NULL ) {
-		    G_fatal_error("Cannot read feature, FID = %ld", FID);
+		    G_fatal_error(_("Unable to get feature geometry, FID %ld"), FID);
 		}
 		Map->fInfo.ogr.feature_cache_id = FID;
 	    }
 		
 	    hGeom =  OGR_F_GetGeometryRef ( Map->fInfo.ogr.feature_cache );
 	    if (hGeom == NULL) {
-		G_fatal_error(_("Cannot get feature geometry, FID [%ld]"), FID);
+		G_fatal_error(_("Unable to get feature geometry, FID %ld"), FID);
 	    }
 	    
 	    read_line ( Map, hGeom, Line->offset + 1, line_p );

Modified: grass/trunk/lib/vector/Vlib/remove_areas.c
===================================================================
--- grass/trunk/lib/vector/Vlib/remove_areas.c	2008-01-13 12:05:46 UTC (rev 29692)
+++ grass/trunk/lib/vector/Vlib/remove_areas.c	2008-01-13 12:41:21 UTC (rev 29693)
@@ -1,35 +1,40 @@
-/* **************************************************************
- * 
- * MODULE:       vector library
- * 
- * AUTHOR(S):    Radim Blazek
- *               
- * PURPOSE:      Clean areas
- *               
- * COPYRIGHT:    (C) 2001 by the GRASS Development Team
- *
- *               This program is free software under the 
- *               GNU General Public License (>=v2). 
- *               Read the file COPYING that comes with GRASS
- *               for details.
- *
- **************************************************************/
-#include <stdlib.h> 
+/*!
+  \file remove_areas.c
+  
+  \brief Vector library - clean geometry (remove small areas)
+  
+  Higher level functions for reading/writing/manipulating vectors.
+
+  (C) 2001-2008 by the GRASS Development Team
+  
+  This program is free software under the 
+  GNU General Public License (>=v2). 
+  Read the file COPYING that comes with GRASS
+  for details.
+  
+  \author Radim Blazek
+  
+  \date 2001
+*/
+
 #include <grass/gis.h>
 #include <grass/Vect.h>
+#include <grass/glocale.h>
 
 /*!
- \fn void Vect_remove_small_areas ( struct Map_info *Map, double thresh, struct Map_info *Err, FILE *msgout)
- \brief Remove small areas from the map map. Centroid of the area and the longest boundary 
-        with adjacent area is removed.
-        Map topology must be built GV_BUILD_CENTROIDS
+  \brief Remove small areas from the map map.
 
- \param Map input map
- \param thresh maximum area size for removed areas
- \param Err vector map where removed lines and centroids are written
- \param msgout file pointer where messages will be written or NULL
- \param removed_area  pointer to where total size of removed area is stored or NULL
- \return number of removed areas 
+  Centroid of the area and the longest boundary 
+  with adjacent area is removed.
+  Map topology must be built GV_BUILD_CENTROIDS.
+
+  \param Map vector map
+  \param thresh maximum area size for removed areas
+  \param Err vector map where removed lines and centroids are written
+  \param msgout file pointer where messages will be written or NULL
+  \param removed_area  pointer to where total size of removed area is stored or NULL
+
+  \return number of removed areas 
 */
 int 
 Vect_remove_small_areas ( struct Map_info *Map, double thresh, struct Map_info *Err, FILE *msgout, 
@@ -48,7 +53,7 @@
     Points = Vect_new_line_struct ();
     Cats = Vect_new_cats_struct ();
 
-    if ( msgout ) fprintf (msgout, "Removed areas: %5d", nremoved ); 
+    if ( msgout ) fprintf (msgout, "%s: %5d", _("Removed areas"), nremoved ); 
     
     for ( area = 1; area <= Vect_get_num_areas(Map); area++ ){ 
 	int i, j, centroid, dissolve_neighbour;
@@ -85,7 +90,7 @@
 	    line = List->value[i];
 	    
 	    if ( !Vect_line_alive(Map,abs(line)) ) /* Should not happen */
-		G_fatal_error ("Area is composed of dead boundary" );
+		G_fatal_error (_("Area is composed of dead boundary"));
 
 	    Vect_get_line_areas ( Map, abs(line), &left, &right );
 	    if ( line > 0 ) neighbour = left;
@@ -160,7 +165,7 @@
 
 	nremoved++;
 	if ( msgout ) {
-	    fprintf (msgout, "\rRemoved areas: %5d", nremoved ); 
+	    fprintf (msgout, "\r%s: %5d", _("Removed areas"), nremoved ); 
 	    fflush ( stderr );
 	}
     }
@@ -171,4 +176,3 @@
 
     return (nremoved);
 }
-

Modified: grass/trunk/lib/vector/Vlib/remove_duplicates.c
===================================================================
--- grass/trunk/lib/vector/Vlib/remove_duplicates.c	2008-01-13 12:05:46 UTC (rev 29692)
+++ grass/trunk/lib/vector/Vlib/remove_duplicates.c	2008-01-13 12:41:21 UTC (rev 29693)
@@ -1,35 +1,39 @@
-/* **************************************************************
- * 
- * MODULE:       vector library
- * 
- * AUTHOR(S):    Radim Blazek
- *               
- * PURPOSE:      Clean lines
- *               
- * COPYRIGHT:    (C) 2001 by the GRASS Development Team
- *
- *               This program is free software under the 
- *               GNU General Public License (>=v2). 
- *               Read the file COPYING that comes with GRASS
- *               for details.
- *
- **************************************************************/
+/*!
+  \file remove_duplicates.c
+  
+  \brief Vector library - clean geometry (remove duplicates)
+  
+  Higher level functions for reading/writing/manipulating vectors.
+
+  (C) 2001-2008 by the GRASS Development Team
+  
+  This program is free software under the 
+  GNU General Public License (>=v2). 
+  Read the file COPYING that comes with GRASS
+  for details.
+  
+  \author Radim Blazek
+  
+  \date 2001
+*/
+
 #include <stdlib.h> 
 #include <grass/gis.h>
 #include <grass/Vect.h>
+#include <grass/glocale.h>
 
 /*!
- \fn void Vect_remove_duplicates ( struct Map_info *Map, int type, struct Map_info *Err, FILE *msgout)
- \brief Remove duplicate lines from vector map.
+  \brief Remove duplicate lines from vector map.
+  
+  Remove duplicate lines of given types from vector map. Duplicate lines may be optionaly 
+  written to error map. Input map must be opened on level 2 for update. Categories are merged.
+  
+  \param Map vector map where duplicate lines will be deleted
+  \param type type of line to be delete
+  \param Err vector map where duplicate lines will be written or NULL
+  \param msgout file pointer where messages will be written or NULL
 
- Remove duplicate lines of given types from vector map. Duplicate lines may be optionaly 
- written to error map. Input map must be opened on level 2 for update. Categories are merged.
-
- \param Map input map where duplicate lines will be deleted
- \param type type of line to be delete
- \param Err vector map where duplicate lines will be written or NULL
- \param msgout file pointer where messages will be written or NULL
- \return
+  \return void
 */
 void 
 Vect_remove_duplicates ( struct Map_info *Map, int type, struct Map_info *Err, FILE *msgout )
@@ -60,7 +64,7 @@
 	*/
         /* TODO: 3D */
 	ndupl = 0;
-	if ( msgout ) fprintf (msgout, "Duplicates: %5d", ndupl ); 
+	if ( msgout ) fprintf (msgout, "%s: %5d", _("Duplicates"), ndupl ); 
 	for ( i = 1; i <= nlines; i++ ){ 
 	    if ( !Vect_line_alive ( Map, i ) ) continue;
 
@@ -122,7 +126,7 @@
 		ndupl++;
 		
 		if ( msgout ) {
-		    fprintf (stderr, "\rDuplicates: %5d", ndupl ); 
+		    fprintf (stderr, "\r%s: %5d", _("Duplicates"), ndupl ); 
 		    fflush ( stderr );
 		}
 		
@@ -135,4 +139,3 @@
 
 	return;
 }
-

Modified: grass/trunk/lib/vector/Vlib/rewind.c
===================================================================
--- grass/trunk/lib/vector/Vlib/rewind.c	2008-01-13 12:05:46 UTC (rev 29692)
+++ grass/trunk/lib/vector/Vlib/rewind.c	2008-01-13 12:41:21 UTC (rev 29693)
@@ -1,20 +1,23 @@
-/*
-****************************************************************************
-*
-* MODULE:       Vector library 
-*   	    	
-* AUTHOR(S):    Original author CERL, probably Dave Gerdes or Mike Higgins.
-*               Update to GRASS 5.7 Radim Blazek and David D. Gray.
-*
-* PURPOSE:      Higher level functions for reading/writing/manipulating vectors.
-*
-* COPYRIGHT:    (C) 2001 by the GRASS Development Team
-*
-*               This program is free software under the GNU General Public
-*   	    	License (>=v2). Read the file COPYING that comes with GRASS
-*   	    	for details.
-*
-*****************************************************************************/
+/*!
+  \file rewind.c
+  
+  \brief Vector library - rewind data
+  
+  Higher level functions for reading/writing/manipulating vectors.
+
+  (C) 2001-2008 by the GRASS Development Team
+  
+  This program is free software under the 
+  GNU General Public License (>=v2). 
+  Read the file COPYING that comes with GRASS
+  for details.
+  
+  \author Original author CERL, probably Dave Gerdes or Mike Higgins.
+  Update to GRASS 5.7 Radim Blazek and David D. Gray.
+  
+  \date 2001
+*/
+
 #include <grass/Vect.h>
 
 
@@ -28,7 +31,7 @@
 
 
 #ifndef HAVE_OGR
-static int format () { G_fatal_error ("Requested format is not compiled in this version"); return 0; } 
+static int format () { G_fatal_error (_("Requested format is not compiled in this version")); return 0; } 
 #endif
 
 
@@ -44,10 +47,12 @@
 
 
 /*!
- \fn int Vect_rewind (struct Map_info *Map)
- \brief Rewind vector data file to cause reads to start at beginning
- \return 0 on success, -1 on error
- \param Map_info structure
+  \brief Rewind vector data file to cause reads to start at beginning
+
+  \param Map vector map
+
+  \return 0 on success
+  \return -1 on error
 */
 int 
 Vect_rewind (struct Map_info *Map)

Modified: grass/trunk/lib/vector/Vlib/select.c
===================================================================
--- grass/trunk/lib/vector/Vlib/select.c	2008-01-13 12:05:46 UTC (rev 29692)
+++ grass/trunk/lib/vector/Vlib/select.c	2008-01-13 12:41:21 UTC (rev 29693)
@@ -1,33 +1,38 @@
-/*
-****************************************************************************
-*
-* MODULE:       Vector library 
-*   	    	
-* AUTHOR(S):    Radim Blazek
-*
-* PURPOSE:      Higher level functions for reading/writing/manipulating vectors.
-*
-* COPYRIGHT:    (C) 2001 by the GRASS Development Team
-*
-*               This program is free software under the GNU General Public
-*   	    	License (>=v2). Read the file COPYING that comes with GRASS
-*   	    	for details.
-*
-*****************************************************************************/
+/*!
+  \file rewind.c
+  
+  \brief Vector library - select vector features
+  
+  Higher level functions for reading/writing/manipulating vectors.
+
+  (C) 2001-2008 by the GRASS Development Team
+  
+  This program is free software under the 
+  GNU General Public License (>=v2). 
+  Read the file COPYING that comes with GRASS
+  for details.
+  
+  \author Radim Blazek
+  
+  \date 2001
+*/
+
 #include <stdlib.h>
 #include <grass/gis.h>
 #include <grass/Vect.h>
 
 /*!
- \fn int Vect_select_lines_by_box (struct Map_info *Map, BOUND_BOX *Box, 
-	                            int type, struct ilist *list)
- \brief Select lines by box. Select lines whose boxes overlap specified box!!!
+  \brief Select lines by box.
+
+  Select lines whose boxes overlap specified box!!!
   It means that selected line may or may not overlap the box.
- \return number of lines
- \param Map
- \param Box 
- \param type line type
- \param output list, must be initialized
+
+  \param Map vector map
+  \param Box bounding box
+  \param type line type
+  \param[out] list output list, must be initialized
+
+  \return number of lines
 */
 int 
 Vect_select_lines_by_box (struct Map_info *Map, BOUND_BOX *Box, 
@@ -69,13 +74,16 @@
 }
 
 /*!
- \fn int Vect_select_areas_by_box (struct Map_info *Map, BOUND_BOX *Box, struct ilist *list)
- \brief Select areas by box. Select areas whose boxes overlap specified box!!!
+  \brief Select areas by box.
+
+  Select areas whose boxes overlap specified box!!!
   It means that selected area may or may not overlap the box.
- \return number of areas
- \param Map
- \param Box 
- \param output list, must be initialized
+
+  \param Map vector map
+  \param Box bounding box
+  \param[out] output list, must be initialized
+
+  \return number of areas
 */
 int 
 Vect_select_areas_by_box (struct Map_info *Map, BOUND_BOX *Box, struct ilist *list)
@@ -103,13 +111,16 @@
 
 
 /*!
- \fn  int Vect_select_isles_by_box (struct Map_info *Map, BOUND_BOX *Box, struct ilist *list)
- \brief   Select isles by box. Select isles whose boxes overlap specified box!!!
-    It means that selected isle may or may not overlap the box.
- \return number of isles
- \param Map
- \param Box 
- \param output list, must be initialized
+  \brief Select isles by box.
+
+  Select isles whose boxes overlap specified box!!!
+  It means that selected isle may or may not overlap the box.
+
+  \param Map vector map
+  \param Box bounding box
+  \param[out] list output list, must be initialized
+
+  \return number of isles
 */
 int 
 Vect_select_isles_by_box (struct Map_info *Map, BOUND_BOX *Box, struct ilist *list)
@@ -130,12 +141,13 @@
 }
 
 /*!
- \fn int Vect_select_nodes_by_box (struct Map_info *Map, BOUND_BOX *Box, struct ilist *list)
- \brief Select nodes by box.
- \return number of nodes
- \param Map
- \param Box 
- \param output list, must be initialized
+  \brief Select nodes by box.
+
+  \param Map vector map
+  \param Box bounding box
+  \param[out] list output list, must be initialized
+
+  \return number of nodes
 */
 int 
 Vect_select_nodes_by_box (struct Map_info *Map, BOUND_BOX *Box, struct ilist *list)
@@ -162,17 +174,18 @@
 }
 
 /*!
- \fn int Vect_select_lines_by_polygon (struct Map_info *Map, struct line_pnts *Polygon, int nisles,
-                                       struct line_pnts **Isles, int type, struct ilist *list)
- \brief Select lines by Polygon with optional isles. 
-        Polygons should be closed, i.e. first and last points must be identical.
- \return number of lines
- \param Map 
- \param Polygon outer ring
- \param nisles number of islands or 0
- \param Isles array of islands or NULL
- \param type line type
- \param list output list, must be initialised
+  \brief Select lines by Polygon with optional isles. 
+  
+  Polygons should be closed, i.e. first and last points must be identical.
+
+  \param Map vector map
+  \param Polygon outer ring
+  \param nisles number of islands or 0
+  \param Isles array of islands or NULL
+  \param type line type
+  \param[out] list output list, must be initialised
+
+  \return number of lines
 */
 int 
 Vect_select_lines_by_polygon ( struct Map_info *Map, struct line_pnts *Polygon, int nisles,
@@ -252,17 +265,20 @@
 
 
 /*!
- \fn int Vect_select_areas_by_polygon (struct Map_info *Map, struct line_pnts *Polygon, int nisles,
-                                       struct line_pnts **Isles, struct ilist *list)
- \brief Select areas by Polygon with optional isles. 
-        Polygons should be closed, i.e. first and last points must be identical.
-        Warning : values in list may be duplicate!
- \return number of areas
- \param Map 
- \param Polygon outer ring
- \param nisles number of islands or 0
- \param Isles array of islands or NULL
- \param list output list, must be initialised
+  \brief Select areas by Polygon with optional isles. 
+  
+  Polygons should be closed, i.e. first and last points must be identical.
+  
+  Warning : values in list may be duplicate!
+
+
+  \param Map vector map
+  \param Polygon outer ring
+  \param nisles number of islands or 0
+  \param Isles array of islands or NULL
+  \param[out] list output list, must be initialised
+
+  \return number of areas
 */
 int 
 Vect_select_areas_by_polygon ( struct Map_info *Map, struct line_pnts *Polygon, int nisles,
@@ -315,4 +331,3 @@
     
     return List->n_values;
 }
-    

Modified: grass/trunk/lib/vector/Vlib/sindex.c
===================================================================
--- grass/trunk/lib/vector/Vlib/sindex.c	2008-01-13 12:05:46 UTC (rev 29692)
+++ grass/trunk/lib/vector/Vlib/sindex.c	2008-01-13 12:41:21 UTC (rev 29693)
@@ -1,28 +1,35 @@
-/****************************************************************************
-*
-* MODULE:       Vector library 
-*   	    	
-* AUTHOR(S):    Radim Blazek
-*
-* PURPOSE:      Lower level functions for reading/writing/manipulating vectors.
-*
-* COPYRIGHT:    (C) 2001 by the GRASS Development Team
-*
-*               This program is free software under the GNU General Public
-*   	    	License (>=v2). Read the file COPYING that comes with GRASS
-*   	    	for details.
-*
-*****************************************************************************/
+/*!
+  \file sindex.c
+  
+  \brief Vector library - spatial index
+  
+  Higher level functions for reading/writing/manipulating vectors.
+
+  (C) 2001-2008 by the GRASS Development Team
+  
+  This program is free software under the 
+  GNU General Public License (>=v2). 
+  Read the file COPYING that comes with GRASS
+  for details.
+  
+  \author Radim Blazek
+  
+  \date 2001
+*/
+
 #include <stdlib.h>
 #include <string.h>
 #include <grass/glocale.h>
 #include <grass/gis.h>
 #include <grass/Vect.h>
+#include <grass/glocale.h>
 
 /*!
-  \fn void Vect_spatial_index_init ( SPATIAL_INDEX *si )
-  \brief init spatial index
-  \param  si pointer to spatial index structure
+  \brief Init spatial index
+
+  \param si pointer to spatial index structure
+
+  \return void
 */
 void 
 Vect_spatial_index_init ( SPATIAL_INDEX *si ) 
@@ -33,9 +40,13 @@
 }
 
 /*!
-  \fn void Vect_spatial_index_destroy ( SPATIAL_INDEX *si )
-  \brief destroy existing spatial index, Vect_spatial_index_init() must be call before new use
-  \param  si pointer to spatial index structure
+  \brief Destroy existing spatial index
+
+  Vect_spatial_index_init() must be call before new use.
+
+  \param si pointer to spatial index structure
+
+  \return void
 */
 void 
 Vect_spatial_index_destroy ( SPATIAL_INDEX *si ) 
@@ -46,11 +57,13 @@
 }
 
 /*!
-  \fn void Vect_spatial_index_add_item ( SPATIAL_INDEX *si, int id, BOUND_BOX *box )
   \brief Add a new item to spatial index
+
   \param  si pointer to spatial index structure
   \param id item identifier
   \param box pointer to item bounding box
+
+  \return void
 */
 void 
 Vect_spatial_index_add_item ( SPATIAL_INDEX *si, int id, BOUND_BOX *box ) 
@@ -65,10 +78,12 @@
 }
 
 /*!
-  \fn void Vect_spatial_index_del_item ( SPATIAL_INDEX *si, int id )
   \brief Delete item from spatial index
+
   \param  si pointer to spatial index structure
   \param id item identifier
+
+  \return void
 */
 void 
 Vect_spatial_index_del_item ( SPATIAL_INDEX *si, int id ) 
@@ -79,7 +94,7 @@
     G_debug(3, "Vect_spatial_index_del_item(): id = %d", id );
 
     /* TODO */
-    G_fatal_error ( "Vect_spatial_index_del_item() not implemented" );
+    G_fatal_error ("Vect_spatial_index_del_item() %s", _("not implemented"));
 
     /* Bounding box of item would be needed, which is not stored in si. */
     
@@ -90,14 +105,18 @@
     
     ret = RTreeDeleteRect( &rect, id, &(si->root) ); 
 
-    if ( ret ) G_fatal_error ( "Cannot delete item %d from spatial index", id );
+    if ( ret ) G_fatal_error (_("Unable to delete item %d from spatial index"), id );
 }
 
 /*!
-  \brief Create spatial index if necessary. To be used in modules.
-         Map must be opened on level 2.
-  \param Map pointer to map
+  \brief Create spatial index if necessary.
+
+  To be used in modules.
+  Map must be opened on level 2.
+
+  \param Map pointer to vector map
   \param out print progress here
+
   \return 0 OK
   \return 1 error
 */
@@ -105,7 +124,8 @@
 Vect_build_spatial_index ( struct Map_info *Map, FILE *msgout ) 
 {
     if ( Map->level < 2 ) {
-	G_fatal_error ( _( "Cannot build spatial index from topology, the map is not opened on level2"));
+	G_fatal_error ( _("Unable to build spatial index from topology, "
+			  "vector map is not opened at topo level 2"));
     }
     if ( !(Map->plus.Spidx_built) ) {
 	return ( Vect_build_sidx_from_topo ( Map, msgout ) );
@@ -115,8 +135,10 @@
 
 /*!
   \brief Create spatial index from topo if necessary
-  \param Map pointer to map
-  \param out print progress here
+
+  \param Map pointer to vector map
+  \param msgout print progress here
+
   \return 0 OK
   \return 1 error
 */
@@ -144,7 +166,7 @@
 	G_percent2 ( i, total, 1, msgout );
 	
 	Node = plus->Node[i];
-	if ( !Node ) G_fatal_error ("BUG (Vect_build_sidx_from_topo): node does not exist");
+	if ( !Node ) G_fatal_error (_("BUG (Vect_build_sidx_from_topo): node does not exist"));
 
 	dig_spidx_add_node ( plus, i, Node->x, Node->y, Node->z );
     }
@@ -155,7 +177,7 @@
 	G_percent2 ( done+i, total, 1, msgout );
 
 	Line = plus->Line[i];
-	if ( !Line ) G_fatal_error ("BUG (Vect_build_sidx_from_topo): line does not exist");
+	if ( !Line ) G_fatal_error (_("BUG (Vect_build_sidx_from_topo): line does not exist"));
 
 	box.N = Line->N;
 	box.S = Line->S;
@@ -173,7 +195,7 @@
 	G_percent2 ( done+i, total, 1, msgout );
 	
 	Area = plus->Area[i];
-	if ( !Area ) G_fatal_error ("BUG (Vect_build_sidx_from_topo): area does not exist");
+	if ( !Area ) G_fatal_error (_("BUG (Vect_build_sidx_from_topo): area does not exist"));
 
 	box.N = Area->N;
 	box.S = Area->S;
@@ -191,7 +213,7 @@
 	G_percent2 ( done+i, total, 1, msgout );
 
 	Isle = plus->Isle[i];
-	if ( !Isle ) G_fatal_error ("BUG (Vect_build_sidx_from_topo): isle does not exist");
+	if ( !Isle ) G_fatal_error (_("BUG (Vect_build_sidx_from_topo): isle does not exist"));
 
 	box.N = Isle->N;
 	box.S = Isle->S;
@@ -219,12 +241,13 @@
 }
 
 /*!
-  \fn int Vect_spatial_index_select ( SPATIAL_INDEX *si, BOUND_BOX *box, struct ilist *list )
   \brief Select items by bounding box to list
-  \return number of selected items
+
   \param  si pointer to spatial index structure
   \param box bounding box
   \param list pointer to list where selected items are stored
+
+  \return number of selected items
 */
 int
 Vect_spatial_index_select ( SPATIAL_INDEX *si, BOUND_BOX *box, struct ilist *list ) 
@@ -242,4 +265,3 @@
     G_debug(3, "  %d items selected", list->n_values );
     return ( list->n_values );
 }
-

Modified: grass/trunk/lib/vector/Vlib/snap.c
===================================================================
--- grass/trunk/lib/vector/Vlib/snap.c	2008-01-13 12:05:46 UTC (rev 29692)
+++ grass/trunk/lib/vector/Vlib/snap.c	2008-01-13 12:41:21 UTC (rev 29693)
@@ -3,15 +3,20 @@
  *
  * \brief Vector library - Clean vector map (snap lines)
  *
- * \author Radim Blazek
+ * Higher level functions for reading/writing/manipulating vectors.
  *
- * (C) 2001 by the GRASS Development Team
+ * (C) 2001-2008 by the GRASS Development Team
  *
  * This program is free software under the 
  * GNU General Public License (>=v2). 
  * Read the file COPYING that comes with GRASS
  * for details.
+ *
+ * \author Radim Blazek
+ *
+ * \date 2001
  */
+
 #include <math.h> 
 #include <grass/gis.h>
 #include <grass/Vect.h>
@@ -40,16 +45,13 @@
     return 1;
 }
 
-
 /*!
- * \fn void Vect_snap_lines_list (struct Map_info *Map, struct ilist *List_lines, double thresh, struct Map_info *Err, FILE *msgout)
- *
  * \brief Snap selected lines to existing vertex in threshold.
  *
  * Snap selected lines to existing vertices.
  * 
  * \warning Lines are not necessarily snapped to nearest vertex, but to vertex in threshold! 
-  
+ *
  * Lines showing how vertices were snapped may be optionaly written to error map. 
  * Input map must be opened on level 2 for update at least on GV_BUILD_BASE.
  *
@@ -58,7 +60,8 @@
  * \param[in] thresh threshold in which snap vertices
  * \param[out] Err vector map where lines representing snap are written or NULL
  * \param[out] msgout file pointer where messages will be written or NULL
- \return
+ *
+ * \return void
 */
 
 /* As mentioned above, lines are not necessarily snapped to nearest vertex! For example:
@@ -72,7 +75,6 @@
      | 2
      |	
 */
-
 void 
 Vect_snap_lines_list (struct Map_info *Map, struct ilist *List_lines, double thresh, struct Map_info *Err, FILE *msgout)
 {
@@ -114,7 +116,7 @@
     XPnts = NULL;
     printed = 0;
 
-    if ( msgout ) fprintf (msgout, "%s ...", _("Registering points")); 
+    if ( msgout ) fprintf (msgout, "%s...", _("Registering points")); 
 
     for ( line_idx = 0; line_idx < List_lines -> n_values; line_idx++ ){ 
 	int v;
@@ -154,7 +156,7 @@
             }
 	}
 	if ( msgout && printed > 1000 ) {
-	    fprintf (msgout, "\r%s ... %d", _("Registering points"), point - 1); 
+	    fprintf (msgout, "\r%s... %d", _("Registering points"), point - 1); 
 	    fflush ( msgout );
 	    printed = 0;
 	}
@@ -392,8 +394,6 @@
 }
 
 /*!
- * \fn void Vect_snap_lines (struct Map_info *Map, int type, double thresh, struct Map_info *Err, FILE *msgout )
- *
  * \brief Snap lines in vector map to existing vertex in threshold.
  *
  * For details see Vect_snap_lines_list()
@@ -403,7 +403,8 @@
  * \param[in] thresh threshold in which snap vertices
  * \param[out] Err vector map where lines representing snap are written or NULL
  * \param[out] msgout file pointer where messages will be written or NULL
- \return
+ *
+ * \return void
 */
 void 
 Vect_snap_lines (struct Map_info *Map, int type, double thresh, struct Map_info *Err, FILE *msgout )

Modified: grass/trunk/lib/vector/Vlib/tin.c
===================================================================
--- grass/trunk/lib/vector/Vlib/tin.c	2008-01-13 12:05:46 UTC (rev 29692)
+++ grass/trunk/lib/vector/Vlib/tin.c	2008-01-13 12:41:21 UTC (rev 29693)
@@ -1,30 +1,36 @@
-/*
-****************************************************************************
-*
-* MODULE:       Vector library 
-*   	    	
-* AUTHOR(S):    Radim Blazek
-*
-* PURPOSE:      Higher level functions for reading/writing/manipulating vectors.
-*
-* COPYRIGHT:    (C) 2001 by the GRASS Development Team
-*
-*               This program is free software under the GNU General Public
-*   	    	License (>=v2). Read the file COPYING that comes with GRASS
-*   	    	for details.
-*
-*****************************************************************************/
+/*!
+  \file tin.c
+  
+  \brief Vector library - TIN
+  
+  Higher level functions for reading/writing/manipulating vectors.
+
+  (C) 2001-2008 by the GRASS Development Team
+  
+  This program is free software under the 
+  GNU General Public License (>=v2). 
+  Read the file COPYING that comes with GRASS
+  for details.
+  
+  \author Radim Blazek
+  
+  \date 2001
+*/
+
 #include <grass/Vect.h>
 
 /*!
- \fn int Vect_tin_get_z ( struct Map_info *Map,
-		   double tx, double ty,
-		   double *tz, double *angle, double *slope)
- \brief calculates z coordinate for point from TIN
- \return 1 on success,
-            0 point is not in area,
-           -1 area has not 4 points or has island
- \param Map_info structure
+  \brief Calculates z coordinate for point from TIN
+
+  \param Map pointer to vector map
+  \param tx,ty point coordinates
+  \param[out] tz z-coordinate of point
+  \param[out] angle angle
+  \param[out] slope slope
+
+  \return 1 on success,
+  \return 0 point is not in area,
+  \return -1 area has not 4 points or has island
 */
 int 
 Vect_tin_get_z (
@@ -85,5 +91,3 @@
   
   return 1;
 }
-
-

Modified: grass/trunk/lib/vector/Vlib/type.c
===================================================================
--- grass/trunk/lib/vector/Vlib/type.c	2008-01-13 12:05:46 UTC (rev 29692)
+++ grass/trunk/lib/vector/Vlib/type.c	2008-01-13 12:41:21 UTC (rev 29693)
@@ -1,26 +1,32 @@
-/****************************************************************************
-*
-* MODULE:       Vector library 
-*   	    	
-* AUTHOR(S):    Radim Blazek
-*
-* PURPOSE:      Higher level functions for reading/writing/manipulating vectors.
-*
-* COPYRIGHT:    (C) 2001 by the GRASS Development Team
-*
-*               This program is free software under the GNU General Public
-*   	    	License (>=v2). Read the file COPYING that comes with GRASS
-*   	    	for details.
-*
-*****************************************************************************/
+/*!
+  \file type.c
+  
+  \brief Vector library - feature type
+  
+  Higher level functions for reading/writing/manipulating vectors.
+
+  (C) 2001-2008 by the GRASS Development Team
+  
+  This program is free software under the 
+  GNU General Public License (>=v2). 
+  Read the file COPYING that comes with GRASS
+  for details.
+  
+  \author Radim Blazek
+  
+  \date 2001
+*/
+
 #include <grass/gis.h>
 #include <grass/Vect.h>
 
 /*!
- \fn int Vect_option_to_types (struct Option *type_opt )
- \brief get types from options
- \return types, -1 on error
- \param Option structure
+  \brief Get types from options
+
+  \param type_opt Option structure
+
+  \return types
+  \return -1 on error
 */
 int
 Vect_option_to_types (struct Option *type_opt )
@@ -60,4 +66,3 @@
 
     return type;
 }
-

Modified: grass/trunk/lib/vector/Vlib/write.c
===================================================================
--- grass/trunk/lib/vector/Vlib/write.c	2008-01-13 12:05:46 UTC (rev 29692)
+++ grass/trunk/lib/vector/Vlib/write.c	2008-01-13 12:41:21 UTC (rev 29693)
@@ -1,34 +1,36 @@
-/*
-****************************************************************************
-*
-* MODULE:       Vector library 
-*   	    	
-* AUTHOR(S):    Original author CERL, probably Dave Gerdes or Mike Higgins.
-*               Update to GRASS 5.7 Radim Blazek and David D. Gray.
-*
-* PURPOSE:      Higher level functions for reading/writing/manipulating vectors.
-*
-* COPYRIGHT:    (C) 2001 by the GRASS Development Team
-*
-*               This program is free software under the GNU General Public
-*   	    	License (>=v2). Read the file COPYING that comes with GRASS
-*   	    	for details.
-*
-*****************************************************************************/
+/*!
+  \file type.c
+  
+  \brief Vector library - write data
+  
+  Higher level functions for reading/writing/manipulating vectors.
+
+  (C) 2001-2008 by the GRASS Development Team
+  
+  This program is free software under the 
+  GNU General Public License (>=v2). 
+  Read the file COPYING that comes with GRASS
+  for details.
+  
+  \author Radim Blazek
+  
+  \date 2001
+*/
+
 #include <grass/gis.h>
 #include <grass/glocale.h>
 #include <grass/Vect.h>
 
 static long write_dummy () { 
-    G_warning ( _("Vect_write_line() for this format/level not supported") );
+    G_warning ("Vect_write_line() %s", _("for this format/level not supported") );
     return -1; 
 }
 static int rewrite_dummy () { 
-    G_warning ( _("Vect_rewrite_line() for this format/level not supported") );
+    G_warning ("Vect_rewrite_line() %s",  _("for this format/level not supported") );
     return -1; 
 }
 static int  delete_dummy () { 
-    G_warning ( _("Vect_delete_line() for this format/level not supported") );
+    G_warning ("Vect_delete_line() %s",  _("for this format/level not supported") );
     return -1; 
 }
 
@@ -67,18 +69,16 @@
 };
 
 /*!
- \fn long Vect_write_line (
-     struct Map_info *Map,
-     int type,
-     struct line_pnts *points,
-     struct line_cats *cats)
- \brief writes new line to the end of file (table)
-        the function calls fatal error on error
- \param Map_info structure
- \param vector type
- \param line_pnts structure
- \param line_cats structure
- \return offset into file where the line starts
+  \brief Writes new line to the end of file (table)
+
+  The function calls G_fatal_error() on error.
+
+  \param Map pointer to vector map
+  \param type vector type
+  \param points line geometry
+  \param cats line categories
+  
+  \return offset into file where the line starts
 */
 long
 Vect_write_line (
@@ -93,7 +93,7 @@
 	           Map->name, Map->format, Map->level);
 
     if (!VECT_OPEN (Map))
-	G_fatal_error ( _("Cannot write line, the map is not opened") );
+	G_fatal_error ( _("Unable to write line, vector map is not opened") );
 
     dig_line_reset_updated ( &(Map->plus) );
     dig_node_reset_updated ( &(Map->plus) );
@@ -104,28 +104,28 @@
     offset = (*Write_line_array[Map->format][Map->level]) (Map, type, points, cats);
 
     if ( offset == -1 )
-	G_fatal_error ( _("Cannot write line (negative offset)") );
+	G_fatal_error ( _("Unable to write line (negative offset)") );
 
     return offset;
 }
 
 
 /*!
- \fn int Vect_rewrite_line (
-     struct Map_info *Map,
-     int line,
-     int type,
-     struct line_pnts *points,
-     struct line_cats *cats)
- \brief rewrites line info at the given offset. The number of points
-   or cats or type may change. If necessary, the old line is deleted and
-   new is written.
- \param Map_info structure
- \param line number
- \param vector type
- \param line_pnts structure
- \param line_cats structure
- \return number of new line, -1 on error
+  \brief Rewrites line info at the given offset.
+
+  The number of points or cats or type may change. If necessary, the
+  old line is deleted and new is written.
+
+  This function calls G_fatal_error() on error.
+
+  \param Map pointer to vector map
+  \param line line id
+  \param type vector type
+  \param points line geometry
+  \param cats line categories
+  
+  \return number of new line
+  \return -1 on error
 */
 int
 Vect_rewrite_line (
@@ -140,7 +140,7 @@
     G_debug (3, "Vect_rewrite_line(): name = %s, line = %d", Map->name, line);
     
     if (!VECT_OPEN (Map))
-	G_fatal_error ( _("Cannot rewrite line, the map is not opened") );
+	G_fatal_error ( _("Unable to rewrite line, vector map is not opened") );
     
     dig_line_reset_updated ( &(Map->plus) );
     dig_node_reset_updated ( &(Map->plus) );
@@ -151,7 +151,7 @@
     ret = (*Vect_rewrite_line_array[Map->format][Map->level]) (Map, line, type, points, cats);
 
     if ( ret == -1 )
-	G_fatal_error ( _("Cannot rewrite line") );
+	G_fatal_error ( _("Unable to rewrite line %d"), line);
 
     return ret;
 }
@@ -176,29 +176,35 @@
 */
 
 /*!
- \ fn int Vect_delete_line (
-     struct Map_info *Map,
-     int line)
- \brief deletes line of given number. Map must be opened on level 2.
- \return 0 on success, -1 on error
- \param Map_info structure
- \param line number
+  \brief Deletes line of given number.
+
+  Vector map must be opened on topo level 2.
+
+  This function calls G_fatal_error() on error.
+
+  \param Map pointer to vector map
+  \param line line id
+
+  \return 0 on success
+  \return -1 on error
 */
 int
 Vect_delete_line (
-     struct Map_info *Map,
-     int line)
+    struct Map_info *Map,
+    int line)
 {
     int ret;
     
     G_debug (3, "Vect_delete_line(): name = %s, line = %d", Map->name, line);
     
     if ( Map->level < 2 ) {
-	G_fatal_error ( _("Cannot delete the line, map '%s' is not opened on level 2"), Map->name );
+	G_fatal_error ( _("Unable to delete line %d, "
+			  "vector map <%s> is not opened on topo level 2"), line, Map->name );
     }
     
     if ( Map->mode != GV_MODE_RW && Map->mode != GV_MODE_WRITE ) {
-	G_fatal_error ( _("Cannot delete the line, map '%s' is not in opened in 'write' mode"), Map->name );
+	G_fatal_error ( _("Unable to delete line %d, "
+			  "vector map <%s> is not in opened in 'write' mode"), line, Map->name );
     }
     
     dig_line_reset_updated ( &(Map->plus) );
@@ -210,8 +216,7 @@
     ret = (*Vect_delete_line_array[Map->format][Map->level]) (Map, line);
 
     if ( ret == -1 )
-	G_fatal_error ( _("Cannot delete line") );
+	G_fatal_error ( _("Unable to delete line %d from vector map <%s>"), line, Map->name );
 
     return ret;
 }
-



More information about the grass-commit mailing list