[GRASSLIST:2408] Re: code example plotRasterMap from progmangrass50

Markus Neteler neteler at itc.it
Fri Jan 30 04:54:54 EST 2004


On Thu, Jan 29, 2004 at 05:37:37PM +0000, Glynn Clements wrote:
Content-Description: message body text
> 
> Daniel Isenegger wrote:
> 
> > I try to get started with Grass programming with the code example on 
> > p.264 from the progmangrass50.
> 
> I don't know how much has changed since the version which I'm looking
> at, but the code in my version needed quite a few changes just to
> compile.
> 
> > After getting help concerning the 
> > Gmakefile i got stuck now:
> > when executing the executable, it stops with (i guess it hangs)
> > B
> > 
> > (after some typing some returns)
> > 
> > =full_screen
> > full_screen : unknown error
> > Bfull_screen
> > ERROR: Current graphics frame not available
> > 
> > 
> > I tried to debug the error, but i get deeper and deeper into the source 
> > code:
> > framestack (with backtrace in gdb). somewhere in D_get_cur_wind it stops.
> > 
> > #0  D_get_cur_wind (name=0xbfffed70 "\200ý\034@") at window.c:153
> > #1  0x0804ac76 in D_setup (clear=1) at setup.c:32
> > #2  0x080498db in plot_raster_map (name=0x8062bf4 "elevation.dem",
> >     mapset=0x8062bea "PERMANENT", overlay=0) at plotRasterMap.c:12
> > #3  0x080498ae in main (argc=1, argv=0x1) at ctest.c:18
> > #4  0x400b58ae in __libc_start_main () from /lib/libc.so.6
> 
> AFAICT, this is because you haven't called R_open_driver().
> 
> One other problem with my version of the code is that the line:
> 
> 	if (D_cell_draw_setup(&top, &bottom, &left, &right))
> 
> should be:
> 
> 	if (D_cell_draw_setup(top, bottom, left, right))
> 
> I've attached a modified version which actually runs.

I have updated the section in progman-CVS with that code version and
updated the online PDF as well.

 Markus




More information about the grass-user mailing list