[GRASS-dev] Re: testing native winGRASS
Paul Kelly
paul-grass at stjohnspoint.co.uk
Fri Mar 16 22:06:48 EDT 2007
Moritz's audit and Glynn's replacements both look really good; just a few
queries/suggestions below.
On Fri, 16 Mar 2007, Glynn Clements wrote:
>> general/g.setproj/get_stp.c:198&315: G_system(buff);
>> sprintf(buff,"%s \"%s\" 1>&2", pager, G_convert_dirseps_to_host(Tmp_file1));
>
> G_spawn(pager, pager, G_convert_dirseps_to_host(Tmp_file1), NULL);
> or:
> G_spawn_ex(pager, pager, G_convert_dirseps_to_host(Tmp_file1), SF_REDIRECT_DESCRIPTOR, 1, 2, NULL);
I don't think this will work on Windows - there GRASS_PAGER is "more"
which is a cmd.exe built-in rather than a separate command - therefore we
still need to call G_system() which will run the command using cmd.exe /c
on Windows (or /bin/sh -c on Unix).
>> lib/vask/V_clear.c:63: system("clear");
>
> Commented out.
Note that there is G_clear_screen() if needed.
>> raster/r.coin/inter.c:32: G_system("clear");
>>
>> raster/r.coin/inter.c:51: G_system("clear");
>
> G_spawn("clear", "clear", NULL);
G_system_clear() should be better as will also work on Windows.
Same comments go for other usages of GRASS_PAGER and clear!
Paul
More information about the grass-dev
mailing list