From: <ai...@us...> - 2010-11-01 22:19:54
|
Revision: 11295 http://plplot.svn.sourceforge.net/plplot/?rev=11295&view=rev Author: airwin Date: 2010-11-01 22:19:45 +0000 (Mon, 01 Nov 2010) Log Message: ----------- Move to new // comment style for C code 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/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 2010-11-01 22:15:20 UTC (rev 11294) +++ trunk/bindings/f77/plstubs.h 2010-11-01 22:19:45 UTC (rev 11295) @@ -1,52 +1,52 @@ -/* $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. - */ +// $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. +// #ifndef __PLSTUBS_H__ #define __PLSTUBS_H__ #include "plplotP.h" -/*----------------------------------------------------------------------*\ - * Select name transformation based on system type. - * - * Define the STUB_LINKAGE flag to get proper C<->Fortran linkage on your - * system. This flag describes what the compiler does to Fortran routine - * names, which we must duplicate on the C stubs so that the Fortran - * routines may call them. You can often set STUB_LINKAGE by the - * construct -DSTUB_LINKAGE=<value> on the C compiler command line, but - * it is best to either rely on the default or explicitly handle your - * system below. - * - * Current choices for STUB_LINKAGE: - * - * STUB_LAU lower-case, append underscore - * STUB_L lower-case - * STUB_U upper-case - * STUB_FORTRAN use "fortran" keyword (MS-DOS convention) - * - * If no choice is made, the default is set to STUB_LAU. This should - * handle most generic Unix boxes not already accounted for. - * - * ** Namespace collision ** - * - * If you use the STUB_L option, the C & Fortran namespaces will collide - * if the Fortran compiler does lower case folding (they usually do). - * The problem is then that the stub names and actual function names will - * be exactly the same, if we insist on the Fortran and C bindings to be - * similar. The solution is to give the externally callable C routines - * unique names, and provide macros to turn the documented entry names in - * 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. - \*----------------------------------------------------------------------*/ +//-------------------------------------------------------------------------- +// Select name transformation based on system type. +// +// Define the STUB_LINKAGE flag to get proper C<->Fortran linkage on your +// system. This flag describes what the compiler does to Fortran routine +// names, which we must duplicate on the C stubs so that the Fortran +// routines may call them. You can often set STUB_LINKAGE by the +// construct -DSTUB_LINKAGE=<value> on the C compiler command line, but +// it is best to either rely on the default or explicitly handle your +// system below. +// +// Current choices for STUB_LINKAGE: +// +// STUB_LAU lower-case, append underscore +// STUB_L lower-case +// STUB_U upper-case +// STUB_FORTRAN use "fortran" keyword (MS-DOS convention) +// +// If no choice is made, the default is set to STUB_LAU. This should +// handle most generic Unix boxes not already accounted for. +// +// ** Namespace collision ** +// +// If you use the STUB_L option, the C & Fortran namespaces will collide +// if the Fortran compiler does lower case folding (they usually do). +// The problem is then that the stub names and actual function names will +// be exactly the same, if we insist on the Fortran and C bindings to be +// similar. The solution is to give the externally callable C routines +// unique names, and provide macros to turn the documented entry names in +// 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 @@ -58,67 +58,67 @@ #ifndef STUB_LINKAGE -#if defined ( SX ) /* NEC Super-UX (SX-3) */ +#if defined ( SX ) // NEC Super-UX (SX-3) #define STUB_LINKAGE STUB_LAU #endif -#if defined ( _IBMR2 ) && defined ( _AIX ) /* AIX */ +#if defined ( _IBMR2 ) && defined ( _AIX ) // AIX #define STUB_LINKAGE STUB_L #endif -#ifdef __hpux /* HP/UX */ +#ifdef __hpux // HP/UX #define STUB_LINKAGE STUB_L #endif -#ifdef __mips /* IRIX (SGI systems) */ +#ifdef __mips // IRIX (SGI systems) #define STUB_LINKAGE STUB_LAU #endif -#ifdef sun /* Suns */ +#ifdef sun // Suns #define STUB_LINKAGE STUB_LAU #endif -#ifdef CRAY /* Cray/UNICOS */ +#ifdef CRAY // Cray/UNICOS #define STUB_LINKAGE STUB_U #endif -#if defined ( __alpha ) && defined ( __osf__ ) /* DEC Alpha AXP/OSF */ +#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 -#if defined ( WIN32 ) /* Windows 32-bit */ -#if defined ( IVF ) /* Intel Visual Fortran */ +#if defined ( WIN32 ) // Windows 32-bit +#if defined ( IVF ) // Intel Visual Fortran #define STUB_LINKAGE STUB_IVF -#elif defined ( CVF ) /* MSVC/CVF */ +#elif defined ( CVF ) // MSVC/CVF #define STUB_LINKAGE STUB_U -#elif defined ( MSDOS ) /* MS-DOS based */ +#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 */ +#elif defined ( __GNUC__ ) // GNU C with MinGW/Cygwin #define STUB_LINKAGE STUB_MINGW #endif -#elif defined ( MSDOS ) /* MS-DOS based */ +#elif defined ( MSDOS ) // MS-DOS based #define STUB_LINKAGE STUB_FORTRAN -#endif /* Windows 32-bit */ +#endif // Windows 32-bit -#ifndef STUB_LINKAGE /* The default */ +#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. - \*----------------------------------------------------------------------*/ +//-------------------------------------------------------------------------- +// 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 ## _ @@ -152,19 +152,19 @@ #error "Illegal setting for STUB_LINKAGE" #endif -/*----------------------------------------------------------------------*\ - * Now to actually define the stub names. - * Each stub must have an entry here. - \*----------------------------------------------------------------------*/ +//-------------------------------------------------------------------------- +// 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 - * g77, "This is done to ensure compatibility with code produced by many - * UNIX Fortran compilers." However, other fortran compilers do not have - * this default naming scheme so to avoid trouble I have #defined two - * variations of the embedded underscore names, one with and one without - * the extra trailing underscore. - */ +// N.B. By default the g77 compiler appends second underscore to name if +// the original name contains any underscore at all. According to info +// g77, "This is done to ensure compatibility with code produced by many +// UNIX Fortran compilers." However, other fortran compilers do not have +// this default naming scheme so to avoid trouble I have #defined two +// variations of the embedded underscore names, one with and one without +// the extra trailing underscore. +// #define PL_SETCONTLABELFORMAT FNAME( PL_SETCONTLABELFORMAT, pl_setcontlabelformat ) #define PL_SETCONTLABELFORMATa FNAME( PL_SETCONTLABELFORMAT_, pl_setcontlabelformat_ ) @@ -355,4 +355,4 @@ #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 2010-11-01 22:15:20 UTC (rev 11294) +++ trunk/bindings/f77/sc3d.c 2010-11-01 22:19:45 UTC (rev 11295) @@ -1,26 +1,26 @@ -/* $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 - * - */ +// $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 +// +// #include "plstubs.h" @@ -32,7 +32,7 @@ PLFLT ** a; int i, j; -/* Create a vectored a array from transpose of the fortran z array. */ +// Create a vectored a array from transpose of the fortran z array. plAlloc2dGrid( &a, *nx, *ny ); for ( i = 0; i < *nx; i++ ) { @@ -44,7 +44,7 @@ c_plot3dc( x, y, a, *nx, *ny, *opt, clevel, *nlevel ); -/* Clean up memory allocated for a */ +// Clean up memory allocated for a plFree2dGrid( a, *nx, *ny ); } @@ -64,10 +64,10 @@ 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. */ + // 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. if ( !( temp = (PLFLT **) malloc( (size_t) *nx * sizeof ( PLFLT * ) ) ) ) { Modified: trunk/bindings/f77/sccont.c =================================================================== --- trunk/bindings/f77/sccont.c 2010-11-01 22:15:20 UTC (rev 11294) +++ trunk/bindings/f77/sccont.c 2010-11-01 22:19:45 UTC (rev 11295) @@ -1,36 +1,36 @@ -/* $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 - * - */ +// $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 +// +// #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 ) @@ -39,20 +39,20 @@ *ty = y + 1.0; } -/*----------------------------------------------------------------------*\ - * 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 */ +// no transformation void PLCON07( PLFLT *z, PLINT *nx, PLINT *ny, PLINT *kx, PLINT *lx, @@ -69,7 +69,7 @@ pltr0f, NULL ); } -/* 1-d transformation */ +// 1-d transformation void PLCON17( PLFLT *z, PLINT *nx, PLINT *ny, PLINT *kx, PLINT *lx, @@ -93,7 +93,7 @@ pltr1, (void *) &cgrid ); } -/* 2-d transformation */ +// 2-d transformation void PLCON27( PLFLT *z, PLINT *nx, PLINT *ny, PLINT *kx, PLINT *lx, @@ -117,20 +117,20 @@ 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 */ +// no transformation void PLVEC07( PLFLT *u, PLFLT *v, PLINT *nx, PLINT *ny, PLFLT *scale ) @@ -149,7 +149,7 @@ *nx, *ny, *scale, pltr0f, NULL ); } -/* 1-d transformation */ +// 1-d transformation void PLVEC17( PLFLT *u, PLFLT *v, PLINT *nx, PLINT *ny, PLFLT *scale, @@ -176,7 +176,7 @@ *nx, *ny, *scale, pltr1, (void *) &cgrid ); } -/* 2-d transformation */ +// 2-d transformation void PLVEC27( PLFLT *u, PLFLT *v, PLINT *nx, PLINT *ny, PLFLT *scale, @@ -203,9 +203,9 @@ *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 ) @@ -251,19 +251,19 @@ pltr, (void *) ftr ); } -/*----------------------------------------------------------------------*\ - * plfshade front-ends. - * These specify the row-dominant function evaluator in the plfshade - * argument list. NO TRANSPOSE IS NECESSARY. The routines are as follows: - * - * - plshade0 map indices to xmin, xmax, ymin, ymax. - * The next two work by calling plfshade() with the appropriate grid - * structure for input to pltr2f(). - * - plshade1 linear interpolation from singly dimensioned coord arrays - * - plshade2 linear interpolation from doubly dimensioned coord arrays - * - plshade tr array transformation - * - \*----------------------------------------------------------------------*/ +//-------------------------------------------------------------------------- +// plfshade front-ends. +// These specify the row-dominant function evaluator in the plfshade +// argument list. NO TRANSPOSE IS NECESSARY. The routines are as follows: +// +// - plshade0 map indices to xmin, xmax, ymin, ymax. +// The next two work by calling plfshade() with the appropriate grid +// structure for input to pltr2f(). +// - plshade1 linear interpolation from singly dimensioned coord arrays +// - plshade2 linear interpolation from doubly dimensioned coord arrays +// - plshade tr array transformation +// +//-------------------------------------------------------------------------- void PLSHADE07( PLFLT *z, PLINT *nx, PLINT *ny, const char *defined, @@ -277,14 +277,14 @@ PLfGrid data; -/* Fill a grid data structure to hold the fortran z array. */ +// Fill a grid data structure to hold the fortran z array. data.f = z; data.nx = *lx; data.ny = *ny; -/* Call plfshade to do the actual work - plf2evalr is the - interface that deals with the fortran data organisation */ +// Call plfshade to do the actual work - plf2evalr is the +// interface that deals with the fortran data organisation plfshade( plf2evalr, &data, NULL, NULL, *nx, *ny, *xmin, *xmax, *ymin, *ymax, @@ -293,14 +293,14 @@ *min_color, *min_width, *max_color, *max_width, c_plfill, rect, NULL, NULL ); -/* Clean up memory allocated for a */ -/* - plFree2dGrid( a, *nx, *ny ); -*/ +// Clean up memory allocated for a +// +// plFree2dGrid( a, *nx, *ny ); +// } -/* 1-d transformation */ +// 1-d transformation void PLSHADE17( PLFLT *z, PLINT *nx, PLINT *ny, const char *defined, @@ -315,20 +315,20 @@ PLfGrid data; PLcGrid cgrid; -/* Fill a grid data structure to hold the coordinate arrays. */ +// Fill a grid data structure to hold the coordinate arrays. cgrid.nx = *nx; cgrid.ny = *ny; cgrid.xg = xg1; cgrid.yg = yg1; -/* Fill a grid data structure to hold the fortran z array. */ +// Fill a grid data structure to hold the fortran z array. data.f = z; data.nx = *lx; data.ny = *ny; -/* Call plfshade to do the actual work - plf2evalr is the - interface that deals with the fortran data organisation. */ +// Call plfshade to do the actual work - plf2evalr is the +// interface that deals with the fortran data organisation. plfshade( plf2evalr, &data, NULL, NULL, *nx, *ny, *xmin, *xmax, *ymin, *ymax, @@ -338,7 +338,7 @@ c_plfill, rect, pltr1, ( PLPointer ) & cgrid ); } -/* 2-d transformation */ +// 2-d transformation void PLSHADE27( PLFLT *z, PLINT *nx, PLINT *ny, const char *defined, @@ -353,19 +353,19 @@ PLfGrid data; PLcGrid cgrid; -/* Fill a grid data structure to hold the coordinate arrays. */ +// Fill a grid data structure to hold the coordinate arrays. cgrid.nx = *lx; cgrid.ny = *ny; cgrid.xg = xg2; cgrid.yg = yg2; -/* Fill a grid data structure to hold the fortran z array. */ +// Fill a grid data structure to hold the fortran z array. data.f = z; data.nx = *lx; data.ny = *ny; -/* Call plfshade to do the actual work - plf2evalr is the - interface that deals with the fortran data organisation. */ +// Call plfshade to do the actual work - plf2evalr is the +// interface that deals with the fortran data organisation. plfshade( plf2evalr, &data, NULL, NULL, *nx, *ny, *xmin, *xmax, *ymin, *ymax, @@ -386,13 +386,13 @@ PLINT rect = 1; PLfGrid data; -/* Fill a grid data structure to hold the fortran z array. */ +// Fill a grid data structure to hold the fortran z array. data.f = z; data.nx = *lx; data.ny = *ny; -/* Call plfshade to do the actual work - plf2evalr is the - interface that deals with the fortran data organisation. */ +// Call plfshade to do the actual work - plf2evalr is the +// interface that deals with the fortran data organisation. plfshade( plf2evalr, &data, NULL, NULL, *nx, *ny, *xmin, *xmax, *ymin, *ymax, @@ -402,15 +402,15 @@ c_plfill, rect, pltr, ( PLPointer ) ftr ); } -/*----------------------------------------------------------------------*\ - * plshades front-ends. - * - * - plshades0 map indices to xmin, xmax, ymin, ymax - * - plshades1 linear interpolation from singly dimensioned coord arrays - * - plshades2 linear interpolation from doubly dimensioned coord arrays - * - plshades pass tr information with plplot common block (and - * then pass tr as last argument of PLSHADES7) - \*----------------------------------------------------------------------*/ +//-------------------------------------------------------------------------- +// plshades front-ends. +// +// - plshades0 map indices to xmin, xmax, ymin, ymax +// - plshades1 linear interpolation from singly dimensioned coord arrays +// - plshades2 linear interpolation from doubly dimensioned coord arrays +// - plshades pass tr information with plplot common block (and +// then pass tr as last argument of PLSHADES7) +//-------------------------------------------------------------------------- void PLSHADES07( PLFLT *z, PLINT *nx, PLINT *ny, const char *defined, @@ -421,13 +421,13 @@ PLINT rect = 1; PLfGrid2 data; -/* Fill a grid data structure to hold the fortran z array. */ +// Fill a grid data structure to hold the fortran z array. data.f = (PLFLT **) z; data.nx = *lx; data.ny = *ny; -/* Call plfshades to do the actual work - plf2ops_col_major() returns a collection - of functions to access the data in fortran style. */ +// Call plfshades to do the actual work - plf2ops_col_major() returns a collection +// of functions to access the data in fortran style. plfshades( plf2ops_grid_col_major(), &data, *nx, *ny, NULL, *xmin, *xmax, *ymin, *ymax, clevel, *nlevel, *fill_width, @@ -446,19 +446,19 @@ PLfGrid2 data; PLcGrid cgrid; -/* Fill a grid data structure to hold the fortran z array. */ +// Fill a grid data structure to hold the fortran z array. data.f = (PLFLT **) z; data.nx = *lx; data.ny = *ny; -/* Fill a grid data structure to hold the coordinate arrays. */ +// Fill a grid data structure to hold the coordinate arrays. cgrid.nx = *nx; cgrid.ny = *ny; cgrid.xg = xg1; cgrid.yg = yg1; -/* Call plfshades to do the actual work - plf2ops_col_major() returns a collection - of functions to access the data in fortran style. */ +// Call plfshades to do the actual work - plf2ops_col_major() returns a collection +// of functions to access the data in fortran style. plfshades( plf2ops_grid_col_major(), &data, *nx, *ny, NULL, *xmin, *xmax, *ymin, *ymax, clevel, *nlevel, *fill_width, @@ -477,19 +477,19 @@ PLfGrid2 data; PLcGrid cgrid; -/* Fill a grid data structure to hold the fortran z array. */ +// Fill a grid data structure to hold the fortran z array. data.f = (PLFLT **) z; data.nx = *lx; data.ny = *ny; -/* Fill a grid data structure to hold the coordinate arrays. */ +// Fill a grid data structure to hold the coordinate arrays. cgrid.nx = *lx; cgrid.ny = *ny; cgrid.xg = xg2; cgrid.yg = yg2; -/* Call plfshades to do the actual work - plf2ops_col_major() returns a collection - of functions to access the data in fortran style. */ +// Call plfshades to do the actual work - plf2ops_col_major() returns a collection +// of functions to access the data in fortran style. plfshades( plf2ops_grid_col_major(), &data, *nx, *ny, NULL, *xmin, *xmax, *ymin, *ymax, clevel, *nlevel, *fill_width, @@ -506,13 +506,13 @@ PLINT rect = 1; PLfGrid2 data; -/* Fill a grid data structure to hold the fortran z array. */ +// Fill a grid data structure to hold the fortran z array. data.f = (PLFLT **) z; data.nx = *lx; data.ny = *ny; -/* Call plfshades to do the actual work - plf2ops_col_major() returns a collection - of functions to access the data in fortran style. */ +// Call plfshades to do the actual work - plf2ops_col_major() returns a collection +// of functions to access the data in fortran style. plfshades( plf2ops_grid_col_major(), &data, *nx, *ny, NULL, *xmin, *xmax, *ymin, *ymax, clevel, *nlevel, *fill_width, @@ -542,7 +542,7 @@ } } -/* Clean up memory allocated for a */ +// Clean up memory allocated for a plFree2dGrid( a, *nptsx, *nptsy ); } Modified: trunk/bindings/f77/scstubs.c =================================================================== --- trunk/bindings/f77/scstubs.c 2010-11-01 22:15:20 UTC (rev 11294) +++ trunk/bindings/f77/scstubs.c 2010-11-01 22:19:45 UTC (rev 11295) @@ -1,31 +1,31 @@ -/* $Id$ - * - * C stub routines. - * - * 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 - * - * - * The stubs contained here are the ones that are relatively simple, - * i.e. involving only a call convention change or integer-to-string - * conversion. Exceptions are plparseopts and plstripc which have - * a few more complications in them. - */ +// $Id$ +// +// C stub routines. +// +// 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 +// +// +// The stubs contained here are the ones that are relatively simple, +// i.e. involving only a call convention change or integer-to-string +// conversion. Exceptions are plparseopts and plstripc which have +// a few more complications in them. +// #include "plstubs.h" @@ -34,13 +34,13 @@ #else #define STDCALL #endif -static void ( STDCALL *plmapform )( PLINT *, PLFLT *, PLFLT * ); /* Note: slightly different prototype than - * (*mapform)! */ -/* Slightly different to (*label_func) as we don't support PLPointer for - * additional data in f77. - * Note the hidden argument! */ +static void ( STDCALL *plmapform )( PLINT *, PLFLT *, PLFLT * ); // Note: slightly different prototype than + // (*mapform)! +// Slightly different to (*label_func) as we don't support PLPointer for +// additional data in f77. +// Note the hidden argument! static void ( STDCALL *pllabelfunc )( PLINT *, PLFLT *, char *, PLINT *, PLINT ); -/* Slightly different to C version as we don't support PLPointer for additional data */ +// Slightly different to C version as we don't support PLPointer for additional data static void ( STDCALL *pltransform )( PLFLT *, PLFLT *, PLFLT *, PLFLT * ); static void @@ -164,7 +164,7 @@ c_plcol1( *col ); } -/* The old way, same as plcol0 */ +// The old way, same as plcol0 void PLCOL( PLINT *icol ) @@ -336,9 +336,9 @@ c_plgfam( fam, num, bmax ); } -/* Note: Fortran does not distinguish between unsigned and signed integers - * so the 32-bit PLUNICODE can be mapped to 4-byte Fortran integer outside - * this routine. */ +// Note: Fortran does not distinguish between unsigned and signed integers +// so the 32-bit PLUNICODE can be mapped to 4-byte Fortran integer outside +// this routine. void PLGFCI( PLUNICODE *pfci ) { @@ -497,12 +497,12 @@ { int i; - /* (AM) Note the hidden argument "length" - it ensures that the string "label" - * is recognised to have that length - */ + // (AM) Note the hidden argument "length" - it ensures that the string "label" + // is recognised to have that length + // ( *pllabelfunc )( &axis, &value, label, &length, length ); - /* Ensure string is null terminated */ + // Ensure string is null terminated i = length - 1; while ( ( i >= 0 ) && ( label[i] == ' ' ) ) i--; @@ -582,7 +582,7 @@ void PLPARSEOPTS7( int *numargs, const char *iargs, PLINT *mode, PLINT *maxindex ) { -/* Same as in plparseopts fortran subroutine that calls this one. */ +// Same as in plparseopts fortran subroutine that calls this one. #define MAXARGS 20 if ( *numargs <= MAXARGS ) { @@ -591,7 +591,7 @@ for ( i = 0; i < *numargs; i++ ) { argv[i] = iargs + ( i * *maxindex ); -/* fprintf(stderr, "%d - %s\n", i, argv[i]); */ +// fprintf(stderr, "%d - %s\n", i, argv[i]); } c_plparseopts( numargs, argv, *mode ); } @@ -823,8 +823,8 @@ c_plsesc( (char) *esc ); } -/* Auxiliary routine - not to be used publicly - */ +// Auxiliary routine - not to be used publicly +// #define PLSETMAPFORMC FNAME( PLSETMAPFORMC, plsetmapformc ) #define PLCLEARMAPFORMC FNAME( PLCLEARMAPFORMC, plclearmapformc ) void @@ -851,9 +851,9 @@ c_plsfam( *fam, *num, *bmax ); } -/* Note: Fortran does not distinguish between unsigned and signed integers - * so the 32-bit PLUNICODE can be mapped to 4-byte Fortran integer outside - * this routine. */ +// Note: Fortran does not distinguish between unsigned and signed integers +// so the 32-bit PLUNICODE can be mapped to 4-byte Fortran integer outside +// this routine. void PLSFCI( PLUNICODE *fci ) { @@ -876,7 +876,7 @@ PLSLABELFUNC( void ( STDCALL *labelfunc )( PLINT *, PLFLT *, char *, PLINT * ) ) { pllabelfunc = labelfunc; - /* N.B. neglect pointer to additional data for f77 */ + // N.B. neglect pointer to additional data for f77 c_plslabelfunc( pllabelfuncf2c, NULL ); } @@ -977,7 +977,7 @@ PLSTRANSFORM( void ( STDCALL *transformfunc )( PLFLT *, PLFLT *, PLFLT *, PLFLT * ) ) { pltransform = transformfunc; - /* N.B. neglect pointer to additional data for f77 */ + // N.B. neglect pointer to additional data for f77 c_plstransform( pltransformf2c, NULL ); } Modified: trunk/bindings/f95/plstubs.h =================================================================== --- trunk/bindings/f95/plstubs.h 2010-11-01 22:15:20 UTC (rev 11294) +++ trunk/bindings/f95/plstubs.h 2010-11-01 22:19:45 UTC (rev 11295) @@ -1,52 +1,52 @@ -/* $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. - */ +// $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. +// #ifndef __PLSTUBS_H__ #define __PLSTUBS_H__ #include "plplotP.h" -/*----------------------------------------------------------------------*\ - * Select name transformation based on system type. - * - * Define the STUB_LINKAGE flag to get proper C<->Fortran linkage on your - * system. This flag describes what the compiler does to Fortran routine - * names, which we must duplicate on the C stubs so that the Fortran - * routines may call them. You can often set STUB_LINKAGE by the - * construct -DSTUB_LINKAGE=<value> on the C compiler command line, but - * it is best to either rely on the default or explicitly handle your - * system below. - * - * Current choices for STUB_LINKAGE: - * - * STUB_LAU lower-case, append underscore - * STUB_L lower-case - * STUB_U upper-case - * STUB_FORTRAN use "fortran" keyword (MS-DOS convention) - * - * If no choice is made, the default is set to STUB_LAU. This should - * handle most generic Unix boxes not already accounted for. - * - * ** Namespace collision ** - * - * If you use the STUB_L option, the C & Fortran namespaces will collide - * if the Fortran compiler does lower case folding (they usually do). - * The problem is then that the stub names and actual function names will - * be exactly the same, if we insist on the Fortran and C bindings to be - * similar. The solution is to give the externally callable C routines - * unique names, and provide macros to turn the documented entry names in - * 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. - \*----------------------------------------------------------------------*/ +//-------------------------------------------------------------------------- +// Select name transformation based on system type. +// +// Define the STUB_LINKAGE flag to get proper C<->Fortran linkage on your +// system. This flag describes what the compiler does to Fortran routine +// names, which we must duplicate on the C stubs so that the Fortran +// routines may call them. You can often set STUB_LINKAGE by the +// construct -DSTUB_LINKAGE=<value> on the C compiler command line, but +// it is best to either rely on the default or explicitly handle your +// system below. +// +// Current choices for STUB_LINKAGE: +// +// STUB_LAU lower-case, append underscore +// STUB_L lower-case +// STUB_U upper-case +// STUB_FORTRAN use "fortran" keyword (MS-DOS convention) +// +// If no choice is made, the default is set to STUB_LAU. This should +// handle most generic Unix boxes not already accounted for. +// +// ** Namespace collision ** +// +// If you use the STUB_L option, the C & Fortran namespaces will collide +// if the Fortran compiler does lower case folding (they usually do). +// The problem is then that the stub names and actual function names will +// be exactly the same, if we insist on the Fortran and C bindings to be +// similar. The solution is to give the externally callable C routines +// unique names, and provide macros to turn the documented entry names in +// 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 @@ -58,42 +58,42 @@ #ifndef STUB_LINKAGE -#if defined ( SX ) /* NEC Super-UX (SX-3) */ +#if defined ( SX ) // NEC Super-UX (SX-3) #define STUB_LINKAGE STUB_LAU #endif -#if defined ( _IBMR2 ) && defined ( _AIX ) /* AIX */ +#if defined ( _IBMR2 ) && defined ( _AIX ) // AIX #define STUB_LINKAGE STUB_L #endif -#ifdef __hpux /* HP/UX */ +#ifdef __hpux // HP/UX #define STUB_LINKAGE STUB_L #endif -#ifdef __mips /* IRIX (SGI systems) */ +#ifdef __mips // IRIX (SGI systems) #define STUB_LINKAGE STUB_LAU #endif -#ifdef sun /* Suns */ +#ifdef sun // Suns #define STUB_LINKAGE STUB_LAU #endif -#ifdef CRAY /* Cray/UNICOS */ +#ifdef CRAY // Cray/UNICOS #define STUB_LINKAGE STUB_U #endif -#if defined ( __alpha ) && defined ( __osf__ ) /* DEC Alpha AXP/OSF */ +#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 /* MS-DOS based */ -#ifdef IVF /* Intel Visual Fortran */ +#ifdef WIN32 // MS-DOS based +#ifdef IVF // Intel Visual Fortran #define STUB_LINKAGE STUB_IVF #elif defined ( CVF ) #define STUB_LINKAGE STUB_U @@ -104,21 +104,21 @@ #elif defined ( __GNUC__ ) #define STUB_LINKAGE STUB_MINGW #endif -#elif defined ( MSDOS ) /* MS-DOS based */ +#elif defined ( MSDOS ) // MS-DOS based #define STUB_LINKAGE STUB_FORTRAN -#endif /* Windows 32-bit */ +#endif // Windows 32-bit -#ifndef STUB_LINKAGE /* The default */ +#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 adaptable to virtually any system. - \*----------------------------------------------------------------------*/ +//-------------------------------------------------------------------------- +// Define name-translation macro. +// To use, define with x the upper case routine name, y the lower case. +// Should be adaptable to virtually any system. +//-------------------------------------------------------------------------- #if STUB_LINKAGE == STUB_LAU #define FNAME( x, y ) PLDLLIMPEXP_F95C y ## _ @@ -152,19 +152,19 @@ #error "Illegal setting for STUB_LINKAGE" #endif -/*----------------------------------------------------------------------*\ - * Now to actually define the stub names. - * Each stub must have an entry here. - \*----------------------------------------------------------------------*/ +//-------------------------------------------------------------------------- +// 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 - * g77, "This is done to ensure compatibility with code produced by many - * UNIX Fortran compilers." However, other fortran compilers do not have - * this default naming scheme so to avoid trouble I have #defined two - * variations of the embedded underscore names, one with and one without - * the extra trailing underscore. - */ +// N.B. By default the g77 compiler appends second underscore to name if +// the original name contains any underscore at all. According to info +// g77, "This is done to ensure compatibility with code produced by many +// UNIX Fortran compilers." However, other fortran compilers do not have +// this default naming scheme so to avoid trouble I have #defined two +// variations of the embedded underscore names, one with and one without +// the extra trailing underscore. +// #define PL_SETCONTLABELFORMAT FNAME( PL_SETCONTLABELFORMAT, pl_setcontlabelformat ) #define PL_SETCONTLABELFORMATa FNAME( PL_SETCONTLABELFORMAT_, pl_setcontlabelformat_ ) @@ -367,4 +367,4 @@ #define PLWIND FNAME( PLWIND, plwind ) #define PLXORMOD FNAME( PLXORMODF77, plxormodf77 ) -#endif /* __PLSTUBS_H__ */ +#endif // __PLSTUBS_H__ Modified: trunk/bindings/f95/sc3d.c =================================================================== --- trunk/bindings/f95/sc3d.c 2010-11-01 22:15:20 UTC (rev 11294) +++ trunk/bindings/f95/sc3d.c 2010-11-01 22:19:45 UTC (rev 11295) @@ -1,26 +1,26 @@ -/* $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 - * - */ +// $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 +// +// #include "plstubs.h" @@ -32,7 +32,7 @@ PLFLT ** a; int i, j; -/* Create a vectored a array from transpose of the fortran z array. */ +// Create a vectored a array from transpose of the fortran z array. plAlloc2dGrid( &a, *nx, *ny ); for ( i = 0; i < *nx; i++ ) { @@ -44,7 +44,7 @@ c_plot3dc( x, y, a, *nx, *ny, *opt, clevel, *nlevel ); -/* Clean up memory allocated for a */ +// Clean up memory allocated for a plFree2dGrid( a, *nx, *ny ); } @@ -64,10 +64,10 @@ 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. */ + // 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. if ( !( temp = (PLFLT **) malloc( (size_t) *nx * sizeof ( PLFLT * ) ) ) ) { Modified: trunk/bindings/f95/sccont.c =================================================================== --- trunk/bindings/f95/sccont.c 2010-11-01 22:15:20 UTC (rev 11294) +++ trunk/bindings/f95/sccont.c 2010-11-01 22:19:45 UTC (rev 11295) @@ -1,36 +1,36 @@ -/* $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 - * - */ +// $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 +// +// #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 ) @@ -39,20 +39,20 @@ *ty = y + 1.0; } -/*----------------------------------------------------------------------*\ - * 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 */ +// no transformation void PLCON07( PLFLT *z, PLINT *nx, PLINT *ny, PLINT *kx, PLINT *lx, @@ -69,7 +69,7 @@ pltr0f, NULL ); } -/* 1-d transformation */ +// 1-d transformation void PLCON17( PLFLT *z, PLINT *nx, PLINT *ny, PLINT *kx, PLINT *lx, @@ -93,7 +93,7 @@ pltr1, (void *) &cgrid ); } -/* 2-d transformation */ +// 2-d transformation void PLCON27( PLFLT *z, PLINT *nx, PLINT *ny, PLINT *kx, PLINT *lx, @@ -117,20 +117,20 @@ 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 */ +// no transformation void PLVEC07( PLFLT *u, PLFLT *v, PLINT *nx, PLINT *ny, PLFLT *scale ) @@ -149,7 +149,7 @@ *nx, *ny, *scale, pltr0f, NULL ); } -/* 1-d transformation */ +// 1-d transformation void PLVEC17( PLFLT *u, PLFLT *v, PLINT *nx, PLINT *ny, PLFLT *scale, @@ -176,7 +176,7 @@ *nx, *ny, *scale, pltr1, (void *) &cgrid ); } -/* 2-d transformation */ +// 2-d transformation void PLVEC27( PLFLT *u, PLFLT *v, PLINT *nx, PLINT *ny, PLFLT *scale, @@ -203,9 +203,9 @@ *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 ) @@ -251,19 +251,19 @@ pltr, (void *) ftr ); } -/*----------------------------------------------------------------------*\ - * plfshade front-ends. - * These specify the row-dominant function evaluator in the plfshade - * argument list. NO TRANSPOSE IS NECESSARY. The routines are as follows: - * - * - plshade0 map indices to xmin, xmax, ymin, ymax. - * The next two work by calling plfshade() with the appropriate grid - * structure for input to pltr2f(). - * - plshade1 linear interpolation from singly dimensioned coord arrays - * - plshade2 linear interpolation from doubly dimensioned coord arrays - * - plshade tr array transformation - * - \*----------------------------------------------------------------------*/ +//-------------------------------------------------------------------------- +// plfshade front-ends. +// These specify the row-dominant function evaluator in the plfshade +// argument list. NO TRANSPOSE IS NECESSARY. The routines are as follows: +// +// - plshade0 map indices to xmin, xmax, ymin, ymax. +// The next two work by calling plfshade() with the appropriate grid +// structure for input to pltr2f(). +// - plshade1 linear interpolation from singly dimensioned coord arrays +// - plshade2 linear interpolation from doubly dimensioned coord arrays +// - plshade tr array transformation +// +//-------------------------------------------------------------------------- void PLSHADE07( PLFLT *z, PLINT *nx, PLINT *ny, const char *defined, @@ -277,7 +277,7 @@ PLFLT ** a; int i, j; -/* Create a vectored a array from transpose of the fortran z array. */ +// Create a vectored a array from transpose of the fortran z array. plAlloc2dGrid( &a, *nx, *ny ); for ( i = 0; i < *nx; i++ ) { @@ -294,12 +294,12 @@ *min_color, *min_width, *max_color, *max_width, c_plfill, rect, NULL, NULL ); -/* Clean up memory allocated for a */ +// Clean up memory allocated for a plFree2dGrid( a, *nx, *ny ); } -/* 1-d transformation */ +// 1-d transformation void PLSHADE17( PLFLT *z, PLINT *nx, PLINT *ny, const char *defined, @@ -315,7 +315,7 @@ int i, j; PLcGrid cgrid; -/* Create a vectored a array from transpose of the fortran z array. */ +// Create a vectored a array from transpose of the fortran z array. plAlloc2dGrid( &a, *nx, *ny ); for ( i = 0; i < *nx; i++ ) { @@ -336,11 +336,11 @@ *min_color, *min_width, *max_color, *max_width, c_plfill, rect, pltr1, ( PLPointer ) & cgrid ); -/* Clean up memory allocated for a */ +// Clean up memory allocated for a plFree2dGrid( a, *nx, *ny ); } -/* 2-d transformation */ +// 2-d transformation void PLSHADE27( PLFLT *z, PLINT *nx, PLINT *ny, const char *defined, @@ -356,7 +356,7 @@ int i, j; PLcGrid2 cgrid2; -/* Create a vectored a array from transpose of the fortran z array. */ +// Create a vectored a array from transpose of the fortran z array. plAlloc2dGrid( &a, *nx, *ny ); plAlloc2dGrid( &cgrid2.xg, *nx, *ny ); plAlloc2dGrid( &cgrid2.yg, *nx, *ny ); @@ -379,7 +379,7 @@ *min_color, *min_width, *max_color, *max_width, c_plfill, rect, pltr2, (void *) &cgrid2 ); -/* Clean up memory allocated for a */ +// Clean up memory allocated for a plFree2dGrid( a, *nx, *ny ); plFree2dGrid( cgrid2.xg, *nx, *ny ); plFree2dGrid( cgrid2.yg, *nx, *ny ); @@ -397,7 +397,7 @@ PLFLT ** a; int i, j; -/* Create a vectored a array from transpose of the fortran z array. */ +// Create a vectored a array from transpose of the fortran z array. plAlloc2dGrid( &a, *nx, *ny ); for ( i = 0; i < *nx; i++ ) { @@ -414,19 +414,19 @@ *min_color, *min_width, *max_color, *max_width, c_plfill, rect, pltr, (void *) ftr ); -/* Clean up memory allocated for a */ +// Clean up memory allocated for a plFree2dGrid( a, *nx, *ny ); } -/*----------------------------------------------------------------------*\ - * plshades front-ends. - * - * - plshades0 map indices to xmin, xmax, ymin, ymax - * - plshades1 linear inter... [truncated message content] |