legal_name.c File Reference

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

Include dependency graph for legal_name.c:

Go to the source code of this file.

Functions

int G_legal_filename (char *s)
 check for legal database file names
int G_check_input_output_name (char *input, char *output, int error)
 Check : 1) output is legal map name 2) if can find input map 3) if input was found in current mapset, check if input != output.


Function Documentation

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

Check : 1) output is legal map 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 GR_FATAL_EXIT, GR_FATAL_PRINT, GR_FATAL_RETURN

Definition at line 60 of file legal_name.c.

References G__name_is_fully_qualified(), G_fatal_error(), G_find_cell2(), G_legal_filename(), G_mapset(), G_warning(), and NULL.

int G_legal_filename ( char *  s  ) 

check for legal database file names

Legal file names will not begin with '.' or NULL and must not contain the characters, ' ' (space), '/', '"'. '\'' (single quote), '@', ',', '=', '*', and all other non-alphanumeric characters within.

Returns 1 if name is ok, -1 otherwise.

Parameters:
name 
Returns:
int

Definition at line 31 of file legal_name.c.

Referenced by G__open(), G_check_input_output_name(), G_open_raster_new(), G_open_raster_new_uncompressed(), and G_remove().


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