Details Ticket 973


Comment | Reply | Take | Open


Serial Number 973
Subject rgbcolors - d.save
Area bug
Queue grass
Requestors Morten.Sickel@newmedia.no
Owner none
Status resolved
Last User Contact Sun Mar 24 20:18:09 2002 (6 yr ago)
Current Priority 30
Final Priority 70
Due No date assigned
Last Action Sun Mar 24 20:18:15 2002 (6 yr ago)
Created Thu Mar 21 11:22:28 2002 (6 yr ago)

Transaction History Ticket 973


Thu, Mar 21 2002 11:22:28    Request created by guest  
Subject: rgbcolors - d.save

Platform: Linux/Intel
Linux distro: Homemade
linux cpu: AMD (K6, ...)
Xwindows version: Xfree 3.3.6
Xwindows manager: KDE 2.x
TclTk version: tcl/tk 8.3
grass downloaded at: Trento site
grass binary for platform: I compiled the sources myself
grass sources source: no, I got a source code package from the server
c compiler name: gcc

I am using rgb-colors in d.area, i.e:
GRASS:~ > d.area map=vaf fillcolor="rgb(100 147  237)" linecolor=none 
catnum=3101

Which works just fine.

But then I do a d.save;
GRASS:~ > d.save -o
d.area map=vaf fillcolor=rgb(100 147  237) linecolor=none catnum=3101  # 1

As you see, the "s are missing, if I try to reuse the line, I'll get:GRASS:~
> d.area map=vaf fillcolor=rgb(100 147  237) linecolor=none catnum=3101
 # 1
bash: syntax error near unexpected token `fillcolor=rgb(1'

It is of cource no really big deal to put in the "s, but i think d.save 
should have done it for me...

Morten
Thu, Mar 21 2002 21:17:25    Mail sent by glynn.clements@virgin.net  
Return-Path <glynn.clements@virgin.net>
Delivered-To grass-bugs@lists.intevation.de
From Glynn Clements <glynn.clements@virgin.net>
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Transfer-Encoding 7bit
Message-ID <15514.15444.214998.424844@cerise.nosuchdomain.co.uk>
Date Thu, 21 Mar 2002 20:02:28 +0000
To Request Tracker <grass-bugs@intevation.de>
Cc grass5@grass.itc.it
Subject Re: [GRASS5] [bug #973] (grass) rgbcolors - d.save
In-Reply-To <20020321102229.4F3C2139FE@lists.intevation.de>
References <20020321102229.4F3C2139FE@lists.intevation.de>
X-Mailer VM 6.94 under 21.4 (patch 4) "Artificial Intelligence (candidate #1)" XEmacs Lucid
X-Spam-Status No, hits=0 required=5 tests=
Request Tracker wrote:

> Subject: rgbcolors - d.save

> I am using rgb-colors in d.area, i.e:
> GRASS:~ > d.area map=vaf fillcolor="rgb(100 147  237)" linecolor=none 
> catnum=3101
> 
> Which works just fine.
> 
> But then I do a d.save;
> GRASS:~ > d.save -o
> d.area map=vaf fillcolor=rgb(100 147  237) linecolor=none catnum=3101  # 1
> 
> As you see, the "s are missing, if I try to reuse the line, I'll get:GRASS:~
> > d.area map=vaf fillcolor=rgb(100 147  237) linecolor=none catnum=3101
>  # 1
> bash: syntax error near unexpected token `fillcolor=rgb(1'
> 
> It is of cource no really big deal to put in the "s, but i think d.save 
> should have done it for me...

Ultimately it's G_recreate_command() which needs to be fixed[1]. You
can get it 99% right by just putting single quotes around each
argument; to get it completely right, you also have to replace any
single quotes with "'\''" (quote-backslash-quote-quote).

[1] I'll look at it at some point.

Also, this is a warning sign regarding the syntax. Even though the
issue is specifically addressed in the "NOTES" section of the d.area
manpage, I wouldn't be surprised if we get "bug" reports due to users
failing to quote the argument (there's already been one case of a user
attempting to use spaces in a multi-valued argument).

-- 
Glynn Clements <glynn.clements@virgin.net>


Fri, Mar 22 2002 02:57:52    Mail sent by egm2@jps.net  
Return-Path <egm2@jps.net>
Delivered-To grass-bugs@lists.intevation.de
Date Thu, 21 Mar 2002 17:58:26 -0800
From "Eric G. Miller" <egm2@jps.net>
To Request Tracker <grass-bugs@intevation.de>, grass5@grass.itc.it
Subject Re: [GRASS5] [bug #973] (grass) rgbcolors - d.save
Message-ID <20020322015825.GD23549@calico.local>
Mail-Followup-To Request Tracker <grass-bugs@intevation.de>, grass5@grass.itc.it
References <20020321102229.4F3C2139FE@lists.intevation.de> <15514.15444.214998.424844@cerise.nosuchdomain.co.uk>
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
In-Reply-To <15514.15444.214998.424844@cerise.nosuchdomain.co.uk>
User-Agent Mutt/1.3.27i
Sender "Eric G. Miller" <egm2@jps.net>
X-Spam-Status No, hits=3 required=5 tests=FROM_ENDS_IN_NUMS,RCVD_IN_OSIRUSOFT_COM
On Thu, Mar 21, 2002 at 08:02:28PM +0000, Glynn Clements wrote:

> Ultimately it's G_recreate_command() which needs to be fixed[1]. You
> can get it 99% right by just putting single quotes around each
> argument; to get it completely right, you also have to replace any
> single quotes with "'\''" (quote-backslash-quote-quote).
> 
> [1] I'll look at it at some point.
> 
> Also, this is a warning sign regarding the syntax. Even though the
> issue is specifically addressed in the "NOTES" section of the d.area
> manpage, I wouldn't be surprised if we get "bug" reports due to users
> failing to quote the argument (there's already been one case of a user
> attempting to use spaces in a multi-valued argument).

Don't know if this problem would affect too many other modules, and
d.vect.area doesn't use rgb(num num num), recognizing the problem
with spaces.

-- 
Eric G. Miller <egm2@jps.net>


Sun, Mar 24 2002 20:18:09    Mail sent by gclements  
G_recreate_command() should now be fixed in CVS. However, d.area is now
disabled by default (superseded by d.vect.area) so, for this particular case,
it's probably moot. 
Sun, Mar 24 2002 20:18:15    Status changed to resolved by gclements  
Comment | Reply | Take | Open

You are currently authenticated as guest.
[Show Configuration] [Login as another user]

Users Guide - Mail Commands - Homepage of RequestTracker 1.0.7 - list any request