[GRASS5] winGRASS: mingw32 and execl (g.list)
Roger.Bivand at nhh.no
Thu Jan 19 11:06:37 EST 2006
On Thu, 19 Jan 2006, Markus Neteler wrote:
> On Thu, Jan 19, 2006 at 04:41:50PM +0100, Markus Neteler wrote:
> > Hi,
> > I was able to make further changes for winGRASS native (thanks to
> > instructions of Radim how to compile all the needed libs).
> > Now all modules except for display related libs/modules
> > are compilable.
> > Some quick tests in 'commmand.com' with r.mapcalc, r.slope.aspect,
> > v.voronoi were successful. I kept the data in a network directory
> > so that I was able to display the new maps via Linux. In future
> > QGIS 0.8 or other software will take care of the display
> > (or someone ports also the display stuff).
> > Now a question: While 'g.list' compiled, it just does not display
> > anything and exits. May execl() be the problem?
> > general/manage/cmd/list.c
> > Or do we have to implement some .../path/... vs ...\path\...
> > tricks there?
> an addition:
> If so, could we automatically change / to \ in G_system()
> to resolve such cases using G_str_replace():
> sprintf (command, "%s/etc/copy '%s' '", G_gisbase(), path);
> G__file_name (path, list[n].element[i], new, G_mapset());
> strcat (command, path);
> strcat (command, "'");
> system (command);
Since the other commands work, the handling of path and file names may not
be the problem. All recent Windows systems respect / as a path separator,
as far as I know - try dir "somedir/somedir" to see - if it isn't quoted,
some Windows programs and command.com shell commands try to interpret it
as an argument. It's much more likely to be execl(), I feel.
> grass5 mailing list
> grass5 at grass.itc.it
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no
More information about the grass-dev