Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Right-click on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
From: <andrewross@us...> - 2008-07-23 02:28:44
|
Revision: 8559 http://plplot.svn.sourceforge.net/plplot/?rev=8559&view=rev Author: andrewross Date: 2008-07-23 02:28:54 +0000 (Wed, 23 Jul 2008) Log Message: ----------- Fix f77 bindings so plgriddata works correctly. Code to copy data back from C to fortran arrays was missing. Modified Paths: -------------- trunk/bindings/f77/scstubs.c Modified: trunk/bindings/f77/scstubs.c =================================================================== --- trunk/bindings/f77/scstubs.c 2008-07-22 17:15:26 UTC (rev 8558) +++ trunk/bindings/f77/scstubs.c 2008-07-23 02:28:54 UTC (rev 8559) @@ -322,11 +322,26 @@ void PLGRIDDATA(PLFLT *x, PLFLT *y, PLFLT *z, PLINT *npts, PLFLT *xg, PLINT *nptsx, PLFLT *yg, PLINT *nptsy, - PLFLT **zg, PLINT *type, PLFLT *data) + PLFLT *zg, PLINT *type, PLFLT *data, PLINT *lx) { + PLFLT **a; + int i,j; + + plAlloc2dGrid(&a, *nptsx, *nptsy); + c_plgriddata(x, y, z, *npts, xg, *nptsx, yg, *nptsy, - zg, *type, *data); + a, *type, *data); + + for (i = 0; i < *nptsx; i++) { + for (j = 0; j < *nptsy; j++) { + zg[i +j * *lx] = a[i][j]; + } + } + +/* Clean up memory allocated for a */ + plFree2dGrid(a, *nptsx, *nptsy); + } void This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |