[grass4u@gmail.com: Re: [GRASS5] g.list -f]

Huidae Cho grass4u at gmail.com
Sat Feb 12 10:49:14 EST 2005


----- Forwarded message from Huidae Cho <grass4u at gmail.com> -----

Date: Sat, 12 Feb 2005 09:47:52 -0600
From: Huidae Cho <grass4u at gmail.com>
To: Markus Neteler <neteler at itc.it>
Subject: Re: [GRASS5] g.list -f
Message-ID: <20050212154752.GA9813 at localhost.managednetworks.null>
References: <20050210211629.GA8120 at localhost.tamu.edu> <20050212152407.GC23085 at thuille.itc.it>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20050212152407.GC23085 at thuille.itc.it>
User-Agent: Mutt/1.4.2.1i
Status: RO
Content-Length: 1121
Lines: 38

Does it work? The code is like this:

        if (full->answer)
        {
                char lister[300];
                sprintf (lister, "%s/etc/lister/%s", G_gisbase(),
list[n].element[0]);
                if (access (lister, 1) == 0) /* execute permission? */
                        execl (lister, argv[0], MAPSET, 0);
        }
        do_list (n,MAPSET);

If there is no lister/cell, -f should do nothing. And these lines are
reached when -f is given.

Thank you.
Huidae Cho

On Sat, Feb 12, 2005 at 04:24:07PM +0100, Markus Neteler wrote:
> On Thu, Feb 10, 2005 at 03:16:29PM -0600, Huidae Cho wrote:
> > Hi,
> > 
> > 'g.list -f type=rast' doesn't work since G_gisbase()/etc/lister/cell
> > does not exist. Is it still a valid flag (-f)?
> 
> For me (6-CVS, Mdk10) it works.
> 
> But, in fact, 
> ls -l $GISBASE/etc/lister/cell
> is not there. I also wondered about this legacy code:
> 
> GRASS 6.0.cvs:~/grass60/general/manage/cmd > grep etc/lister/ *
> list.c:         sprintf (lister, "%s/etc/lister/%s", G_gisbase(), list[n].element[0]);
> 
> but didn't look if these lines are ever reached.
> 
> Markus
> 

----- End forwarded message -----




More information about the grass-dev mailing list