[GRASS-dev] Re: [GRASS-CVS] brad: grass6/lib/gis legal_name.c, 2.6, 2.7

Maciej Sieczka tutey at o2.pl
Thu Oct 19 14:00:39 EDT 2006


Brad,

Despite of this fix I can still create vectors with @ in names. eg:

$ v.random out=map at rubbish n=10

works.

What's wrong?

grass at intevation.de wrote:
> Author: brad
> 
> Update of /grassrepository/grass6/lib/gis
> In directory doto:/tmp/cvs-serv30860
> 
> Modified Files:
> 	legal_name.c 
> Log Message:
> - Added '@' to illegal file name characters.
> 
> 
> 
> Index: legal_name.c
> ===================================================================
> RCS file: /grassrepository/grass6/lib/gis/legal_name.c,v
> retrieving revision 2.6
> retrieving revision 2.7
> diff -u -d -r2.6 -r2.7
> --- legal_name.c	7 Sep 2006 12:04:13 -0000	2.6
> +++ legal_name.c	4 Oct 2006 19:58:03 -0000	2.7
> @@ -19,7 +19,7 @@
>   *
>   * Legal file names will <b>not</b> begin with '.' or NULL and must 
>   * not contain the characters, ' ' (space), '/', '"'. '\'' (single 
> - * quote), and all other non-alphanumeric characters within.
> + * quote), '@', and all other non-alphanumeric characters within.
>   *
>   * Returns 1 if <b>name</b> is ok, -1 otherwise.
>   *
> @@ -35,8 +35,8 @@
>      }
>  
>      for ( ; *s; s++)
> -	if (*s == '/' || *s == '"' || *s == '\'' || *s <= ' ' || *s > 0176) {
> -		fprintf(stderr, _("Illegal filename. character <%c> not allowed."), *s);
> +	if (*s == '/' || *s == '"' || *s == '\'' || *s <= ' ' || *s == '@' || *s > 0176) {
> +		fprintf(stderr, _("Illegal filename. character <%c> not allowed.\n"), *s);
>  	    return -1;
>  	}




More information about the grass-dev mailing list