From: Bernard W. <Ber...@wa...> - 2002-03-04 20:26:22
|
Hi, For my personal use I needed to have an Ada binding to the Plplot 5.0.3 plotting library. So I developped such a binding with a reduced set of interface functions. As a small contribution to the overall product I send this binding with 2 simple testing programs that perhaps you will find interesting for somebody else. Feel free to use them as you wish. While porting the Plplot core source on another UNIX computer, I found a small bug in the stripchart management, in the c_plstripa() function, which produces a SIGSEGV error. The context of the error is at line 252 of file plstripc.c: plcol(stripc->colline[p]); pllsty(stripc->styline[p]); plP_movwor(stripc->x[p][stripc->npts[p]-2], stripc->y[p][stripc->npts[p]-2]); <----------- here plP_drawor(stripc->x[p][stripc->npts[p]-1], stripc->y[p][stripc->npts[p]-1]); plflush(); For the first call to the c_plstripa function, stripc->npts[p]-2 value is -1 and generates an out of bound access in table stripc->x[p]. I personally replaced the line: plP_movwor(stripc->x[p][stripc->npts[p]-2], stripc->y[p][stripc->npts[p]-2]); by: if ((stripc->npts[p]-2) < 0) plP_movwor(0.0, 0.0) ; else plP_movwor(stripc->x[p][stripc->npts[p]-2], stripc->y[p][stripc-npts[p]-2]); I hope this will help. |