From: <ai...@us...> - 2009-10-22 00:44:57
|
Revision: 10545 http://plplot.svn.sourceforge.net/plplot/?rev=10545&view=rev Author: airwin Date: 2009-10-22 00:44:49 +0000 (Thu, 22 Oct 2009) Log Message: ----------- Style C source in bindings. Modified Paths: -------------- trunk/bindings/f77/plstubs.h trunk/bindings/f77/sc3d.c trunk/bindings/f77/sccont.c trunk/bindings/f77/scstubs.c trunk/bindings/f95/plstubs.h trunk/bindings/f95/sc3d.c trunk/bindings/f95/sccont.c trunk/bindings/f95/scstubs.c trunk/bindings/gnome2/lib/gcw-lib.c trunk/bindings/gnome2/lib/plplotcanvas.c trunk/bindings/gnome2/python/cplplotcanvasmodule.c trunk/bindings/gnome2/python/gcwmodule.c trunk/bindings/ocaml/plcairo/plcairo_impl.c trunk/bindings/ocaml/plplot_impl.c trunk/bindings/octave/massage.c trunk/bindings/octave/plplot_octave.h.in trunk/bindings/octave/plplot_octave_rej.h trunk/bindings/python/plplot_widgetmodule.c trunk/bindings/tcl/matrixInit.c trunk/bindings/tcl/pltcl.h trunk/bindings/tcl/tclAPI.c trunk/bindings/tcl/tclMain.c trunk/bindings/tcl/tclMatrix.c trunk/bindings/tcl/tclMatrix.h trunk/bindings/tk/Pltk_Init.c trunk/bindings/tk/plframe.c trunk/bindings/tk/plr.c trunk/bindings/tk/plserver.c trunk/bindings/tk/plserver.h trunk/bindings/tk/pltk.h trunk/bindings/tk/pltkd.h trunk/bindings/tk/stupidtk.c trunk/bindings/tk/tcpip.c trunk/bindings/tk/tcpip.h trunk/bindings/tk/tkMain.c trunk/bindings/tk/tkshell.c trunk/bindings/tk-x-plat/Plplotter_Init.c trunk/bindings/tk-x-plat/plplotter.c trunk/bindings/tk-x-plat/pltkwd.h trunk/scripts/style_source.sh Modified: trunk/bindings/f77/plstubs.h =================================================================== --- trunk/bindings/f77/plstubs.h 2009-10-21 22:52:04 UTC (rev 10544) +++ trunk/bindings/f77/plstubs.h 2009-10-22 00:44:49 UTC (rev 10545) @@ -1,14 +1,14 @@ /* $Id$ + * + * Maurice LeBrun + * IFS, University of Texas + * + * Header file for plplot Fortran interface stubs. + * THIS FILE IS NOT FOR INCLUSION BY USER CODES!! + * + * The contents of this file are in the public domain. + */ - Maurice LeBrun - IFS, University of Texas - - Header file for plplot Fortran interface stubs. - THIS FILE IS NOT FOR INCLUSION BY USER CODES!! - - The contents of this file are in the public domain. -*/ - #ifndef __PLSTUBS_H__ #define __PLSTUBS_H__ @@ -27,8 +27,8 @@ * * Current choices for STUB_LINKAGE: * - * STUB_LAU lower-case, append underscore - * STUB_L lower-case + * STUB_LAU lower-case, append underscore + * STUB_L lower-case * STUB_U upper-case * STUB_FORTRAN use "fortran" keyword (MS-DOS convention) * @@ -46,102 +46,102 @@ * to the real ones. This is a horrible kludge, but the alternatives are * worse. Fortunately it has no effect on the user program, and you can * forget that you ever read about it here. -\*----------------------------------------------------------------------*/ + \*----------------------------------------------------------------------*/ -#define STUB_LAU 1 -#define STUB_L 2 -#define STUB_U 3 -#define STUB_FORTRAN 4 -#define STUB_STDCALL 5 -#define STUB_MINGW 6 +#define STUB_LAU 1 +#define STUB_L 2 +#define STUB_U 3 +#define STUB_FORTRAN 4 +#define STUB_STDCALL 5 +#define STUB_MINGW 6 #ifndef STUB_LINKAGE -#if defined(SX) /* NEC Super-UX (SX-3) */ -#define STUB_LINKAGE STUB_LAU +#if defined ( SX ) /* NEC Super-UX (SX-3) */ +#define STUB_LINKAGE STUB_LAU #endif -#if defined(_IBMR2) && defined(_AIX) /* AIX */ -#define STUB_LINKAGE STUB_L +#if defined ( _IBMR2 ) && defined ( _AIX ) /* AIX */ +#define STUB_LINKAGE STUB_L #endif -#ifdef __hpux /* HP/UX */ -#define STUB_LINKAGE STUB_L +#ifdef __hpux /* HP/UX */ +#define STUB_LINKAGE STUB_L #endif -#ifdef __mips /* IRIX (SGI systems) */ -#define STUB_LINKAGE STUB_LAU +#ifdef __mips /* IRIX (SGI systems) */ +#define STUB_LINKAGE STUB_LAU #endif -#ifdef sun /* Suns */ -#define STUB_LINKAGE STUB_LAU +#ifdef sun /* Suns */ +#define STUB_LINKAGE STUB_LAU #endif -#ifdef CRAY /* Cray/UNICOS */ -#define STUB_LINKAGE STUB_U +#ifdef CRAY /* Cray/UNICOS */ +#define STUB_LINKAGE STUB_U #endif -#if defined(__alpha) && defined(__osf__) /* DEC Alpha AXP/OSF */ -#define STUB_LINKAGE STUB_LAU +#if defined ( __alpha ) && defined ( __osf__ ) /* DEC Alpha AXP/OSF */ +#define STUB_LINKAGE STUB_LAU #endif -#ifdef __GO32__ /* dos386/djgpp */ +#ifdef __GO32__ /* dos386/djgpp */ #ifdef MSDOS #undef MSDOS #endif #endif -#ifdef WIN32 /* Windows 32-bit */ -#ifdef IVF /* Intel Visual Fortran */ -#define STUB_LINKAGE STUB_U -#elif defined(CVF) /* MSVC/CVF */ -#define STUB_LINKAGE STUB_U -#elif defined(MSDOS) /* MS-DOS based */ -#define STUB_LINKAGE STUB_FORTRAN -#elif defined(_MSC_VER) -#define STUB_LINKAGE STUB_STDCALL -#elif defined(__GNUC__) /* GNU C with MinGW/Cygwin */ -#define STUB_LINKAGE STUB_MINGW +#ifdef WIN32 /* Windows 32-bit */ +#ifdef IVF /* Intel Visual Fortran */ +#define STUB_LINKAGE STUB_U +#elif defined ( CVF ) /* MSVC/CVF */ +#define STUB_LINKAGE STUB_U +#elif defined ( MSDOS ) /* MS-DOS based */ +#define STUB_LINKAGE STUB_FORTRAN +#elif defined ( _MSC_VER ) +#define STUB_LINKAGE STUB_STDCALL +#elif defined ( __GNUC__ ) /* GNU C with MinGW/Cygwin */ +#define STUB_LINKAGE STUB_MINGW #endif -#elif defined(MSDOS) /* MS-DOS based */ -#define STUB_LINKAGE STUB_FORTRAN +#elif defined ( MSDOS ) /* MS-DOS based */ +#define STUB_LINKAGE STUB_FORTRAN #endif /* Windows 32-bit */ -#ifndef STUB_LINKAGE /* The default */ -#define STUB_LINKAGE STUB_LAU +#ifndef STUB_LINKAGE /* The default */ +#define STUB_LINKAGE STUB_LAU #endif -#endif /* ifndef STUB_LINKAGE */ +#endif /* ifndef STUB_LINKAGE */ /*----------------------------------------------------------------------*\ * Define name-translation macro. * To use, define with x the upper case routine name, y the lower case. * Should be adoptable to virtually any system. -\*----------------------------------------------------------------------*/ + \*----------------------------------------------------------------------*/ -#if STUB_LINKAGE==STUB_LAU -#define FNAME(x,y) PLDLLIMPEXP_F77C y##_ -#define FNAME_(x,y) y##_ +#if STUB_LINKAGE == STUB_LAU +#define FNAME( x, y ) PLDLLIMPEXP_F77C y ## _ +#define FNAME_( x, y ) y ## _ #elif STUB_LINKAGE == STUB_L -#define FNAME(x,y) y -#define FNAME_(x,y) y +#define FNAME( x, y ) y +#define FNAME_( x, y ) y #elif STUB_LINKAGE == STUB_U -#define FNAME(x,y) PLDLLIMPEXP_F77C __stdcall x -#define FNAME_(x,y) x +#define FNAME( x, y ) PLDLLIMPEXP_F77C __stdcall x +#define FNAME_( x, y ) x #elif STUB_LINKAGE == STUB_FORTRAN -#define FNAME(x,y) fortran x -#define FNAME_(x,y) x +#define FNAME( x, y ) fortran x +#define FNAME_( x, y ) x #elif STUB_LINKAGE == STUB_STDCALL -#define FNAME(x,y) PLDLLIMPEXP_F77C __stdcall x -#define FNAME_(x,y) x +#define FNAME( x, y ) PLDLLIMPEXP_F77C __stdcall x +#define FNAME_( x, y ) x #elif STUB_LINKAGE == STUB_MINGW -#define FNAME(x,y) PLDLLIMPEXP_F77C y##_ -#define FNAME_(x,y) y +#define FNAME( x, y ) PLDLLIMPEXP_F77C y ## _ +#define FNAME_( x, y ) y #else #error "Illegal setting for STUB_LINKAGE" @@ -150,7 +150,7 @@ /*----------------------------------------------------------------------*\ * Now to actually define the stub names. * Each stub must have an entry here. -\*----------------------------------------------------------------------*/ + \*----------------------------------------------------------------------*/ /* N.B. By default the g77 compiler appends second underscore to name if * the original name contains any underscore at all. According to info @@ -161,187 +161,187 @@ * the extra trailing underscore. */ -#define PL_SETCONTLABELFORMAT FNAME(PL_SETCONTLABELFORMAT,pl_setcontlabelformat) -#define PL_SETCONTLABELFORMATa FNAME(PL_SETCONTLABELFORMAT_,pl_setcontlabelformat_) -#define PL_SETCONTLABELPARAM FNAME(PL_SETCONTLABELPARAM,pl_setcontlabelparam) -#define PL_SETCONTLABELPARAMa FNAME(PL_SETCONTLABELPARAM_,pl_setcontlabelparam_) -#define PLABORT7 FNAME(PLABORT7,plabort7) -#define PLADV FNAME(PLADV,pladv) -#define PLARC FNAME(PLARC,plarc) -#define PLAXES7 FNAME(PLAXES7,plaxes7) -#define PLBIN FNAME(PLBIN,plbin) -#define PLBOP FNAME(PLBOP,plbop) -#define PLBOX37 FNAME(PLBOX37,plbox37) -#define PLBOX7 FNAME(PLBOX7,plbox7) -#define PLBTIME FNAME(PLBTIME,plbtime) -#define PLCALC_WORLD FNAME(PLCALC_WORLD,plcalc_world) -#define PLCALC_WORLDa FNAME(PLCALC_WORLD_,plcalc_world_) -#define PLCLEAR FNAME(PLCLEAR,plclear) -#define PLCLR FNAME(PLCLR,plclr) -#define PLCOL FNAME(PLCOL,plcol) -#define PLCOL0 FNAME(PLCOL0,plcol0) -#define PLCOL1 FNAME(PLCOL1,plcol1) -#define PLCONFIGTIME FNAME(PLCONFIGTIME,plconfigtime) -#define PLCON07 FNAME(PLCON07,plcon07) -#define PLCON17 FNAME(PLCON17,plcon17) -#define PLCON27 FNAME(PLCON27,plcon27) -#define PLCONT7 FNAME(PLCONT7,plcont7) -#define PLCPSTRM FNAME(PLCPSTRM,plcpstrm) -#define PLCTIME FNAME(PLCTIME,plctime) -#define PLEND FNAME(PLEND,plend) -#define PLEND1 FNAME(PLEND1,plend1) -#define PLENV FNAME(PLENV,plenv) -#define PLENV0 FNAME(PLENV0,plenv0) -#define PLEOP FNAME(PLEOP,pleop) -#define PLERRX FNAME(PLERRX,plerrx) -#define PLERRY FNAME(PLERRY,plerry) -#define PLFAMADV FNAME(PLFAMADV,plfamadv) -#define PLFILL FNAME(PLFILL,plfill) -#define PLFILL3 FNAME(PLFILL3,plfill3) -#define PLFLUSH FNAME(PLFLUSH,plflush) -#define PLFONT FNAME(PLFONT,plfont) -#define PLFONTLD FNAME(PLFONTLD,plfontld) -#define PLGCHR FNAME(PLGCHR,plgchr) -#define PLGCOL0 FNAME(PLGCOL0,plgcol0) -#define PLGCOL0A FNAME(PLGCOL0A,plgcol0a) -#define PLGCOLBG FNAME(PLGCOLBG,plgcolbg) -#define PLGCOLBGA FNAME(PLGCOLBGA,plgcolbga) -#define PLGCOMPRESSION FNAME(PLGCOMPRESSION,plgcompression) -#define PLGDEV7 FNAME(PLGDEV7,plgdev7) -#define PLGDIDEV FNAME(PLGDIDEV,plgdidev) -#define PLGDIORI FNAME(PLGDIORI,plgdiori) -#define PLGDIPLT FNAME(PLGDIPLT,plgdiplt) -#define PLGFAM FNAME(PLGFAM,plgfam) -#define PLGFCI FNAME(PLGFCI,plgfci) -#define PLGFNAM7 FNAME(PLGFNAM7,plgfnam7) -#define PLGFONT FNAME(PLGFONT,plgfont) -#define PLGLEVEL FNAME(PLGLEVEL,plglevel) -#define PLGPAGE FNAME(PLGPAGE,plgpage) -#define PLGRA FNAME(PLGRA,plgra) -#define PLGRIDDATA FNAME(PLGRIDDATA,plgriddata) -#define PLGSPA FNAME(PLGSPA,plgspa) -#define PLGSTRM FNAME(PLGSTRM,plgstrm) -#define PLGVER7 FNAME(PLGVER7,plgver7) -#define PLGVPD FNAME(PLGVPD,plgvpd) -#define PLGVPW FNAME(PLGVPW,plgvpw) -#define PLGXAX FNAME(PLGXAX,plgxax) -#define PLGYAX FNAME(PLGYAX,plgyax) -#define PLGZAX FNAME(PLGZAX,plgzax) -#define PLHIST FNAME(PLHIST,plhist) -#define PLHLS FNAME(PLHLS,plhls) -#define PLHLSRGB FNAME(PLHLSRGB,plhlsrgb) -#define PLIMAGE FNAME(PLIMAGE,plimage) -#define PLIMAGEFR07 FNAME(PLIMAGEFR07,plimagefr07) -#define PLIMAGEFR17 FNAME(PLIMAGEFR17,plimagefr17) -#define PLIMAGEFR27 FNAME(PLIMAGEFR27,plimagefr27) -#define PLIMAGEFR7 FNAME(PLIMAGEFR7,plimagefr7) -#define PLINIT FNAME(PLINIT,plinit) -#define PLJOIN FNAME(PLJOIN,pljoin) -#define PLLAB7 FNAME(PLLAB7,pllab7) -#define PLLIGHTSOURCE FNAME(PLLIGHTSOURCE,pllightsource) -#define PLLINE FNAME(PLLINE,plline) -#define PLLINE3 FNAME(PLLINE3,plline3) -#define PLLSTY FNAME(PLLSTY,pllsty) -#define PLMAP7 FNAME(PLMAP7,plmap7) -#define PLMERIDIANS7 FNAME(PLMERIDIANS7,plmeridians7) -#define PLMESH FNAME(PLMESH,plmesh) -#define PLMESHC FNAME(PLMESHC,plmeshc) -#define PLMKSTRM FNAME(PLMKSTRM,plmkstrm) -#define PLMTEX7 FNAME(PLMTEX7,plmtex7) -#define PLMTEX37 FNAME(PLMTEX37,plmtex37) -#define PLOT3D FNAME(PLOT3D,plot3d) -#define PLOT3DC_ FNAME_(PLOT3DC,plot3dc) -#define PLOT3DC FNAME(PLOT3DC,plot3dc) -#define PLOT3DCL FNAME(PLOT3DCL,plot3dcl) -#define PLPARSEOPTS7 FNAME(PLPARSEOPTS7,plparseopts7) -#define PLPAT FNAME(PLPAT,plpat) -#define PLPOIN FNAME(PLPOIN,plpoin) -#define PLPOIN3 FNAME(PLPOIN3,plpoin3) -#define PLPOLY3 FNAME(PLPOLY3,plpoly3) -#define PLPREC FNAME(PLPREC,plprec) -#define PLPSTY FNAME(PLPSTY,plpsty) -#define PLPTEX7 FNAME(PLPTEX7,plptex7) -#define PLPTEX37 FNAME(PLPTEX37,plptex37) -#define PLRANDD FNAME(PLRANDD,plrandd) -#define PLREPLOT FNAME(PLREPLOT,plreplot) -#define PLRGB FNAME(PLRGB,plrgb) -#define PLRGB1 FNAME(PLRGB1,plrgb1) -#define PLRGBHLS FNAME(PLRGBHLS,plrgbhls) -#define PLSCHR FNAME(PLSCHR,plschr) -#define PLSCMAP0 FNAME(PLSCMAP0,plscmap0) -#define PLSCMAP0A FNAME(PLSCMAP0A,plscmap0a) -#define PLSCMAP0N FNAME(PLSCMAP0N,plscmap0n) -#define PLSCMAP1 FNAME(PLSCMAP1,plscmap1) -#define PLSCMAP1A FNAME(PLSCMAP1A,plscmap1a) -#define PLSCMAP1L FNAME(PLSCMAP1L,plscmap1l) -#define PLSCMAP1LA FNAME(PLSCMAP1LA,plscmap1la) -#define PLSCMAP1N FNAME(PLSCMAP1N,plscmap1n) -#define PLSCOL0 FNAME(PLSCOL0,plscol0) -#define PLSCOL0A FNAME(PLSCOL0A,plscol0a) -#define PLSCOLBG FNAME(PLSCOLBG,plscolbg) -#define PLSCOLBGA FNAME(PLSCOLBGA,plscolbga) -#define PLSCOLOR FNAME(PLSCOLOR,plscolor) -#define PLSCOMPRESSION FNAME(PLSCOMPRESSION,plscompression) -#define PLSDEV7 FNAME(PLSDEV7,plsdev7) -#define PLSDIDEV FNAME(PLSDIDEV,plsdidev) -#define PLSDIMAP FNAME(PLSDIMAP,plsdimap) -#define PLSDIORI FNAME(PLSDIORI,plsdiori) -#define PLSDIPLT FNAME(PLSDIPLT,plsdiplt) -#define PLSDIPLZ FNAME(PLSDIPLZ,plsdiplz) -#define PLSEED FNAME(PLSEED,plseed) -#define PLSESC FNAME(PLSESC,plsesc) -#define PLSETOPT7 FNAME(PLSETOPT7,plsetopt7) -#define PLSFAM FNAME(PLSFAM,plsfam) -#define PLSFCI FNAME(PLSFCI,plsfci) -#define PLSFNAM7 FNAME(PLSFNAM7,plsfnam7) -#define PLSFONT FNAME(PLSFONT,plsfont) -#define PLSHADE07 FNAME(PLSHADE07,plshade07) -#define PLSHADE17 FNAME(PLSHADE17,plshade17) -#define PLSHADE27 FNAME(PLSHADE27,plshade27) -#define PLSHADE7 FNAME(PLSHADE7,plshade7) -#define PLSHADES07 FNAME(PLSHADES07,plshades07) -#define PLSHADES17 FNAME(PLSHADES17,plshades17) -#define PLSHADES27 FNAME(PLSHADES27,plshades27) -#define PLSHADES7 FNAME(PLSHADES7,plshades7) -#define PLSLABELFUNC FNAME(PLSLABELFUNC,plslabelfunc) -#define PLSMAJ FNAME(PLSMAJ,plsmaj) -#define PLSMEM FNAME(PLSMEM,plsmem) -#define PLSMIN FNAME(PLSMIN,plsmin) -#define PLSORI FNAME(PLSORI,plsori) -#define PLSPAGE FNAME(PLSPAGE,plspage) -#define PLSPAL07 FNAME(PLSPAL07,plspal07) -#define PLSPAL17 FNAME(PLSPAL17,plspal17) -#define PLSPAUSE FNAME(PLSPAUSE,plspause) -#define PLSSTRM FNAME(PLSSTRM,plsstrm) -#define PLSSUB FNAME(PLSSUB,plssub) -#define PLSURF3D FNAME(PLSURF3D,plsurf3d) -#define PLSSYM FNAME(PLSSYM,plssym) -#define PLSTAR FNAME(PLSTAR,plstar) -#define PLSTART7 FNAME(PLSTART7,plstart7) -#define PLSTRIPA FNAME(PLSTRIPA,plstripa) -#define PLSTRIPC7 FNAME(PLSTRIPC7,plstripc7) -#define PLSTRIPD FNAME(PLSTRIPD,plstripd) -#define PLSTYL FNAME(PLSTYL,plstyl) -#define PLSURF3D FNAME(PLSURF3D,plsurf3d) -#define PLSVECT FNAME(PLSVECT,plsvect) -#define PLSVPA FNAME(PLSVPA,plsvpa) -#define PLSXAX FNAME(PLSXAX,plsxax) -#define PLSYAX FNAME(PLSYAX,plsyax) -#define PLSYM FNAME(PLSYM,plsym) -#define PLSZAX FNAME(PLSZAX,plszax) -#define PLTEXT FNAME(PLTEXT,pltext) -#define PLTIMEFMT7 FNAME(PLTIMEFMT7,pltimefmt7) -#define PLVASP FNAME(PLVASP,plvasp) -#define PLVEC07 FNAME(PLVEC07,plvec07) -#define PLVEC17 FNAME(PLVEC17,plvec17) -#define PLVEC27 FNAME(PLVEC27,plvec27) -#define PLVECT7 FNAME(PLVECT7,plvect7) -#define PLVPAS FNAME(PLVPAS,plvpas) -#define PLVPOR FNAME(PLVPOR,plvpor) -#define PLVSTA FNAME(PLVSTA,plvsta) -#define PLW3D FNAME(PLW3D,plw3d) -#define PLWID FNAME(PLWID,plwid) -#define PLWIND FNAME(PLWIND,plwind) -#define PLXORMOD FNAME(PLXORMOD,plxormod) +#define PL_SETCONTLABELFORMAT FNAME( PL_SETCONTLABELFORMAT, pl_setcontlabelformat ) +#define PL_SETCONTLABELFORMATa FNAME( PL_SETCONTLABELFORMAT_, pl_setcontlabelformat_ ) +#define PL_SETCONTLABELPARAM FNAME( PL_SETCONTLABELPARAM, pl_setcontlabelparam ) +#define PL_SETCONTLABELPARAMa FNAME( PL_SETCONTLABELPARAM_, pl_setcontlabelparam_ ) +#define PLABORT7 FNAME( PLABORT7, plabort7 ) +#define PLADV FNAME( PLADV, pladv ) +#define PLARC FNAME( PLARC, plarc ) +#define PLAXES7 FNAME( PLAXES7, plaxes7 ) +#define PLBIN FNAME( PLBIN, plbin ) +#define PLBOP FNAME( PLBOP, plbop ) +#define PLBOX37 FNAME( PLBOX37, plbox37 ) +#define PLBOX7 FNAME( PLBOX7, plbox7 ) +#define PLBTIME FNAME( PLBTIME, plbtime ) +#define PLCALC_WORLD FNAME( PLCALC_WORLD, plcalc_world ) +#define PLCALC_WORLDa FNAME( PLCALC_WORLD_, plcalc_world_ ) +#define PLCLEAR FNAME( PLCLEAR, plclear ) +#define PLCLR FNAME( PLCLR, plclr ) +#define PLCOL FNAME( PLCOL, plcol ) +#define PLCOL0 FNAME( PLCOL0, plcol0 ) +#define PLCOL1 FNAME( PLCOL1, plcol1 ) +#define PLCONFIGTIME FNAME( PLCONFIGTIME, plconfigtime ) +#define PLCON07 FNAME( PLCON07, plcon07 ) +#define PLCON17 FNAME( PLCON17, plcon17 ) +#define PLCON27 FNAME( PLCON27, plcon27 ) +#define PLCONT7 FNAME( PLCONT7, plcont7 ) +#define PLCPSTRM FNAME( PLCPSTRM, plcpstrm ) +#define PLCTIME FNAME( PLCTIME, plctime ) +#define PLEND FNAME( PLEND, plend ) +#define PLEND1 FNAME( PLEND1, plend1 ) +#define PLENV FNAME( PLENV, plenv ) +#define PLENV0 FNAME( PLENV0, plenv0 ) +#define PLEOP FNAME( PLEOP, pleop ) +#define PLERRX FNAME( PLERRX, plerrx ) +#define PLERRY FNAME( PLERRY, plerry ) +#define PLFAMADV FNAME( PLFAMADV, plfamadv ) +#define PLFILL FNAME( PLFILL, plfill ) +#define PLFILL3 FNAME( PLFILL3, plfill3 ) +#define PLFLUSH FNAME( PLFLUSH, plflush ) +#define PLFONT FNAME( PLFONT, plfont ) +#define PLFONTLD FNAME( PLFONTLD, plfontld ) +#define PLGCHR FNAME( PLGCHR, plgchr ) +#define PLGCOL0 FNAME( PLGCOL0, plgcol0 ) +#define PLGCOL0A FNAME( PLGCOL0A, plgcol0a ) +#define PLGCOLBG FNAME( PLGCOLBG, plgcolbg ) +#define PLGCOLBGA FNAME( PLGCOLBGA, plgcolbga ) +#define PLGCOMPRESSION FNAME( PLGCOMPRESSION, plgcompression ) +#define PLGDEV7 FNAME( PLGDEV7, plgdev7 ) +#define PLGDIDEV FNAME( PLGDIDEV, plgdidev ) +#define PLGDIORI FNAME( PLGDIORI, plgdiori ) +#define PLGDIPLT FNAME( PLGDIPLT, plgdiplt ) +#define PLGFAM FNAME( PLGFAM, plgfam ) +#define PLGFCI FNAME( PLGFCI, plgfci ) +#define PLGFNAM7 FNAME( PLGFNAM7, plgfnam7 ) +#define PLGFONT FNAME( PLGFONT, plgfont ) +#define PLGLEVEL FNAME( PLGLEVEL, plglevel ) +#define PLGPAGE FNAME( PLGPAGE, plgpage ) +#define PLGRA FNAME( PLGRA, plgra ) +#define PLGRIDDATA FNAME( PLGRIDDATA, plgriddata ) +#define PLGSPA FNAME( PLGSPA, plgspa ) +#define PLGSTRM FNAME( PLGSTRM, plgstrm ) +#define PLGVER7 FNAME( PLGVER7, plgver7 ) +#define PLGVPD FNAME( PLGVPD, plgvpd ) +#define PLGVPW FNAME( PLGVPW, plgvpw ) +#define PLGXAX FNAME( PLGXAX, plgxax ) +#define PLGYAX FNAME( PLGYAX, plgyax ) +#define PLGZAX FNAME( PLGZAX, plgzax ) +#define PLHIST FNAME( PLHIST, plhist ) +#define PLHLS FNAME( PLHLS, plhls ) +#define PLHLSRGB FNAME( PLHLSRGB, plhlsrgb ) +#define PLIMAGE FNAME( PLIMAGE, plimage ) +#define PLIMAGEFR07 FNAME( PLIMAGEFR07, plimagefr07 ) +#define PLIMAGEFR17 FNAME( PLIMAGEFR17, plimagefr17 ) +#define PLIMAGEFR27 FNAME( PLIMAGEFR27, plimagefr27 ) +#define PLIMAGEFR7 FNAME( PLIMAGEFR7, plimagefr7 ) +#define PLINIT FNAME( PLINIT, plinit ) +#define PLJOIN FNAME( PLJOIN, pljoin ) +#define PLLAB7 FNAME( PLLAB7, pllab7 ) +#define PLLIGHTSOURCE FNAME( PLLIGHTSOURCE, pllightsource ) +#define PLLINE FNAME( PLLINE, plline ) +#define PLLINE3 FNAME( PLLINE3, plline3 ) +#define PLLSTY FNAME( PLLSTY, pllsty ) +#define PLMAP7 FNAME( PLMAP7, plmap7 ) +#define PLMERIDIANS7 FNAME( PLMERIDIANS7, plmeridians7 ) +#define PLMESH FNAME( PLMESH, plmesh ) +#define PLMESHC FNAME( PLMESHC, plmeshc ) +#define PLMKSTRM FNAME( PLMKSTRM, plmkstrm ) +#define PLMTEX7 FNAME( PLMTEX7, plmtex7 ) +#define PLMTEX37 FNAME( PLMTEX37, plmtex37 ) +#define PLOT3D FNAME( PLOT3D, plot3d ) +#define PLOT3DC_ FNAME_( PLOT3DC, plot3dc ) +#define PLOT3DC FNAME( PLOT3DC, plot3dc ) +#define PLOT3DCL FNAME( PLOT3DCL, plot3dcl ) +#define PLPARSEOPTS7 FNAME( PLPARSEOPTS7, plparseopts7 ) +#define PLPAT FNAME( PLPAT, plpat ) +#define PLPOIN FNAME( PLPOIN, plpoin ) +#define PLPOIN3 FNAME( PLPOIN3, plpoin3 ) +#define PLPOLY3 FNAME( PLPOLY3, plpoly3 ) +#define PLPREC FNAME( PLPREC, plprec ) +#define PLPSTY FNAME( PLPSTY, plpsty ) +#define PLPTEX7 FNAME( PLPTEX7, plptex7 ) +#define PLPTEX37 FNAME( PLPTEX37, plptex37 ) +#define PLRANDD FNAME( PLRANDD, plrandd ) +#define PLREPLOT FNAME( PLREPLOT, plreplot ) +#define PLRGB FNAME( PLRGB, plrgb ) +#define PLRGB1 FNAME( PLRGB1, plrgb1 ) +#define PLRGBHLS FNAME( PLRGBHLS, plrgbhls ) +#define PLSCHR FNAME( PLSCHR, plschr ) +#define PLSCMAP0 FNAME( PLSCMAP0, plscmap0 ) +#define PLSCMAP0A FNAME( PLSCMAP0A, plscmap0a ) +#define PLSCMAP0N FNAME( PLSCMAP0N, plscmap0n ) +#define PLSCMAP1 FNAME( PLSCMAP1, plscmap1 ) +#define PLSCMAP1A FNAME( PLSCMAP1A, plscmap1a ) +#define PLSCMAP1L FNAME( PLSCMAP1L, plscmap1l ) +#define PLSCMAP1LA FNAME( PLSCMAP1LA, plscmap1la ) +#define PLSCMAP1N FNAME( PLSCMAP1N, plscmap1n ) +#define PLSCOL0 FNAME( PLSCOL0, plscol0 ) +#define PLSCOL0A FNAME( PLSCOL0A, plscol0a ) +#define PLSCOLBG FNAME( PLSCOLBG, plscolbg ) +#define PLSCOLBGA FNAME( PLSCOLBGA, plscolbga ) +#define PLSCOLOR FNAME( PLSCOLOR, plscolor ) +#define PLSCOMPRESSION FNAME( PLSCOMPRESSION, plscompression ) +#define PLSDEV7 FNAME( PLSDEV7, plsdev7 ) +#define PLSDIDEV FNAME( PLSDIDEV, plsdidev ) +#define PLSDIMAP FNAME( PLSDIMAP, plsdimap ) +#define PLSDIORI FNAME( PLSDIORI, plsdiori ) +#define PLSDIPLT FNAME( PLSDIPLT, plsdiplt ) +#define PLSDIPLZ FNAME( PLSDIPLZ, plsdiplz ) +#define PLSEED FNAME( PLSEED, plseed ) +#define PLSESC FNAME( PLSESC, plsesc ) +#define PLSETOPT7 FNAME( PLSETOPT7, plsetopt7 ) +#define PLSFAM FNAME( PLSFAM, plsfam ) +#define PLSFCI FNAME( PLSFCI, plsfci ) +#define PLSFNAM7 FNAME( PLSFNAM7, plsfnam7 ) +#define PLSFONT FNAME( PLSFONT, plsfont ) +#define PLSHADE07 FNAME( PLSHADE07, plshade07 ) +#define PLSHADE17 FNAME( PLSHADE17, plshade17 ) +#define PLSHADE27 FNAME( PLSHADE27, plshade27 ) +#define PLSHADE7 FNAME( PLSHADE7, plshade7 ) +#define PLSHADES07 FNAME( PLSHADES07, plshades07 ) +#define PLSHADES17 FNAME( PLSHADES17, plshades17 ) +#define PLSHADES27 FNAME( PLSHADES27, plshades27 ) +#define PLSHADES7 FNAME( PLSHADES7, plshades7 ) +#define PLSLABELFUNC FNAME( PLSLABELFUNC, plslabelfunc ) +#define PLSMAJ FNAME( PLSMAJ, plsmaj ) +#define PLSMEM FNAME( PLSMEM, plsmem ) +#define PLSMIN FNAME( PLSMIN, plsmin ) +#define PLSORI FNAME( PLSORI, plsori ) +#define PLSPAGE FNAME( PLSPAGE, plspage ) +#define PLSPAL07 FNAME( PLSPAL07, plspal07 ) +#define PLSPAL17 FNAME( PLSPAL17, plspal17 ) +#define PLSPAUSE FNAME( PLSPAUSE, plspause ) +#define PLSSTRM FNAME( PLSSTRM, plsstrm ) +#define PLSSUB FNAME( PLSSUB, plssub ) +#define PLSURF3D FNAME( PLSURF3D, plsurf3d ) +#define PLSSYM FNAME( PLSSYM, plssym ) +#define PLSTAR FNAME( PLSTAR, plstar ) +#define PLSTART7 FNAME( PLSTART7, plstart7 ) +#define PLSTRIPA FNAME( PLSTRIPA, plstripa ) +#define PLSTRIPC7 FNAME( PLSTRIPC7, plstripc7 ) +#define PLSTRIPD FNAME( PLSTRIPD, plstripd ) +#define PLSTYL FNAME( PLSTYL, plstyl ) +#define PLSURF3D FNAME( PLSURF3D, plsurf3d ) +#define PLSVECT FNAME( PLSVECT, plsvect ) +#define PLSVPA FNAME( PLSVPA, plsvpa ) +#define PLSXAX FNAME( PLSXAX, plsxax ) +#define PLSYAX FNAME( PLSYAX, plsyax ) +#define PLSYM FNAME( PLSYM, plsym ) +#define PLSZAX FNAME( PLSZAX, plszax ) +#define PLTEXT FNAME( PLTEXT, pltext ) +#define PLTIMEFMT7 FNAME( PLTIMEFMT7, pltimefmt7 ) +#define PLVASP FNAME( PLVASP, plvasp ) +#define PLVEC07 FNAME( PLVEC07, plvec07 ) +#define PLVEC17 FNAME( PLVEC17, plvec17 ) +#define PLVEC27 FNAME( PLVEC27, plvec27 ) +#define PLVECT7 FNAME( PLVECT7, plvect7 ) +#define PLVPAS FNAME( PLVPAS, plvpas ) +#define PLVPOR FNAME( PLVPOR, plvpor ) +#define PLVSTA FNAME( PLVSTA, plvsta ) +#define PLW3D FNAME( PLW3D, plw3d ) +#define PLWID FNAME( PLWID, plwid ) +#define PLWIND FNAME( PLWIND, plwind ) +#define PLXORMOD FNAME( PLXORMOD, plxormod ) -#endif /* __PLSTUBS_H__ */ +#endif /* __PLSTUBS_H__ */ Modified: trunk/bindings/f77/sc3d.c =================================================================== --- trunk/bindings/f77/sc3d.c 2009-10-21 22:52:04 UTC (rev 10544) +++ trunk/bindings/f77/sc3d.c 2009-10-22 00:44:49 UTC (rev 10545) @@ -1,132 +1,136 @@ /* $Id$ + * + * Stub routines for 3d plots. + * + * Copyright (C) 2004 Alan W. Irwin + * + * This file is part of PLplot. + * + * PLplot is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Library Public License as published + * by the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PLplot is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with PLplot; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ - Stub routines for 3d plots. - - Copyright (C) 2004 Alan W. Irwin - - This file is part of PLplot. - - PLplot is free software; you can redistribute it and/or modify - it under the terms of the GNU General Library Public License as published - by the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - PLplot is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with PLplot; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -*/ - #include "plstubs.h" void -PLOT3DC__(PLFLT *x, PLFLT *y, PLFLT *z, - PLINT *nx, PLINT *ny, PLINT *opt, - PLFLT *clevel, PLINT *nlevel, PLINT *lx) +PLOT3DC__( PLFLT *x, PLFLT *y, PLFLT *z, + PLINT *nx, PLINT *ny, PLINT *opt, + PLFLT *clevel, PLINT *nlevel, PLINT *lx ) { - PLFLT ** a; - int i,j; + PLFLT ** a; + int i, j; /* Create a vectored a array from transpose of the fortran z array. */ - plAlloc2dGrid(&a, *nx, *ny); - for (i = 0; i < *nx; i++) { - for (j = 0; j < *ny; j++) { - a[i][j] = z[i +j * *lx]; - } - } + plAlloc2dGrid( &a, *nx, *ny ); + for ( i = 0; i < *nx; i++ ) + { + for ( j = 0; j < *ny; j++ ) + { + a[i][j] = z[i + j * *lx]; + } + } - c_plot3dc(x, y, a, *nx, *ny, *opt, clevel, *nlevel); + c_plot3dc( x, y, a, *nx, *ny, *opt, clevel, *nlevel ); /* Clean up memory allocated for a */ - plFree2dGrid(a, *nx, *ny); - + plFree2dGrid( a, *nx, *ny ); } void -PLOT3DC(PLFLT *x, PLFLT *y, PLFLT *z, - PLINT *nx, PLINT *ny, PLINT *opt, - PLFLT *clevel, PLINT *nlevel, PLINT *lx) +PLOT3DC( PLFLT *x, PLFLT *y, PLFLT *z, + PLINT *nx, PLINT *ny, PLINT *opt, + PLFLT *clevel, PLINT *nlevel, PLINT *lx ) { - PLOT3DC__(x, y, z, nx, ny, opt, clevel, nlevel, lx); + PLOT3DC__( x, y, z, nx, ny, opt, clevel, nlevel, lx ); } void -PLSURF3D(PLFLT *x, PLFLT *y, PLFLT *z, - PLINT *nx, PLINT *ny, PLINT *opt, - PLFLT *clevel, PLINT *nlevel, PLINT *lx) +PLSURF3D( PLFLT *x, PLFLT *y, PLFLT *z, + PLINT *nx, PLINT *ny, PLINT *opt, + PLFLT *clevel, PLINT *nlevel, PLINT *lx ) { - int i, j; + int i, j; PLFLT **temp; /* Create the vectored C matrix from the Fortran matrix */ /* To make things easy we save a temporary copy of the transpose of the - Fortran matrix, so that the first dimension of z corresponds to the x - direction. */ + * Fortran matrix, so that the first dimension of z corresponds to the x + * direction. */ - if ( ! (temp = (PLFLT **) malloc((size_t) * nx * sizeof(PLFLT *)))) { - plabort("PLSURF3D: Out of memory"); - return; + if ( !( temp = (PLFLT **) malloc((size_t) *nx * sizeof ( PLFLT * )))) + { + plabort( "PLSURF3D: Out of memory" ); + return; } - for (i = 0; i < *nx; i++) { - if ( ! (temp[i] = (PLFLT *) malloc((size_t) * ny * sizeof(PLFLT)))) { - int ii; + for ( i = 0; i < *nx; i++ ) + { + if ( !( temp[i] = (PLFLT *) malloc((size_t) *ny * sizeof ( PLFLT )))) + { + int ii; - for (ii = 0; ii < i-1; ii++) - free((void *) temp[i]); - free((void *) temp); - plabort("PLSURF3D: Out of memory"); - return; - } + for ( ii = 0; ii < i - 1; ii++ ) + free((void *) temp[i] ); + free((void *) temp ); + plabort( "PLSURF3D: Out of memory" ); + return; + } } - for (i = 0; i < *nx; i++) - for (j = 0; j < *ny; j++) - temp[i][j] = *(z + j * *lx + i); + for ( i = 0; i < *nx; i++ ) + for ( j = 0; j < *ny; j++ ) + temp[i][j] = *( z + j * *lx + i ); - c_plsurf3d(x, y, temp, *nx, *ny, *opt, clevel, *nlevel); + c_plsurf3d( x, y, temp, *nx, *ny, *opt, clevel, *nlevel ); - for (i = 0; i < *nx; i++) - free((void *) temp[i]); + for ( i = 0; i < *nx; i++ ) + free((void *) temp[i] ); - free((void *) temp); + free((void *) temp ); } void -PLMESH(PLFLT *x, PLFLT *y, PLFLT *z, - PLINT *nx, PLINT *ny, PLINT *opt, PLINT *lx) +PLMESH( PLFLT *x, PLFLT *y, PLFLT *z, + PLINT *nx, PLINT *ny, PLINT *opt, PLINT *lx ) { - PLINT optlocal, nlevel = 0; - PLFLT clevel = 0.; + PLINT optlocal, nlevel = 0; + PLFLT clevel = 0.; - optlocal = *opt | MESH; - PLOT3DC__(x, y, z, nx, ny, &optlocal, &clevel, &nlevel, lx); + optlocal = *opt | MESH; + PLOT3DC__( x, y, z, nx, ny, &optlocal, &clevel, &nlevel, lx ); } void -PLMESHC(PLFLT *x, PLFLT *y, PLFLT *z, - PLINT *nx, PLINT *ny, PLINT *opt, - PLFLT *clevel, PLINT *nlevel, PLINT *lx) +PLMESHC( PLFLT *x, PLFLT *y, PLFLT *z, + PLINT *nx, PLINT *ny, PLINT *opt, + PLFLT *clevel, PLINT *nlevel, PLINT *lx ) { - PLINT optlocal; - optlocal = *opt | MESH; - PLOT3DC__(x, y, z, nx, ny, &optlocal, clevel, nlevel, lx); + PLINT optlocal; + optlocal = *opt | MESH; + PLOT3DC__( x, y, z, nx, ny, &optlocal, clevel, nlevel, lx ); } void -PLOT3D(PLFLT *x, PLFLT *y, PLFLT *z, - PLINT *nx, PLINT *ny, PLINT *opt, PLINT *side, PLINT *lx) +PLOT3D( PLFLT *x, PLFLT *y, PLFLT *z, + PLINT *nx, PLINT *ny, PLINT *opt, PLINT *side, PLINT *lx ) { - PLINT optlocal, nlevel = 0; - PLFLT clevel = 0.; + PLINT optlocal, nlevel = 0; + PLFLT clevel = 0.; - optlocal = *opt | (*side == 1 ? DRAW_SIDES : 0); - PLOT3DC__(x, y, z, nx, ny, &optlocal, &clevel, &nlevel, lx); + optlocal = *opt | ( *side == 1 ? DRAW_SIDES : 0 ); + PLOT3DC__( x, y, z, nx, ny, &optlocal, &clevel, &nlevel, lx ); } Modified: trunk/bindings/f77/sccont.c =================================================================== --- trunk/bindings/f77/sccont.c 2009-10-21 22:52:04 UTC (rev 10544) +++ trunk/bindings/f77/sccont.c 2009-10-22 00:44:49 UTC (rev 10545) @@ -1,71 +1,71 @@ /* $Id$ + * + * Contour plotter front-ends for Fortran. + * + * Copyright (C) 2004 Alan W. Irwin + * + * This file is part of PLplot. + * + * PLplot is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Library Public License as published + * by the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PLplot is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with PLplot; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ - Contour plotter front-ends for Fortran. - - Copyright (C) 2004 Alan W. Irwin - - This file is part of PLplot. - - PLplot is free software; you can redistribute it and/or modify - it under the terms of the GNU General Library Public License as published - by the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - PLplot is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with PLplot; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -*/ - #include "plstubs.h" /*----------------------------------------------------------------------*\ -* pltr0f() -* -* Identity transformation for plots from Fortran. -* Only difference from C-language identity function (pltr0) is that the -* Fortran paradigm for array index is used, i.e. starting at 1. -\*----------------------------------------------------------------------*/ + * pltr0f() + * + * Identity transformation for plots from Fortran. + * Only difference from C-language identity function (pltr0) is that the + * Fortran paradigm for array index is used, i.e. starting at 1. + \*----------------------------------------------------------------------*/ void -pltr0f(PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void *pltr_data) +pltr0f( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void *pltr_data ) { *tx = x + 1.0; *ty = y + 1.0; } /*----------------------------------------------------------------------*\ -* pltr2f() -* -* Does linear interpolation from doubly dimensioned coord arrays -* (row dominant, i.e. Fortran ordering). -* -* This routine includes lots of checks for out of bounds. This would -* occur occasionally due to a bug in the contour plotter that is now fixed. -* If an out of bounds coordinate is obtained, the boundary value is provided -* along with a warning. These checks should stay since no harm is done if -* if everything works correctly. -\*----------------------------------------------------------------------*/ + * pltr2f() + * + * Does linear interpolation from doubly dimensioned coord arrays + * (row dominant, i.e. Fortran ordering). + * + * This routine includes lots of checks for out of bounds. This would + * occur occasionally due to a bug in the contour plotter that is now fixed. + * If an out of bounds coordinate is obtained, the boundary value is provided + * along with a warning. These checks should stay since no harm is done if + * if everything works correctly. + \*----------------------------------------------------------------------*/ void -pltr2f(PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void *pltr_data) +pltr2f( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void *pltr_data ) { - PLINT ul, ur, vl, vr; - PLFLT du, dv; - PLFLT xll, xlr, xrl, xrr; - PLFLT yll, ylr, yrl, yrr; - PLFLT xmin, xmax, ymin, ymax; + PLINT ul, ur, vl, vr; + PLFLT du, dv; + PLFLT xll, xlr, xrl, xrr; + PLFLT yll, ylr, yrl, yrr; + PLFLT xmin, xmax, ymin, ymax; PLcGrid *cgrid = (PLcGrid *) pltr_data; - PLFLT *xg = cgrid->xg; - PLFLT *yg = cgrid->yg; - PLINT nx = cgrid->nx; - PLINT ny = cgrid->ny; + PLFLT *xg = cgrid->xg; + PLFLT *yg = cgrid->yg; + PLINT nx = cgrid->nx; + PLINT ny = cgrid->ny; ul = (PLINT) x; ur = ul + 1; @@ -80,252 +80,262 @@ ymin = 0; ymax = ny - 1; - if (x < xmin || x > xmax || y < ymin || y > ymax) { - plwarn("pltr2f: Invalid coordinates"); + if ( x < xmin || x > xmax || y < ymin || y > ymax ) + { + plwarn( "pltr2f: Invalid coordinates" ); - if (x < xmin) { + if ( x < xmin ) + { + if ( y < ymin ) + { + *tx = *xg; + *ty = *yg; + } + else if ( y > ymax ) + { + *tx = *( xg + ( ny - 1 ) * nx ); + *ty = *( yg + ( ny - 1 ) * nx ); + } + else + { + ul = 0; + xll = *( xg + ul + vl * nx ); + yll = *( yg + ul + vl * nx ); + xlr = *( xg + ul + vr * nx ); + ylr = *( yg + ul + vr * nx ); - if (y < ymin) { - *tx = *xg; - *ty = *yg; - } - else if (y > ymax) { - *tx = *(xg + (ny - 1) * nx); - *ty = *(yg + (ny - 1) * nx); - } - else { - ul = 0; - xll = *(xg + ul + vl * nx); - yll = *(yg + ul + vl * nx); - xlr = *(xg + ul + vr * nx); - ylr = *(yg + ul + vr * nx); + *tx = xll * ( 1 - dv ) + xlr * ( dv ); + *ty = yll * ( 1 - dv ) + ylr * ( dv ); + } + } + else if ( x > xmax ) + { + if ( y < ymin ) + { + *tx = *( xg + ( nx - 1 )); + *ty = *( yg + ( nx - 1 )); + } + else if ( y > ymax ) + { + *tx = *( xg + ( nx - 1 ) + ( ny - 1 ) * nx ); + *ty = *( yg + ( nx - 1 ) + ( ny - 1 ) * nx ); + } + else + { + ul = nx - 1; + xll = *( xg + ul + vl * nx ); + yll = *( yg + ul + vl * nx ); + xlr = *( xg + ul + vr * nx ); + ylr = *( yg + ul + vr * nx ); - *tx = xll * (1 - dv) + xlr * (dv); - *ty = yll * (1 - dv) + ylr * (dv); - } - } - else if (x > xmax) { + *tx = xll * ( 1 - dv ) + xlr * ( dv ); + *ty = yll * ( 1 - dv ) + ylr * ( dv ); + } + } + else + { + if ( y < ymin ) + { + vl = 0; + xll = *( xg + ul + vl * nx ); + xrl = *( xg + ur + vl * nx ); + yll = *( yg + ul + vl * nx ); + yrl = *( yg + ur + vl * nx ); - if (y < ymin) { - *tx = *(xg + (nx - 1)); - *ty = *(yg + (nx - 1)); - } - else if (y > ymax) { - *tx = *(xg + (nx - 1) + (ny - 1) * nx); - *ty = *(yg + (nx - 1) + (ny - 1) * nx); - } - else { - ul = nx - 1; - xll = *(xg + ul + vl * nx); - yll = *(yg + ul + vl * nx); - xlr = *(xg + ul + vr * nx); - ylr = *(yg + ul + vr * nx); + *tx = xll * ( 1 - du ) + xrl * ( du ); + *ty = yll * ( 1 - du ) + yrl * ( du ); + } + else if ( y > ymax ) + { + vr = ny - 1; + xlr = *( xg + ul + vr * nx ); + xrr = *( xg + ur + vr * nx ); + ylr = *( yg + ul + vr * nx ); + yrr = *( yg + ur + vr * nx ); - *tx = xll * (1 - dv) + xlr * (dv); - *ty = yll * (1 - dv) + ylr * (dv); - } - } - else { - if (y < ymin) { - vl = 0; - xll = *(xg + ul + vl * nx); - xrl = *(xg + ur + vl * nx); - yll = *(yg + ul + vl * nx); - yrl = *(yg + ur + vl * nx); - - *tx = xll * (1 - du) + xrl * (du); - *ty = yll * (1 - du) + yrl * (du); - } - else if (y > ymax) { - vr = ny - 1; - xlr = *(xg + ul + vr * nx); - xrr = *(xg + ur + vr * nx); - ylr = *(yg + ul + vr * nx); - yrr = *(yg + ur + vr * nx); - - *tx = xlr * (1 - du) + xrr * (du); - *ty = ylr * (1 - du) + yrr * (du); - } - } + *tx = xlr * ( 1 - du ) + xrr * ( du ); + *ty = ylr * ( 1 - du ) + yrr * ( du ); + } + } } /* Normal case. - Look up coordinates in row-dominant array. - Have to handle right boundary specially -- if at the edge, we'd - better not reference the out of bounds point. */ + * Look up coordinates in row-dominant array. + * Have to handle right boundary specially -- if at the edge, we'd + * better not reference the out of bounds point. */ - else { + else + { + xll = *( xg + ul + vl * nx ); + yll = *( yg + ul + vl * nx ); - xll = *(xg + ul + vl * nx); - yll = *(yg + ul + vl * nx); - /* ur is out of bounds */ - if (ur == nx && vr < ny) { + if ( ur == nx && vr < ny ) + { + xlr = *( xg + ul + vr * nx ); + ylr = *( yg + ul + vr * nx ); - xlr = *(xg + ul + vr * nx); - ylr = *(yg + ul + vr * nx); + *tx = xll * ( 1 - dv ) + xlr * ( dv ); + *ty = yll * ( 1 - dv ) + ylr * ( dv ); + } - *tx = xll * (1 - dv) + xlr * (dv); - *ty = yll * (1 - dv) + ylr * (dv); - } - /* vr is out of bounds */ - else if (ur < nx && vr == ny) { + else if ( ur < nx && vr == ny ) + { + xrl = *( xg + ur + vl * nx ); + yrl = *( yg + ur + vl * nx ); - xrl = *(xg + ur + vl * nx); - yrl = *(yg + ur + vl * nx); + *tx = xll * ( 1 - du ) + xrl * ( du ); + *ty = yll * ( 1 - du ) + yrl * ( du ); + } - *tx = xll * (1 - du) + xrl * (du); - *ty = yll * (1 - du) + yrl * (du); - } - /* both ur and vr are out of bounds */ - else if (ur == nx && vr == ny) { + else if ( ur == nx && vr == ny ) + { + *tx = xll; + *ty = yll; + } - *tx = xll; - *ty = yll; - } - /* everything in bounds */ - else { + else + { + xrl = *( xg + ur + vl * nx ); + xlr = *( xg + ul + vr * nx ); + xrr = *( xg + ur + vr * nx ); - xrl = *(xg + ur + vl * nx); - xlr = *(xg + ul + vr * nx); - xrr = *(xg + ur + vr * nx); - - yrl = *(yg + ur + vl * nx); - ylr = *(yg + ul + vr * nx); - yrr = *(yg + ur + vr * nx); + yrl = *( yg + ur + vl * nx ); + ylr = *( yg + ul + vr * nx ); + yrr = *( yg + ur + vr * nx ); /* INDENT OFF */ - *tx = xll * (1 - du) * (1 - dv) + xlr * (1 - du) * (dv) + - xrl * (du) * (1 - dv) + xrr * (du) * (dv); + *tx = xll * ( 1 - du ) * ( 1 - dv ) + xlr * ( 1 - du ) * ( dv ) + + xrl * ( du ) * ( 1 - dv ) + xrr * ( du ) * ( dv ); - *ty = yll * (1 - du) * (1 - dv) + ylr * (1 - du) * (dv) + - yrl * (du) * (1 - dv) + yrr * (du) * (dv); + *ty = yll * ( 1 - du ) * ( 1 - dv ) + ylr * ( 1 - du ) * ( dv ) + + yrl * ( du ) * ( 1 - dv ) + yrr * ( du ) * ( dv ); /* INDENT ON */ - } + } } } /*----------------------------------------------------------------------*\ -* Contour plotter front-ends. -* These specify the row-dominant function evaluator in the plfcont -* argument list. NO TRANSPOSE IS NECESSARY. The routines are as follows: -* -* - plcon0 no transformation -* - plcon1 linear interpolation from singly dimensioned coord arrays -* - plcon2 linear interpolation from doubly dimensioned coord arrays -* -* The latter two work by calling plfcont() with the appropriate grid -* structure for input to pltr2f(). -\*----------------------------------------------------------------------*/ + * Contour plotter front-ends. + * These specify the row-dominant function evaluator in the plfcont + * argument list. NO TRANSPOSE IS NECESSARY. The routines are as follows: + * + * - plcon0 no transformation + * - plcon1 linear interpolation from singly dimensioned coord arrays + * - plcon2 linear interpolation from doubly dimensioned coord arrays + * + * The latter two work by calling plfcont() with the appropriate grid + * structure for input to pltr2f(). + \*----------------------------------------------------------------------*/ /* no transformation */ void -PLCON07(PLFLT *z, PLINT *nx, PLINT *ny, PLINT *kx, PLINT *lx, - PLINT *ky, PLINT *ly, PLFLT *clevel, PLINT *nlevel) +PLCON07( PLFLT *z, PLINT *nx, PLINT *ny, PLINT *kx, PLINT *lx, + PLINT *ky, PLINT *ly, PLFLT *clevel, PLINT *nlevel ) { PLfGrid fgrid; fgrid.nx = *nx; fgrid.ny = *ny; - fgrid.f = z; + fgrid.f = z; - plfcont(plf2evalr, (void *) &fgrid, - *nx, *ny, *kx, *lx, *ky, *ly, clevel, *nlevel, - pltr0f, NULL); + plfcont( plf2evalr, (void *) &fgrid, + *nx, *ny, *kx, *lx, *ky, *ly, clevel, *nlevel, + pltr0f, NULL ); } /* 1-d transformation */ void -PLCON17(PLFLT *z, PLINT *nx, PLINT *ny, PLINT *kx, PLINT *lx, - PLINT *ky, PLINT *ly, PLFLT *clevel, PLINT *nlevel, - PLFLT *xg, PLFLT *yg) +PLCON17( PLFLT *z, PLINT *nx, PLINT *ny, PLINT *kx, PLINT *lx, + PLINT *ky, PLINT *ly, PLFLT *clevel, PLINT *nlevel, + PLFLT *xg, PLFLT *yg ) { PLfGrid fgrid; PLcGrid cgrid; fgrid.nx = *nx; fgrid.ny = *ny; - fgrid.f = z; + fgrid.f = z; cgrid.nx = *nx; cgrid.ny = *ny; cgrid.xg = xg; cgrid.yg = yg; - plfcont(plf2evalr, (void *) &fgrid, - *nx, *ny, *kx, *lx, *ky, *ly, clevel, *nlevel, - pltr1, (void *) &cgrid); + plfcont( plf2evalr, (void *) &fgrid, + *nx, *ny, *kx, *lx, *ky, *ly, clevel, *nlevel, + pltr1, (void *) &cgrid ); } /* 2-d transformation */ void -PLCON27(PLFLT *z, PLINT *nx, PLINT *ny, PLINT *kx, PLINT *lx, - PLINT *ky, PLINT *ly, PLFLT *clevel, PLINT *nlevel, - PLFLT *xg, PLFLT *yg) +PLCON27( PLFLT *z, PLINT *nx, PLINT *ny, PLINT *kx, PLINT *lx, + PLINT *ky, PLINT *ly, PLFLT *clevel, PLINT *nlevel, + PLFLT *xg, PLFLT *yg ) { PLfGrid fgrid; PLcGrid cgrid; fgrid.nx = *nx; fgrid.ny = *ny; - fgrid.f = z; + fgrid.f = z; cgrid.nx = *nx; cgrid.ny = *ny; cgrid.xg = xg; cgrid.yg = yg; - plfcont(plf2evalr, (void *) &fgrid, - *nx, *ny, *kx, *lx, *ky, *ly, clevel, *nlevel, - pltr2f, (void *) &cgrid); + plfcont( plf2evalr, (void *) &fgrid, + *nx, *ny, *kx, *lx, *ky, *ly, clevel, *nlevel, + pltr2f, (void *) &cgrid ); } /*----------------------------------------------------------------------*\ -* Vector plotter front-ends. -* These specify the row-dominant function evaluator in the plfvect -* argument list. NO TRANSPOSE IS NECESSARY. The routines are as follows: -* -* - plvec0 no transformation -* - plvec1 linear interpolation from singly dimensioned coord arrays -* - plvec2 linear interpolation from doubly dimensioned coord arrays -* -* The latter two work by calling plfvect() with the appropriate grid -* structure for input to pltr2f(). -\*----------------------------------------------------------------------*/ + * Vector plotter front-ends. + * These specify the row-dominant function evaluator in the plfvect + * argument list. NO TRANSPOSE IS NECESSARY. The routines are as follows: + * + * - plvec0 no transformation + * - plvec1 linear interpolation from singly dimensioned coord arrays + * - plvec2 linear interpolation from doubly dimensioned coord arrays + * + * The latter two work by calling plfvect() with the appropriate grid + * structure for input to pltr2f(). + \*----------------------------------------------------------------------*/ /* no transformation */ void -PLVEC07(PLFLT *u, PLFLT *v, PLINT *nx, PLINT *ny, PLFLT *scale) +PLVEC07( PLFLT *u, PLFLT *v, PLINT *nx, PLINT *ny, PLFLT *scale ) { PLfGrid fgrid1, fgrid2; fgrid1.nx = *nx; fgrid1.ny = *ny; - fgrid1.f = u; + fgrid1.f = u; fgrid2.nx = *nx; fgrid2.ny = *ny; - fgrid2.f = v; + fgrid2.f = v; - plfvect(plf2evalr, (void *) &fgrid1, (void *) &fgrid2, - *nx, *ny, *scale, pltr0f, NULL); + plfvect( plf2evalr, (void *) &fgrid1, (void *) &fgrid2, + *nx, *ny, *scale, pltr0f, NULL ); } /* 1-d transformation */ void -PLVEC17(PLFLT *u, PLFLT *v, PLINT *nx, PLINT *ny, PLFLT *scale, - PLFLT *xg, PLFLT *yg) +PLVEC17( PLFLT *u, PLFLT *v, PLINT *nx, PLINT *ny, PLFLT *scale, + PLFLT *xg, PLFLT *yg ) { PLfGrid fgrid1; PLfGrid fgrid2; @@ -333,26 +343,26 @@ fgrid1.nx = *nx; fgrid1.ny = *ny; - fgrid1.f = u; + fgrid1.f = u; fgrid2.nx = *nx; fgrid2.ny = *ny; - fgrid2.f = v; + fgrid2.f = v; cgrid.nx = *nx; cgrid.ny = *ny; cgrid.xg = xg; cgrid.yg = yg; - plfvect(plf2evalr, (void *) &fgrid1, (void *) &fgrid2, - *nx, *ny, *scale, pltr1, (void *) &cgrid); + plfvect( plf2evalr, (void *) &fgrid1, (void *) &fgrid2, + *nx, *ny, *scale, pltr1, (void *) &cgrid ); } /* 2-d transformation */ void -PLVEC27(PLFLT *u, PLFLT *v, PLINT *nx, PLINT *ny, PLFLT *scale, - PLFLT *xg, PLFLT *yg) +PLVEC27( PLFLT *u, PLFLT *v, PLINT *nx, PLINT *ny, PLFLT *scale, + PLFLT *xg, PLFLT *yg ) { PLfGrid fgrid1; PLfGrid fgrid2; @@ -360,27 +370,27 @@ fgrid1.nx = *nx; fgrid1.ny = *ny; - fgrid1.f = u; + fgrid1.f = u; fgrid2.nx = *nx; fgrid2.ny = *ny; - fgrid2.f = v; + fgrid2.f = v; cgrid.nx = *nx; cgrid.ny = *ny; cgrid.xg = xg; cgrid.yg = yg; - plfvect(plf2evalr, (void *) &fgrid1, (void *) &fgrid2, - *nx, *ny, *scale, pltr2f, (void *) &cgrid); + plfvect( plf2evalr, (void *) &fgrid1, (void *) &fgrid2, + *nx, *ny, *scale, pltr2f, (void *) &cgrid ); } /*----------------------------------------------------------------------*\ -* Here are the old contour plotters. -\*----------------------------------------------------------------------*/ + * Here are the old contour plotters. + \*----------------------------------------------------------------------*/ static void -pltr(PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void *pltr_data) +pltr( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void *pltr_data ) { PLFLT *tr = (PLFLT *) pltr_data; @@ -389,38 +399,38 @@ } void -PLCONT7(PLFLT *z, PLINT *nx, PLINT *ny, PLINT *kx, PLINT *lx, - PLINT *ky, PLINT *ly, PLFLT *clevel, PLINT *nlevel, PLFLT *ftr) +PLCONT7( PLFLT *z, PLINT *nx, PLINT *ny, PLINT *kx, PLINT *lx, + PLINT *ky, PLINT *ly, PLFLT *clevel, PLINT *nlevel, PLFLT *ftr ) { PLfGrid fgrid; fgrid.nx = *nx; fgrid.ny = *ny; - fgrid.f = z; + fgrid.f = z; - plfcont(plf2evalr, (void *) &fgrid, - *nx, *ny, *kx, *lx, *ky, *ly, clevel, *nlevel, - pltr, (void *) ftr); + plfcont( plf2evalr, (void *) &fgrid, + *nx, *ny, *kx, *lx, *ky, *ly, clevel, *nlevel, + pltr, (void *) ftr ); } void -PLVECT7(PLFLT *u, PLFLT *v, PLINT *nx, PLINT *ny, PLFLT *scale, - PLFLT *ftr) +PLVECT7( PLFLT *u, PLFLT *v, PLINT *nx, PLINT *ny, PLFLT *scale, + PLFLT *ftr ) { PLfGrid fgrid1; PLfGrid fgrid2; fgrid1.nx = *nx; fgrid1.ny = *ny; - fgrid1.f = u; + fgrid1.f = u; fgrid2.nx = *nx; fgrid2.ny = *ny; - fgrid2.f = v; + fgrid2.f = v; - plfvect(plf2evalr, (void *) &fgrid1, (void *) &fgrid2, - *nx, *ny, *scale, - pltr, (void *) ftr); + plfvect( plf2evalr, (void *) &fgrid1, (void *) &fgrid2, + *nx, *ny, *scale, + pltr, (void *) ftr ); } /*----------------------------------------------------------------------*\ @@ -435,152 +445,159 @@ * - plshade2 linear interpolation from doubly dimensioned coord arrays * - plshade tr array transformation * -\*----------------------------------------------------------------------*/ + \*----------------------------------------------------------------------*/ void -PLSHADE07(PLFLT *z, PLINT *nx, PLINT *ny, const char *defined, - PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax, - PLFLT *shade_min, PLFLT *shade_max, - PLINT *sh_cmap, PLFLT *sh_color, PLINT *sh_width, - PLINT *min_color, PLINT *min_width, - PLINT *max_color, PLINT *max_width, PLINT *lx) +PLSHADE07( PLFLT *z, PLINT *nx, PLINT *ny, const char *defined, + PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax, + PLFLT *shade_min, PLFLT *shade_max, + PLINT *sh_cmap, PLFLT *sh_color, PLINT *sh_width, + PLINT *min_color, PLINT *min_width, + PLINT *max_color, PLINT *max_width, PLINT *lx ) { - PLINT rect = 1; - PLFLT ** a; - int i,j; + PLINT rect = 1; + PLFLT ** a; + int i, j; /* Create a vectored a array from transpose of the fortran z array. */ - plAlloc2dGrid(&a, *nx, *ny); - for (i = 0; i < *nx; i++) { - for (j = 0; j < *ny; j++) { - a[i][j] = z[i +j * *lx]; - } - } + plAlloc2dGrid( &a, *nx, *ny ); + for ( i = 0; i < *nx; i++ ) + { + for ( j = 0; j < *ny; j++ ) + { + a[i][j] = z[i + j * *lx]; + } + } - c_plshade( a, *nx, *ny, NULL, - *xmin, *xmax, *ymin, *ymax, - *shade_min, *shade_max, - *sh_cmap, *sh_color, *sh_width, - *min_color, *min_width, *max_color, *max_width, - c_plfill, rect, NULL, NULL); + c_plshade( a, *nx, *ny, NULL, + *xmin, *xmax, *ymin, *ymax, + *shade_min, *shade_max, + *sh_cmap, *sh_color, *sh_width, + *min_color, *min_width, *max_color, *max_width, + c_plfill, rect, NULL, NULL ); /* Clean up memory allocated for a */ - plFree2dGrid(a, *nx, *ny); + plFree2dGrid( a, *nx, *ny ); } /* 1-d transformation */ void -PLSHADE17(PLFLT *z, PLINT *nx, PLINT *ny, const char *defined, - PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax, - PLFLT *shade_min, PLFLT *shade_max, - PLINT *sh_cmap, PLFLT *sh_color, PLINT *sh_width, - PLINT *min_color, PLINT *min_width, - PLINT *max_color, PLINT *max_width, - PLFLT *xg1, PLFLT *yg1, PLINT *lx) +PLSHADE17( PLFLT *z, PLINT *nx, PLINT *ny, const char *defined, + PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax, + PLFLT *shade_min, PLFLT *shade_max, + PLINT *sh_cmap, PLFLT *sh_color, PLINT *sh_width, + PLINT *min_color, PLINT *min_width, + PLINT *max_color, PLINT *max_width, + PLFLT *xg1, PLFLT *yg1, PLINT *lx ) { - PLINT rect = 1; - PLFLT ** a; - int i,j; - PLcGrid cgrid; + PLINT rect = 1; + PLFLT ** a; + int i, j; + PLcGrid cgrid; /* Create a vectored a array from transpose of the fortran z array. */ - plAlloc2dGrid(&a, *nx, *ny); - for (i = 0; i < *nx; i++) { - for (j = 0; j < *ny; j++) { - a[i][j] = z[i +j * *lx]; - } - } + plAlloc2dGrid( &a, *nx, *ny ); + for ( i = 0; i < *nx; i++ ) + { + for ( j = 0; j < *ny; j++ ) + { + a[i][j] = z[i + j * *lx]; + } + } - cgrid.nx = *nx; - cgrid.ny = *ny; - cgrid.xg = xg1; - cgrid.yg = yg1; - c_plshade( a, *nx, *ny, NULL, - *xmin, *xmax, *ymin, *ymax, - *shade_min, *shade_max, - *sh_cmap, *sh_color, *sh_width, - *min_color, *min_width, *max_color, *max_width, - c_plfill, rect, pltr1, (PLPointer) &cgrid); + cgrid.nx = *nx; + cgrid.ny = *ny; + cgrid.xg = xg1; + cgrid.yg = yg1; + c_plshade( a, *nx, *ny, NULL, + *xmin, *xmax, *ymin, *ymax, + *shade_min, *shade_max, + *sh_cmap, *sh_color, *sh_width, + *min_color, *min_width, *max_color, *max_width, + c_plfill, rect, pltr1, ( PLPointer ) & cgrid ); /* Clean up memory allocated for a */ - plFree2dGrid(a, *nx, *ny); + plFree2dGrid( a, *nx, *ny ); } /* 2-d transformation */ void -PLSHADE27(PLFLT *z, PLINT *nx, PLINT *ny, const char *defined, - PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax, - PLFLT *shade_min, PLFLT *shade_max, - PLINT *sh_cmap, PLFLT *sh_color, PLINT *sh_width, - PLINT *min_color, PLINT *min_width, - PLINT *max_color, PLINT *max_width, - PLFLT *xg2, PLFLT *yg2, PLINT *lx) +PLSHADE27( PLFLT *z, PLINT *nx, PLINT *ny, const char *defined, + PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax, + PLFLT *shade_min, PLFLT *shade_max, + PLINT *sh_cmap, PLFLT *sh_color, PLINT *sh_width, + PLINT *min_color, PLINT *min_width, + PLINT *max_color, PLINT *max_width, + PLFLT *xg2, PLFLT *yg2, PLINT *lx ) { - PLINT rect = 0; - PLFLT **a; - int i,j; - PLcGrid2 cgrid2; + PLINT rect = 0; + PLFLT **a; + int i, j; + PLcGrid2 cgrid2; ... [truncated message content] |