00001 /* 00002 **************************************************************************** 00003 * 00004 * MODULE: Vector library 00005 * 00006 * AUTHOR(S): Original author CERL, probably Dave Gerdes or Mike Higgins. 00007 * Update to GRASS 5.7 Radim Blazek and David D. Gray. 00008 * 00009 * PURPOSE: Higher level functions for reading/writing/manipulating vectors. 00010 * 00011 * COPYRIGHT: (C) 2001 by the GRASS Development Team 00012 * 00013 * This program is free software under the GNU General Public 00014 * License (>=v2). Read the file COPYING that comes with GRASS 00015 * for details. 00016 * 00017 *****************************************************************************/ 00018 #include <grass/Vect.h> 00019 00020 /* Rewind vector data file to cause reads to start at beginning. 00021 ** returns 0 on success 00022 ** -1 on error 00023 */ 00024 int V1_rewind_nat(struct Map_info *Map) 00025 { 00026 return (dig_fseek(&(Map->dig_fp), Map->head.head_size, SEEK_SET)); 00027 } 00028 00029 int V2_rewind_nat(struct Map_info *Map) 00030 { 00031 Map->next_line = 1; 00032 return V1_rewind_nat(Map); /* make sure level 1 reads are reset too */ 00033 }