legal_vname.c File Reference

#include <string.h>
#include <grass/gis.h>
#include <grass/Vect.h>
#include <grass/glocale.h>

Include dependency graph for legal_vname.c:

Go to the source code of this file.

Functions

int Vect_legal_filename (char *s)
 Check if output is legal vector name.
int Vect_check_input_output_name (char *input, char *output, int error)
 Check : 1) output is legal vector name 2) if can find input map 3) if input was found in current mapset, check if input != output.


Function Documentation

int Vect_check_input_output_name ( char *  input,
char *  output,
int  error 
)

Check : 1) output is legal vector name 2) if can find input map 3) if input was found in current mapset, check if input != output.

Returns:
0 OK

1 error

Parameters:
input input name
output output name
error error type GV_FATAL_EXIT, GV_FATAL_PRINT, GV_FATAL_RETURN

Definition at line 54 of file legal_vname.c.

References Vect_legal_filename().

int Vect_legal_filename ( char *  s  ) 

Check if output is legal vector name.

Returns:
1 OK

-1 if name does not start with letter A..Za..z or if name does not continue with A..Za..z0..9_@ Rule: [A-Za-z][A-Za-z0-9_@]*

Parameters:
name filename to be checked

Definition at line 16 of file legal_vname.c.

Referenced by Vect_check_input_output_name(), Vect_copy(), Vect_open_new(), and Vect_rename().


Generated on Sun Apr 6 17:32:49 2008 for GRASS by  doxygen 1.5.5