From: <and...@us...> - 2011-10-19 14:43:34
|
Revision: 11977 http://plplot.svn.sourceforge.net/plplot/?rev=11977&view=rev Author: andrewross Date: 2011-10-19 14:43:26 +0000 (Wed, 19 Oct 2011) Log Message: ----------- Clean up f95 bindings to get rid of compiler warnings and make them more standards compliant. Modified Paths: -------------- trunk/bindings/f95/configurable.f90 trunk/bindings/f95/global_defines.sed trunk/bindings/f95/plplot_parameters.h trunk/bindings/f95/sc3d.c trunk/bindings/f95/sccont.c trunk/bindings/f95/scstubs.c trunk/bindings/f95/sfstubs.f90 trunk/bindings/f95/sfstubsf95.f90 trunk/bindings/f95/strutil.f90 trunk/examples/f95/plf95demos.inc.cmake trunk/examples/f95/x03f.f90 trunk/examples/f95/x11f.f90 trunk/examples/f95/x14f.f90 trunk/examples/f95/x17f.f90 trunk/examples/f95/x18f.f90 trunk/examples/f95/x19f.f90 trunk/examples/f95/x20f.f90 trunk/examples/f95/x21f.f90 trunk/examples/f95/x22f.f90 trunk/examples/f95/x23f.f90 trunk/examples/f95/x29f.f90 trunk/examples/f95/x30f.f90 trunk/examples/f95/x31f.f90 Removed Paths: ------------- trunk/bindings/f95/sfstubs.h Modified: trunk/bindings/f95/configurable.f90 =================================================================== --- trunk/bindings/f95/configurable.f90 2011-10-19 11:08:56 UTC (rev 11976) +++ trunk/bindings/f95/configurable.f90 2011-10-19 14:43:26 UTC (rev 11977) @@ -19,14 +19,14 @@ ! Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA subroutine plparseopts(mode) + use plplot implicit none - include 'sfstubs.h' - integer mode - integer maxargs, iargs, numargs, index, maxindex, iargc, islen + integer :: mode + integer :: maxargs, iargs, numargs, index, maxindex, iargc, islen parameter(maxindex = maxlen/4) parameter (maxargs=20) - character*(maxlen) arg - integer*4 iargsarr(maxindex, maxargs) + character (len=maxlen) :: arg + integer, dimension(maxindex, maxargs) :: iargsarr ! write(0,'(a)') 'plparseopts not implemented on this fortran'// ! & ' platform because iargc or getarg are not available' numargs = iargc() Modified: trunk/bindings/f95/global_defines.sed =================================================================== --- trunk/bindings/f95/global_defines.sed 2011-10-19 11:08:56 UTC (rev 11976) +++ trunk/bindings/f95/global_defines.sed 2011-10-19 14:43:26 UTC (rev 11977) @@ -40,4 +40,5 @@ /^#define/ s?^#define *\(PL_NOTSET\)[ (]*\([^ ]*\)[ )]*\(.*\)$? real(kind=plflt), parameter :: \1 = \2.0_plflt\3\n real(kind=plflt), parameter :: PL_PI = 3.1415926535897932384_plflt\n real(kind=plflt), parameter :: PL_TWOPI = 2.0_plflt*PL_PI? +/^#define/ s?^#define *\([^ ]*\)[ (]*\([oz][^ ]*\)[ )]*\(.*\)$? integer :: \1 \3\n data \1 / \2 /? /^#define/ s?^#define *\([^ ]*\)[ (]*\([^ ]*\)[ )]*\(.*\)$? integer, parameter :: \1 = \2 \3? Modified: trunk/bindings/f95/plplot_parameters.h =================================================================== --- trunk/bindings/f95/plplot_parameters.h 2011-10-19 11:08:56 UTC (rev 11976) +++ trunk/bindings/f95/plplot_parameters.h 2011-10-19 14:43:26 UTC (rev 11977) @@ -29,16 +29,26 @@ integer, parameter :: PLESC_HAS_TEXT = 20 ! driver draws text integer, parameter :: PLESC_IMAGE = 21 ! handle image integer, parameter :: PLESC_IMAGEOPS = 22 ! plimage related operations - integer, parameter :: DRAW_LINEX = z'01' ! draw lines parallel to the X axis - integer, parameter :: DRAW_LINEY = z'02' ! draw lines parallel to the Y axis - integer, parameter :: DRAW_LINEXY = z'03' ! draw lines parallel to both the X and Y axes - integer, parameter :: MAG_COLOR = z'04' ! draw the mesh with a color dependent of the magnitude - integer, parameter :: BASE_CONT = z'08' ! draw contour plot at bottom xy plane - integer, parameter :: TOP_CONT = z'10' ! draw contour plot at top xy plane - integer, parameter :: SURF_CONT = z'20' ! draw contour plot at surface - integer, parameter :: DRAW_SIDES = z'40' ! draw sides - integer, parameter :: FACETED = z'80' ! draw outline for each square that makes up the surface - integer, parameter :: MESH = z'100' ! draw mesh + integer :: DRAW_LINEX ! draw lines parallel to the X axis + data DRAW_LINEX / z'01' / + integer :: DRAW_LINEY ! draw lines parallel to the Y axis + data DRAW_LINEY / z'02' / + integer :: DRAW_LINEXY ! draw lines parallel to both the X and Y axes + data DRAW_LINEXY / z'03' / + integer :: MAG_COLOR ! draw the mesh with a color dependent of the magnitude + data MAG_COLOR / z'04' / + integer :: BASE_CONT ! draw contour plot at bottom xy plane + data BASE_CONT / z'08' / + integer :: TOP_CONT ! draw contour plot at top xy plane + data TOP_CONT / z'10' / + integer :: SURF_CONT ! draw contour plot at surface + data SURF_CONT / z'20' / + integer :: DRAW_SIDES ! draw sides + data DRAW_SIDES / z'40' / + integer :: FACETED ! draw outline for each square that makes up the surface + data FACETED / z'80' / + integer :: MESH ! draw mesh + data MESH / z'100' / integer, parameter :: PL_BIN_DEFAULT = 0 integer, parameter :: PL_BIN_CENTRED = 1 integer, parameter :: PL_BIN_NOEXPAND = 2 @@ -79,43 +89,79 @@ integer, parameter :: PL_X_AXIS = 1 ! The x-axis integer, parameter :: PL_Y_AXIS = 2 ! The y-axis integer, parameter :: PL_Z_AXIS = 3 ! The z-axis - integer, parameter :: PL_OPT_ENABLED = z'0001' ! Obsolete - integer, parameter :: PL_OPT_ARG = z'0002' ! Option has an argment - integer, parameter :: PL_OPT_NODELETE = z'0004' ! Don't delete after processing - integer, parameter :: PL_OPT_INVISIBLE = z'0008' ! Make invisible - integer, parameter :: PL_OPT_DISABLED = z'0010' ! Processing is disabled - integer, parameter :: PL_OPT_FUNC = z'0100' ! Call handler function - integer, parameter :: PL_OPT_BOOL = z'0200' ! Set *var = 1 - integer, parameter :: PL_OPT_INT = z'0400' ! Set *var = atoi(optarg) - integer, parameter :: PL_OPT_FLOAT = z'0800' ! Set *var = atof(optarg) - integer, parameter :: PL_OPT_STRING = z'1000' ! Set var = optarg - integer, parameter :: PL_PARSE_PARTIAL = z'0000' ! For backward compatibility - integer, parameter :: PL_PARSE_FULL = z'0001' ! Process fully & exit if error - integer, parameter :: PL_PARSE_QUIET = z'0002' ! Don't issue messages - integer, parameter :: PL_PARSE_NODELETE = z'0004' ! Don't delete options after - integer, parameter :: PL_PARSE_SHOWALL = z'0008' ! Show invisible options - integer, parameter :: PL_PARSE_OVERRIDE = z'0010' ! Obsolete - integer, parameter :: PL_PARSE_NOPROGRAM = z'0020' ! Program name NOT in *argv[0].. - integer, parameter :: PL_PARSE_NODASH = z'0040' ! Set if leading dash NOT required - integer, parameter :: PL_PARSE_SKIP = z'0080' ! Skip over unrecognized args + integer :: PL_OPT_ENABLED ! Obsolete + data PL_OPT_ENABLED / z'0001' / + integer :: PL_OPT_ARG ! Option has an argment + data PL_OPT_ARG / z'0002' / + integer :: PL_OPT_NODELETE ! Don't delete after processing + data PL_OPT_NODELETE / z'0004' / + integer :: PL_OPT_INVISIBLE ! Make invisible + data PL_OPT_INVISIBLE / z'0008' / + integer :: PL_OPT_DISABLED ! Processing is disabled + data PL_OPT_DISABLED / z'0010' / + integer :: PL_OPT_FUNC ! Call handler function + data PL_OPT_FUNC / z'0100' / + integer :: PL_OPT_BOOL ! Set *var = 1 + data PL_OPT_BOOL / z'0200' / + integer :: PL_OPT_INT ! Set *var = atoi(optarg) + data PL_OPT_INT / z'0400' / + integer :: PL_OPT_FLOAT ! Set *var = atof(optarg) + data PL_OPT_FLOAT / z'0800' / + integer :: PL_OPT_STRING ! Set var = optarg + data PL_OPT_STRING / z'1000' / + integer :: PL_PARSE_PARTIAL ! For backward compatibility + data PL_PARSE_PARTIAL / z'0000' / + integer :: PL_PARSE_FULL ! Process fully & exit if error + data PL_PARSE_FULL / z'0001' / + integer :: PL_PARSE_QUIET ! Don't issue messages + data PL_PARSE_QUIET / z'0002' / + integer :: PL_PARSE_NODELETE ! Don't delete options after + data PL_PARSE_NODELETE / z'0004' / + integer :: PL_PARSE_SHOWALL ! Show invisible options + data PL_PARSE_SHOWALL / z'0008' / + integer :: PL_PARSE_OVERRIDE ! Obsolete + data PL_PARSE_OVERRIDE / z'0010' / + integer :: PL_PARSE_NOPROGRAM ! Program name NOT in *argv[0].. + data PL_PARSE_NOPROGRAM / z'0020' / + integer :: PL_PARSE_NODASH ! Set if leading dash NOT required + data PL_PARSE_NODASH / z'0040' / + integer :: PL_PARSE_SKIP ! Skip over unrecognized args + data PL_PARSE_SKIP / z'0080' / integer, parameter :: PL_FCI_MARK = ishft(1,31) - integer, parameter :: PL_FCI_IMPOSSIBLE = z'00000000' - integer, parameter :: PL_FCI_HEXDIGIT_MASK = z'f' - integer, parameter :: PL_FCI_HEXPOWER_MASK = z'7' - integer, parameter :: PL_FCI_HEXPOWER_IMPOSSIBLE = z'f' - integer, parameter :: PL_FCI_FAMILY = z'0' - integer, parameter :: PL_FCI_STYLE = z'1' - integer, parameter :: PL_FCI_WEIGHT = z'2' - integer, parameter :: PL_FCI_SANS = z'0' - integer, parameter :: PL_FCI_SERIF = z'1' - integer, parameter :: PL_FCI_MONO = z'2' - integer, parameter :: PL_FCI_SCRIPT = z'3' - integer, parameter :: PL_FCI_SYMBOL = z'4' - integer, parameter :: PL_FCI_UPRIGHT = z'0' - integer, parameter :: PL_FCI_ITALIC = z'1' - integer, parameter :: PL_FCI_OBLIQUE = z'2' - integer, parameter :: PL_FCI_MEDIUM = z'0' - integer, parameter :: PL_FCI_BOLD = z'1' + integer :: PL_FCI_IMPOSSIBLE + data PL_FCI_IMPOSSIBLE / z'00000000' / + integer :: PL_FCI_HEXDIGIT_MASK + data PL_FCI_HEXDIGIT_MASK / z'f' / + integer :: PL_FCI_HEXPOWER_MASK + data PL_FCI_HEXPOWER_MASK / z'7' / + integer :: PL_FCI_HEXPOWER_IMPOSSIBLE + data PL_FCI_HEXPOWER_IMPOSSIBLE / z'f' / + integer :: PL_FCI_FAMILY + data PL_FCI_FAMILY / z'0' / + integer :: PL_FCI_STYLE + data PL_FCI_STYLE / z'1' / + integer :: PL_FCI_WEIGHT + data PL_FCI_WEIGHT / z'2' / + integer :: PL_FCI_SANS + data PL_FCI_SANS / z'0' / + integer :: PL_FCI_SERIF + data PL_FCI_SERIF / z'1' / + integer :: PL_FCI_MONO + data PL_FCI_MONO / z'2' / + integer :: PL_FCI_SCRIPT + data PL_FCI_SCRIPT / z'3' / + integer :: PL_FCI_SYMBOL + data PL_FCI_SYMBOL / z'4' / + integer :: PL_FCI_UPRIGHT + data PL_FCI_UPRIGHT / z'0' / + integer :: PL_FCI_ITALIC + data PL_FCI_ITALIC / z'1' / + integer :: PL_FCI_OBLIQUE + data PL_FCI_OBLIQUE / z'2' / + integer :: PL_FCI_MEDIUM + data PL_FCI_MEDIUM / z'0' / + integer :: PL_FCI_BOLD + data PL_FCI_BOLD / z'1' / integer, parameter :: PL_MAXKEY = 16 integer, parameter :: PL_MAXWINDOWS = 64 ! Max number of windows/page tracked real(kind=plflt), parameter :: PL_NOTSET = -42.0_plflt Modified: trunk/bindings/f95/sc3d.c =================================================================== --- trunk/bindings/f95/sc3d.c 2011-10-19 11:08:56 UTC (rev 11976) +++ trunk/bindings/f95/sc3d.c 2011-10-19 14:43:26 UTC (rev 11977) @@ -24,6 +24,24 @@ #include "plstubs.h" +// Function prototypes +void PLOT3DC__( PLFLT *x, PLFLT *y, PLFLT *z, + PLINT *nx, PLINT *ny, PLINT *opt, + PLFLT *clevel, PLINT *nlevel, PLINT *lx ); +void PLOT3DC( PLFLT *x, PLFLT *y, PLFLT *z, + PLINT *nx, PLINT *ny, PLINT *opt, + PLFLT *clevel, PLINT *nlevel, PLINT *lx ); +void PLSURF3D( PLFLT *x, PLFLT *y, PLFLT *z, + PLINT *nx, PLINT *ny, PLINT *opt, + PLFLT *clevel, PLINT *nlevel, PLINT *lx ); +void PLMESH( PLFLT *x, PLFLT *y, PLFLT *z, + PLINT *nx, PLINT *ny, PLINT *opt, PLINT *lx ); +void PLMESHC( PLFLT *x, PLFLT *y, PLFLT *z, + PLINT *nx, PLINT *ny, PLINT *opt, + PLFLT *clevel, PLINT *nlevel, PLINT *lx ); +void PLOT3D( PLFLT *x, PLFLT *y, PLFLT *z, + PLINT *nx, PLINT *ny, PLINT *opt, PLBOOL *side, PLINT *lx ); + void PLOT3DC__( PLFLT *x, PLFLT *y, PLFLT *z, PLINT *nx, PLINT *ny, PLINT *opt, Modified: trunk/bindings/f95/sccont.c =================================================================== --- trunk/bindings/f95/sccont.c 2011-10-19 11:08:56 UTC (rev 11976) +++ trunk/bindings/f95/sccont.c 2011-10-19 14:43:26 UTC (rev 11977) @@ -24,6 +24,93 @@ #include "plstubs.h" +// Function prototypes +void pltr0f( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void *pltr_data ); +void PLCON07( PLFLT *z, PLINT *nx, PLINT *ny, PLINT *kx, PLINT *lx, + PLINT *ky, PLINT *ly, PLFLT *clevel, PLINT *nlevel ); +void PLCON17( PLFLT *z, PLINT *nx, PLINT *ny, PLINT *kx, PLINT *lx, + PLINT *ky, PLINT *ly, PLFLT *clevel, PLINT *nlevel, + PLFLT *xg, PLFLT *yg ); +void PLCON27( PLFLT *z, PLINT *nx, PLINT *ny, PLINT *kx, PLINT *lx, + PLINT *ky, PLINT *ly, PLFLT *clevel, PLINT *nlevel, + PLFLT *xg, PLFLT *yg ); +void PLVEC07( PLFLT *u, PLFLT *v, PLINT *nx, PLINT *ny, PLFLT *scale ); +void PLVEC17( PLFLT *u, PLFLT *v, PLINT *nx, PLINT *ny, PLFLT *scale, + PLFLT *xg, PLFLT *yg ); +void PLVEC27( PLFLT *u, PLFLT *v, PLINT *nx, PLINT *ny, PLFLT *scale, + PLFLT *xg, PLFLT *yg ); +static void pltr( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void *pltr_data ); +void PLCONT7( PLFLT *z, PLINT *nx, PLINT *ny, PLINT *kx, PLINT *lx, + PLINT *ky, PLINT *ly, PLFLT *clevel, PLINT *nlevel, PLFLT *ftr ); +void PLVECT7( PLFLT *u, PLFLT *v, PLINT *nx, PLINT *ny, PLFLT *scale, + PLFLT *ftr ); +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 ); +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 ); +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 ); +void PLSHADE7( 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 *ftr, PLINT *lx ); +void PLSHADES07( PLFLT *z, PLINT *nx, PLINT *ny, const char *defined, + PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax, + PLFLT *clevel, PLINT *nlevel, PLINT *fill_width, + PLINT *cont_color, PLINT *cont_width, PLINT *lx ); +void PLSHADES17( PLFLT *z, PLINT *nx, PLINT *ny, const char *defined, + PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax, + PLFLT *clevel, PLINT *nlevel, PLINT *fill_width, + PLINT *cont_color, PLINT *cont_width, + PLFLT *xg1, PLFLT *yg1, PLINT *lx ); +void PLSHADES27( PLFLT *z, PLINT *nx, PLINT *ny, const char *defined, + PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax, + PLFLT *clevel, PLINT *nlevel, PLINT *fill_width, + PLINT *cont_color, PLINT *cont_width, + PLFLT *xg2, PLFLT *yg2, PLINT *lx ); +void PLSHADES7( PLFLT *z, PLINT *nx, PLINT *ny, const char *defined, + PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax, + PLFLT *clevel, PLINT *nlevel, PLINT *fill_width, + PLINT *cont_color, PLINT *cont_width, PLFLT *ftr, PLINT *lx ); +void PLGRIDDATA( PLFLT *x, PLFLT *y, PLFLT *z, PLINT *npts, PLFLT *xg, + PLINT *nx, PLFLT *yg, PLINT *ny, PLFLT *zg, PLINT *type, + PLFLT *data ); +void PLIMAGEFR07( PLFLT *idata, PLINT *nx, PLINT *ny, + PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax, + PLFLT *zmin, PLFLT *zmax, PLFLT *valuemin, PLFLT *valuemax, + PLINT *lx ); +void PLIMAGEFR17( PLFLT *idata, PLINT *nx, PLINT *ny, + PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax, + PLFLT *zmin, PLFLT *zmax, PLFLT *valuemin, PLFLT *valuemax, + PLFLT *xg, PLFLT *yg, PLINT *lx ); +void PLIMAGEFR27( PLFLT *idata, PLINT *nx, PLINT *ny, + PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax, + PLFLT *zmin, PLFLT *zmax, PLFLT *valuemin, PLFLT *valuemax, + PLFLT *xg, PLFLT *yg, PLINT *lx ); +void PLIMAGEFR7( PLFLT *idata, PLINT *nx, PLINT *ny, + PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax, + PLFLT *zmin, PLFLT *zmax, PLFLT *valuemin, PLFLT *valuemax, + PLFLT *ftr, PLINT *lx ); + + + + //-------------------------------------------------------------------------- // pltr0f() // Modified: trunk/bindings/f95/scstubs.c =================================================================== --- trunk/bindings/f95/scstubs.c 2011-10-19 11:08:56 UTC (rev 11976) +++ trunk/bindings/f95/scstubs.c 2011-10-19 14:43:26 UTC (rev 11977) @@ -48,6 +48,222 @@ static char **pllegend_text; static char **pllegend_symbols; +// Function prototypes +static void pltransformf2c( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer data ); +void PL_SETCONTLABELFORMAT( PLINT *lexp, PLINT *sigdig ); +void PL_SETCONTLABELFORMATa( PLINT *lexp, PLINT *sigdig ); +void PL_SETCONTLABELPARAM( PLFLT *offset, PLFLT *size, PLFLT *spacing, PLINT *active ); +void PL_SETCONTLABELPARAMa( PLFLT *offset, PLFLT *size, PLFLT *spacing, PLINT *active ); +void PLABORT7( const char *text ); +void PLADV( PLINT *sub ); +void PLARC( PLFLT *x, PLFLT *y, PLFLT *a, PLFLT *b, PLFLT *angle1, PLFLT *angle2, PLFLT *rotate, PLBOOL *fill ); +void PLAXES7( PLFLT *x0, PLFLT *y0, const char *xopt, PLFLT *xtick, + PLINT *nxsub, const char *yopt, PLFLT *ytick, PLINT *nysub ); +void PLBIN( PLINT *nbin, PLFLT *x, PLFLT *y, PLINT *center ); +void PLBTIME( PLINT *year, PLINT *month, PLINT *day, PLINT *hour, PLINT *min, PLFLT *sec, PLFLT *ctime ); +void PLBOP( void ); +void PLBOX7( const char *xopt, PLFLT *xtick, PLINT *nxsub, + const char *yopt, PLFLT *ytick, PLINT *nysub ); +void PLBOX37( const char *xopt, const char *xlabel, PLFLT *xtick, PLINT *nxsub, + const char *yopt, const char *ylabel, PLFLT *ytick, PLINT *nysub, + const char *zopt, const char *zlabel, PLFLT *ztick, PLINT *nzsub ); +void PLCALC_WORLD( PLFLT *rx, PLFLT *ry, PLFLT *wx, PLFLT *wy, PLINT *window ); +void PLCALC_WORLDa( PLFLT *rx, PLFLT *ry, PLFLT *wx, PLFLT *wy, PLINT *window ); +void PLCLEAR( void ); +void PLCOL0( PLINT *icol ); +void PLCOL1( PLFLT *col ); +void PLCONFIGTIME( PLFLT *scale, PLFLT *offset1, PLFLT *offset2, PLINT *ccontrol, PLBOOL *ifbtime_offset, PLINT *year, PLINT *month, PLINT *day, PLINT *hour, PLINT *min, PLFLT *sec ); +void PLCPSTRM( PLINT *iplsr, PLBOOL *flags ); +void PLCTIME( PLINT *year, PLINT *month, PLINT *day, PLINT *hour, PLINT *min, PLFLT *sec, PLFLT *ctime ); +void PLEND( void ); +void PLEND1( void ); +void PLENV( PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax, PLINT *just, PLINT *axis ); +void PLENV0( PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax, PLINT *just, PLINT *axis ); +void PLEOP( void ); +void PLERRX( PLINT *n, PLFLT *xmin, PLFLT *xmax, PLFLT *y ); +void PLERRY( PLINT *n, PLFLT *x, PLFLT *ymin, PLFLT *ymax ); +void PLFAMADV( void ); +void PLFILL( PLINT *n, PLFLT *x, PLFLT *y ); +void PLFILL3( PLINT *n, PLFLT *x, PLFLT *y, PLFLT *z ); +void PLFLUSH( void ); +void PLFONT( PLINT *font ); +void PLFONTLD( PLINT *charset ); +void PLGCHR( PLFLT *chrdef, PLFLT *chrht ); +void PLGCOL0( PLINT *icol0, PLINT *r, PLINT *g, PLINT *b ); +void PLGCOL0A( PLINT *icol0, PLINT *r, PLINT *g, PLINT *b, PLFLT *a ); +void PLGCOLBG( PLINT *r, PLINT *g, PLINT *b ); +void PLGCOLBGA( PLINT *r, PLINT *g, PLINT *b, PLFLT *a ); +void PLGCOMPRESSION( PLINT *compression ); +void PLGDEV7( char *dev, int length ); +void PLGDIDEV( PLFLT *p_mar, PLFLT *p_aspect, PLFLT *p_jx, PLFLT *p_jy ); +void PLGDIORI( PLFLT *p_rot ); +void PLGDIPLT( PLFLT *p_xmin, PLFLT *p_ymin, PLFLT *p_xmax, PLFLT *p_ymax ); +void PLGETCURSOR( PLGraphicsIn *gin ); +void PLGFAM( PLINT *fam, PLINT *num, PLINT *bmax ); +void PLGFCI( PLUNICODE *pfci ); +void PLGFNAM7( char *fnam, int length ); +void PLGFONT( PLINT *family, PLINT *style, PLINT *weight ); +void PLGLEVEL( PLINT *level ); +void PLGPAGE( PLFLT *xpmm, PLFLT *ypmm, PLINT *xwid, PLINT *ywid, PLINT *xoff, PLINT *yoff ); +void PLGRA( void ); +void PLGRADIENT( PLINT *n, PLFLT *x, PLFLT *y, PLFLT *angle ); +void PLGSPA( PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax ); +void PLGSTRM( PLINT *strm ); +void PLGVER7( char *ver ); +void PLGVPD( PLFLT *p_xmin, PLFLT *p_xmax, PLFLT *p_ymin, PLFLT *p_ymax ); +void PLGVPW( PLFLT *p_xmin, PLFLT *p_xmax, PLFLT *p_ymin, PLFLT *p_ymax ); +void PLGXAX( PLINT *digmax, PLINT *digits ); +void PLGYAX( PLINT *digmax, PLINT *digits ); +void PLGZAX( PLINT *digmax, PLINT *digits ); +void PLHIST( PLINT *n, PLFLT *data, PLFLT *datmin, PLFLT *datmax, PLINT *nbin, PLINT *oldwin ); +void PLHLS( PLFLT *hue, PLFLT *light, PLFLT *sat ); +void PLHLSRGB( PLFLT *h, PLFLT *l, PLFLT *s, PLFLT *r, PLFLT *g, PLFLT *b ); +void PLIMAGEFR( PLFLT *idata, PLINT *nx, PLINT *ny, + PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax, PLFLT *zmin, PLFLT *zmax, + PLFLT *Dxmin, PLFLT *Dxmax, PLFLT *Dymin, PLFLT *Dymax, + PLFLT *valuemin, PLFLT *valuemax ); +void PLIMAGE( PLFLT *idata, PLINT *nx, PLINT *ny, + PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax, PLFLT *zmin, PLFLT *zmax, + PLFLT *Dxmin, PLFLT *Dxmax, PLFLT *Dymin, PLFLT *Dymax ); +void PLINIT( void ); +void PLJOIN( PLFLT *x1, PLFLT *y1, PLFLT *x2, PLFLT *y2 ); +void PLLAB7( const char *xlab, const char *ylab, const char *title ); +void PLLEGEND_CNV_TEXT( PLINT *id, PLINT *number, char *string, PLINT length ); +void PLLEGEND( PLFLT *p_legend_width, PLFLT *p_legend_height, + PLINT *opt, PLINT *position, PLFLT *x, PLFLT *y, PLFLT *plot_width, + PLINT *bg_color, PLINT *bb_color, PLINT *bb_style, + PLINT *nrow, PLINT *ncolumn, + PLINT *nlegend, const PLINT *opt_array, + PLFLT *text_offset, PLFLT *text_scale, PLFLT *text_spacing, + PLFLT *text_justification, + const PLINT *text_colors, + const PLINT *box_colors, const PLINT *box_patterns, + const PLFLT *box_scales, const PLINT *box_line_widths, + const PLINT *line_colors, const PLINT *line_styles, + const PLINT *line_widths, + const PLINT *symbol_colors, const PLFLT *symbol_scales, + const PLINT *symbol_numbers ); +void PLLIGHTSOURCE( PLFLT *x, PLFLT *y, PLFLT *z ); +void PLLINE( PLINT *n, PLFLT *x, PLFLT *y ); +void PLLINE3( PLINT *n, PLFLT *x, PLFLT *y, PLFLT *z ); +void PLLSTY( PLINT *lin ); +void PLMAP7( const char *type, + PLFLT *minlong, PLFLT *maxlong, PLFLT *minlat, PLFLT *maxlat ); +void PLMERIDIANS7( PLFLT *dlong, PLFLT *dlat, + PLFLT *minlong, PLFLT *maxlong, PLFLT *minlat, PLFLT *maxlat ); +void PLMKSTRM( PLINT *p_strm ); +void PLMTEX7( const char *side, PLFLT *disp, PLFLT *pos, PLFLT *just, const char *text ); +void PLMTEX37( const char *side, PLFLT *disp, PLFLT *pos, PLFLT *just, const char *text ); +void PLPARSEOPTS7( int *numargs, const char *iargs, PLINT *mode, PLINT *maxindex ); +void PLPAT( PLINT *nlin, PLINT *inc, PLINT *del ); +void PLPOIN( PLINT *n, PLFLT *x, PLFLT *y, PLINT *code ); +void PLPOIN3( PLINT *n, PLFLT *x, PLFLT *y, PLFLT *z, PLINT *code ); +void PLPOLY3( PLINT *n, PLFLT *x, PLFLT *y, PLFLT *z, PLBOOL *draw, PLBOOL *ifcc ); +void PLPREC( PLINT *setp, PLINT *prec ); +void PLPSTY( PLINT *patt ); +void PLPTEX7( PLFLT *x, PLFLT *y, PLFLT *dx, PLFLT *dy, PLFLT *just, const char *text ); +void PLPTEX37(PLFLT *x, PLFLT *y, PLFLT *z, + PLFLT *dx, PLFLT *dy, PLFLT *dz, + PLFLT *sx, PLFLT *sy, PLFLT *sz, + PLFLT *just, const char *text ); +PLFLT PLRANDD( void ); +void PLREPLOT( void ); +void PLRGB( PLFLT *red, PLFLT *green, PLFLT *blue ); +void PLRGB1( PLINT *r, PLINT *g, PLINT *b ); +void PLRGBHLS( PLFLT *r, PLFLT *g, PLFLT *b, PLFLT *h, PLFLT *l, PLFLT *s ); +void PLSCHR( PLFLT *def, PLFLT *scale ); +void PLSCMAP0( PLINT *r, PLINT *g, PLINT *b, PLINT *ncol0 ); +void PLSCMAP0A( PLINT *r, PLINT *g, PLINT *b, PLFLT *a, PLINT *ncol0 ); +void PLSCMAP0N( PLINT *n ); +void PLSCMAP1( PLINT *r, PLINT *g, PLINT *b, PLINT *ncol1 ); +void PLSCMAP1A( PLINT *r, PLINT *g, PLINT *b, PLFLT *a, PLINT *ncol1 ); +void PLSCMAP1L( PLBOOL *itype, PLINT *npts, PLFLT *intensity, +PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLBOOL *rev ); +void PLSCMAP1L2( PLBOOL *itype, PLINT *npts, PLFLT *intensity, +PLFLT *coord1, PLFLT *coord2, PLFLT *coord3 ); +void PLSCMAP1LA( PLBOOL *itype, PLINT *npts, PLFLT *intensity, +PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLFLT *a, PLBOOL *rev ); +void PLSCMAP1LA2( PLBOOL *itype, PLINT *npts, PLFLT *intensity, +PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLFLT *a ); +void PLSCMAP1N( PLINT *n ); +void PLSCOL0( PLINT *icol0, PLINT *r, PLINT *g, PLINT *b ); +void PLSCOL0A( PLINT *icol0, PLINT *r, PLINT *g, PLINT *b, PLFLT *a ); +void PLSCOLBG( PLINT *r, PLINT *g, PLINT *b ); +void PLSCOLBGA( PLINT *r, PLINT *g, PLINT *b, PLFLT *a ); +void PLSCOLOR( PLINT *color ); +void PLSCOMPRESSION( PLINT *compression ); +void PLSDEV7( const char *dev ); +void PLSDIDEV( PLFLT *mar, PLFLT *aspect, PLFLT *jx, PLFLT *jy ); +void PLSDIMAP( PLINT *dimxmin, PLINT *dimxmax, PLINT *dimymin, PLINT *dimymax, +PLFLT *dimxpmm, PLFLT *dimypmm ); +void PLSDIORI( PLFLT *rot ); +void PLSDIPLT( PLFLT *xmin, PLFLT *ymin, PLFLT *xmax, PLFLT *ymax ); +void PLSDIPLZ( PLFLT *xmin, PLFLT *ymin, PLFLT *xmax, PLFLT *ymax ); +void PLSEED( unsigned int *s ); +void PLSESC( PLINT *esc ); +void PLSETOPT7( const char *opt, const char *optarg ); +void PLSFAM( PLINT *fam, PLINT *num, PLINT *bmax ); +void PLSFCI( PLUNICODE *fci ); +void PLSFNAM7( const char *fnam ); +void PLSFONT( PLINT *family, PLINT *style, PLINT *weight ); +void PLSLABELFUNC_ON( void ( STDCALL *labelfunc )( PLINT *, PLFLT *, char *, PLINT *, PLINT ) ); +void PLSLABELFUNC_ONa( void ( STDCALL *labelfunc )( PLINT *, PLFLT *, char *, PLINT *, PLINT ) ); +void PLSLABELFUNC_OFF( PLINT *dummy ); +void PLSLABELFUNC_OFFa( PLINT *dummy ); +void PLSLABELFUNC_NONE( void ); +void PLSLABELFUNC_NONEa( void ); +void PLSMAJ( PLFLT *def, PLFLT *scale ); +void PLSMEM( PLINT *maxx, PLINT *maxy, void *plotmem ); +void PLSMEMA( PLINT *maxx, PLINT *maxy, void *plotmem ); +void PLSMIN( PLFLT *def, PLFLT *scale ); +void PLSORI( PLINT *ori ); +void PLSPAGE( PLFLT *xpmm, PLFLT *ypmm, +PLINT *xwid, PLINT *ywid, PLINT *xoff, PLINT *yoff ); +void PLSPAL07( const char *filename ); +void PLSPAL17( const char *filename, PLBOOL *interpolate ); +void PLSPAUSE( PLBOOL *pause ); +void PLSSTRM( PLINT *strm ); +void PLSSUB( PLINT *nx, PLINT *ny ); +void PLSSYM( PLFLT *def, PLFLT *scale ); +void PLSTAR( PLINT *nx, PLINT *ny ); +void PLSTART7( const char *devname, PLINT *nx, PLINT *ny ); +void PLSTRANSFORM1( void ( STDCALL *transformfunc )( PLFLT *, PLFLT *, PLFLT *, PLFLT * ) ); +void PLSTRANSFORM2( PLINT *dummy ); +void PLSTRANSFORM3( void ); +void PLSTRING7( PLINT *n, PLFLT *x, PLFLT *y, const char *string ); +void PLSTRING37( PLINT *n, PLFLT *x, PLFLT *y, PLFLT *z, const char *string ); +void PLSTRIPA( PLINT *id, PLINT *pen, PLFLT *x, PLFLT *y ); +void PLSTRIPC( PLINT *id, const char *xspec, const char *yspec, + PLFLT *xmin, PLFLT *xmax, PLFLT *xjump, PLFLT *ymin, PLFLT *ymax, + PLFLT *xlpos, PLFLT *ylpos, + PLBOOL *y_ascl, PLBOOL *acc, + PLINT *colbox, PLINT *collab, + PLINT *colline, PLINT *styline, + const char *legline0, const char *legline1, + const char *legline2, const char *legline3, + const char *labx, const char *laby, const char *labtop ); +void PLSTRIPD( PLINT *id ); +void PLSTYL( PLINT *n, PLINT *mark, PLINT *space ); +void PLSVECT( PLFLT *arrowx, PLFLT *arrowy, PLINT *npts, PLBOOL *fill ); +void PLSVPA( PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax ); +void PLSXAX( PLINT *digmax, PLINT *digits ); +void PLSYAX( PLINT *digmax, PLINT *digits ); +void PLSYM( PLINT *n, PLFLT *x, PLFLT *y, PLINT *code ); +void PLSZAX( PLINT *digmax, PLINT *digits ); +void PLTEXT( void ); +void PLTIMEFMT7( const char *fmt ); +void PLVASP( PLFLT *aspect ); +void PLVPAS( PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax, PLFLT *aspect ); +void PLVPOR( PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax ); +void PLVSTA( void ); +void PLW3D( PLFLT *basex, PLFLT *basey, PLFLT *height, + PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax, + PLFLT *zmin, PLFLT *zmax, + PLFLT *alt, PLFLT *az ); +void PLWID( PLINT *width ); +void PLWIND( PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax ); +void PLXORMOD( PLBOOL *mode, PLBOOL *status ); + static void pltransformf2c( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer data ) { @@ -566,13 +782,13 @@ // Ensure the strings are null terminated - p_string = (char **) malloc( sizeof ( char * ) * ( *number ) ); - data = (char *) malloc( sizeof ( char * ) * ( *number ) * ( length + 1 ) ); + p_string = (char **) malloc( sizeof ( char * ) * (size_t) ( *number ) ); + data = (char *) malloc( sizeof ( char * ) * (size_t) (( *number ) * ( length + 1 ) ) ); for ( j = 0; j < ( *number ); j++ ) { p_string[j] = data + j * ( length + 1 ); - memcpy( p_string[j], &string[j * length], length ); + memcpy( p_string[j], &string[j * length], (size_t) length ); p_string[j][length] = '\0'; i = length - 1; while ( ( i >= 0 ) && ( p_string[j][i] == ' ' ) ) @@ -963,21 +1179,24 @@ // #define PLSETMAPFORMC FNAME( PLSETMAPFORMC, plsetmapformc ) #define PLCLEARMAPFORMC FNAME( PLCLEARMAPFORMC, plclearmapformc ) +void PLSETMAPFORMC( void ( STDCALL *mapform )( PLINT *, PLFLT *, PLFLT * ) ); +void PLCLEARMAPFORMC( void ); + void PLSETMAPFORMC( void ( STDCALL *mapform )( PLINT *, PLFLT *, PLFLT * ) ) { plmapform = mapform; } void -PLCLEARMAPFORMC( ) +PLCLEARMAPFORMC( void ) { plmapform = NULL; } void -PLSETOPT7( const char *opt, const char *optarg ) +PLSETOPT7( const char *opt, const char *oarg ) { - c_plsetopt( opt, optarg ); + c_plsetopt( opt, oarg ); } void @@ -1101,9 +1320,9 @@ } void -PLSPAUSE( PLBOOL *pause ) +PLSPAUSE( PLBOOL *ipause ) { - c_plspause( *pause ); + c_plspause( *ipause ); } void Modified: trunk/bindings/f95/sfstubs.f90 =================================================================== --- trunk/bindings/f95/sfstubs.f90 2011-10-19 11:08:56 UTC (rev 11976) +++ trunk/bindings/f95/sfstubs.f90 2011-10-19 14:43:26 UTC (rev 11977) @@ -41,8 +41,6 @@ implicit none character*(*) opt, optarg - include 'sfstubs.h' - call plstrf2c(opt, string1, maxlen) call plstrf2c(optarg, string2, maxlen) s1 = transfer( string1, s1 ) @@ -58,8 +56,6 @@ implicit none character*(*) text - include 'sfstubs.h' - call plstrf2c(text, string1, maxlen) s1 = transfer( string1, s1 ) call plabort7(s1) @@ -73,8 +69,6 @@ implicit none character*(*) dnam - include 'sfstubs.h' - call plstrf2c(dnam, string1, maxlen) s1 = transfer( string1, s1 ) call plsdev7(s1) @@ -88,8 +82,6 @@ implicit none character*(*) dnam - include 'sfstubs.h' - call plgdev7(string1) call plstrc2f(string1, dnam) @@ -102,8 +94,6 @@ implicit none character*(*) fnam - include 'sfstubs.h' - call plstrf2c(fnam, string1, maxlen) s1 = transfer( string1, s1 ) call plsfnam7(s1) @@ -117,8 +107,6 @@ implicit none character*(*) fnam - include 'sfstubs.h' - call plgfnam7(string1) call plstrc2f(string1, fnam) @@ -131,8 +119,6 @@ implicit none character*(*) ver - include 'sfstubs.h' - call plgver7(s1) string1 = transfer( s1, string1 ) call plstrc2f(string1, ver) @@ -148,8 +134,6 @@ integer nxsub, nysub character*(*) xopt,yopt - include 'sfstubs.h' - call plstrf2c(xopt, string1, maxlen) call plstrf2c(yopt, string2, maxlen) @@ -168,8 +152,6 @@ integer nxsub, nysub character*(*) xopt,yopt - include 'sfstubs.h' - call plstrf2c(xopt, string1, maxlen) call plstrf2c(yopt, string2, maxlen) @@ -189,8 +171,6 @@ character*(*) xopt,xlabel,yopt,ylabel,zopt,zlabel integer nxsub, nysub, nzsub - include 'sfstubs.h' - call plstrf2c(xopt, string1, maxlen) call plstrf2c(xlabel, string2, maxlen) call plstrf2c(yopt, string3, maxlen) @@ -332,8 +312,6 @@ real(kind=plflt) x(:), y(:) character(len=*) string - include 'sfstubs.h' - integer n n = size(x) @@ -352,8 +330,6 @@ real(kind=plflt) x(:), y(:), z(:) character(len=*) string - include 'sfstubs.h' - integer n n = size(x) @@ -425,8 +401,6 @@ real(kind=plflt) shade_min, shade_max, sh_color real(kind=plflt) z(:,:), xmin, xmax, ymin, ymax - include 'sfstubs.h' - ! call plstrf2c(dnam, string1, maxlen) s1 = transfer( string1, s1 ) @@ -454,8 +428,6 @@ real(kind=plflt) shade_min, shade_max, sh_color real(kind=plflt) z(:,:), xmin, xmax, ymin, ymax, xg(:), yg(:) - include 'sfstubs.h' - ! call plstrf2c(dnam, string1, maxlen) s1 = transfer( string1, s1 ) @@ -484,8 +456,6 @@ real(kind=plflt) shade_min, shade_max, sh_color real(kind=plflt) z(:,:), xmin, xmax, ymin, ymax, xg(:,:), yg(:,:) - include 'sfstubs.h' - ! call plstrf2c(dnam, string1, maxlen) s1 = transfer( string1, s1 ) @@ -514,8 +484,6 @@ real(kind=plflt) z(:,:), xmin, xmax, ymin, ymax real(kind=plflt) tr(6) - include 'sfstubs.h' - s1 = transfer( string1, s1 ) call plshade7(z, size(z,1), size(z,2), s1, & xmin, xmax, ymin, ymax, & @@ -538,8 +506,6 @@ real(kind=plflt) clevel(:) real(kind=plflt) z(:,:), xmin, xmax, ymin, ymax - include 'sfstubs.h' - ! call plstrf2c(dnam, string1, maxlen) s1 = transfer( string1, s1 ) @@ -564,8 +530,6 @@ real(kind=plflt) z(:,:), xmin, xmax, ymin, ymax, & xg1(:), yg1(:) - include 'sfstubs.h' - ! call plstrf2c(dnam, string1, maxlen) s1 = transfer( string1, s1 ) @@ -590,8 +554,6 @@ real(kind=plflt) z(:,:), xmin, xmax, ymin, ymax, & xg2(:,:), yg2(:,:) - include 'sfstubs.h' - ! call plstrf2c(dnam, string1, maxlen) s1 = transfer( string1, s1 ) @@ -616,8 +578,6 @@ real(kind=plflt) z(:,:), xmin, xmax, ymin, ymax real(kind=plflt) tr(6) - include 'sfstubs.h' - ! call plstrf2c(dnam, string1, maxlen) s1 = transfer( string1, s1 ) @@ -634,7 +594,6 @@ valuemin,valuemax) implicit none - integer nx, ny, lx real(kind=plflt) z(:,:) real(kind=plflt) xmin, xmax, ymin, ymax, zmin, zmax, valuemin, valuemax @@ -649,7 +608,6 @@ valuemin,valuemax,xg,yg) implicit none - integer nx, ny, lx real(kind=plflt) z(:,:), xg(:), yg(:) real(kind=plflt) xmin, xmax, ymin, ymax, zmin, zmax, valuemin, valuemax @@ -664,7 +622,6 @@ valuemin,valuemax,xg,yg) implicit none - integer nx, ny, lx real(kind=plflt) z(:,:), xg(:,:), yg(:,:) real(kind=plflt) xmin, xmax, ymin, ymax, zmin, zmax, valuemin, valuemax @@ -679,7 +636,6 @@ valuemin,valuemax,tr) implicit none - integer nx, ny, lx real(kind=plflt) z(:,:) real(kind=plflt) xmin, xmax, ymin, ymax, zmin, zmax, valuemin, valuemax real(kind=plflt) tr(6) @@ -696,8 +652,6 @@ implicit none character*(*) xlab,ylab,title - include 'sfstubs.h' - call plstrf2c(xlab, string1, maxlen) call plstrf2c(ylab, string2, maxlen) call plstrf2c(title, string3, maxlen) @@ -716,8 +670,6 @@ implicit none character*(*) filename - include 'sfstubs.h' - call plstrf2c(filename, string1, maxlen) s1 = transfer( string1, s1 ) @@ -733,8 +685,6 @@ character*(*) filename integer interpolate - include 'sfstubs.h' - call plstrf2c(filename, string1, maxlen) s1 = transfer( string1, s1 ) @@ -750,8 +700,6 @@ real(kind=plflt) disp, pos, xjust character*(*) side, text - include 'sfstubs.h' - call plstrf2c(side, string1, maxlen) call plstrf2c(text, string2, maxlen) @@ -769,8 +717,6 @@ real(kind=plflt) disp, pos, xjust character*(*) side, text - include 'sfstubs.h' - call plstrf2c(side, string1, maxlen) call plstrf2c(text, string2, maxlen) @@ -788,8 +734,6 @@ real(kind=plflt) x, y, dx, dy, xjust character*(*) text - include 'sfstubs.h' - call plstrf2c(text, string1, maxlen) s1 = transfer( string1, s1 ) @@ -805,8 +749,6 @@ real(kind=plflt) x, y, z, dx, dy, dz, sx, sy, sz, xjust character*(*) text - include 'sfstubs.h' - call plstrf2c(text, string1, maxlen) s1 = transfer( string1, s1 ) @@ -822,8 +764,6 @@ character*(*) devname integer nx, ny - include 'sfstubs.h' - call plstrf2c(devname, string1, maxlen) s1 = transfer( string1, s1 ) @@ -838,8 +778,6 @@ implicit none character*(*) fmt - include 'sfstubs.h' - call plstrf2c(fmt, string1, maxlen) s1 = transfer( string1, s1 ) call pltimefmt7(s1) Deleted: trunk/bindings/f95/sfstubs.h =================================================================== --- trunk/bindings/f95/sfstubs.h 2011-10-19 11:08:56 UTC (rev 11976) +++ trunk/bindings/f95/sfstubs.h 2011-10-19 14:43:26 UTC (rev 11977) @@ -1,41 +0,0 @@ -! $Id$ -! common blocks required for routines in sfstubs.f -! -! 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 Library General 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 - - integer maxlen - parameter (maxlen = 320) - character*(maxlen) string1, string2, string3 - character*(maxlen) string4, string5, string6 - character*(maxlen) string7, string8, string9 - integer s1(80), s2(80), s3(80), s4(80), s5(80), s6(80), s7(80), s8(80), s9(80) -! equivalence ( s1, string1 ), ( s2, string2 ) -! equivalence ( s3, string3 ), ( s4, string4 ) -! equivalence ( s5, string5 ), ( s6, string6 ) -! equivalence ( s7, string7 ), ( s8, string8 ) -! equivalence ( s9, string9 ) -! common /zzplstr1/ string1 -! common /zzplstr2/ string2 -! common /zzplstr3/ string3 -! common /zzplstr4/ string4 -! common /zzplstr5/ string5 -! common /zzplstr6/ string6 -! common /zzplstr7/ string7 -! common /zzplstr8/ string8 -! common /zzplstr9/ string9 Modified: trunk/bindings/f95/sfstubsf95.f90 =================================================================== --- trunk/bindings/f95/sfstubsf95.f90 2011-10-19 11:08:56 UTC (rev 11976) +++ trunk/bindings/f95/sfstubsf95.f90 2011-10-19 14:43:26 UTC (rev 11977) @@ -59,8 +59,23 @@ include 'plflt.inc' end module - module plplotp + ! + ! Parameters and variables for strings / arrays for + ! string conversion + ! + module plplot_str + integer :: maxleni, maxlen + parameter (maxlen = 320) + parameter (maxleni = 80) + character (len = maxlen) :: string1, string2, string3 + character (len = maxlen) :: string4, string5, string6 + character (len = maxlen) :: string7, string8, string9 + integer, dimension(maxleni) :: s1, s2, s3, s4, s5, s6, s7, s8, s9 + end module + + module plplotp use plplot_flt + use plplot_str implicit none interface plcont @@ -1165,13 +1180,12 @@ subroutine plmap1(mapform,mapname,minx,maxx,miny,maxy) use plplot_flt + use plplot_str implicit none real(kind=plflt) minx, maxx, miny, maxy character*(*) mapname external mapform - include 'sfstubs.h' - call plstrf2c(mapname, string1, maxlen) call plsetmapformc(mapform) @@ -1182,12 +1196,11 @@ subroutine plmap2(mapname,minx,maxx,miny,maxy) use plplot_flt + use plplot_str implicit none real(kind=plflt) minx, maxx, miny, maxy character*(*) mapname - include 'sfstubs.h' - call plstrf2c(mapname, string1, maxlen) call plclearmapformc() @@ -1203,8 +1216,6 @@ real(kind=plflt) dlong, dlat, minlong, maxlong, minlat, maxlat external mapform - include 'sfstubs.h' - call plsetmapformc(mapform) call plmeridians7(dlong,dlat,minlong,maxlong,minlat,maxlat) @@ -1216,8 +1227,6 @@ implicit none real(kind=plflt) dlong, dlat, minlong, maxlong, minlat, maxlat - include 'sfstubs.h' - call plclearmapformc call plmeridians7(dlong,dlat,minlong,maxlong,minlat,maxlat) @@ -1403,15 +1412,14 @@ colbox, collab, colline, styline, legline, & labx, laby, labtop) +! use plplot_str implicit none integer id, colbox, collab, colline(4), styline(4) character*(*) xspec, yspec, legline(4), labx, laby, labtop real(kind=plflt) xmin, xmax, xjump, ymin, ymax, xlpos, ylpos - integer nx, ny logical y_ascl, acc integer iy_ascl, iacc - include 'sfstubs.h' call plstrf2c(xspec, string1, maxlen) call plstrf2c(yspec, string2, maxlen) Modified: trunk/bindings/f95/strutil.f90 =================================================================== --- trunk/bindings/f95/strutil.f90 2011-10-19 11:08:56 UTC (rev 11976) +++ trunk/bindings/f95/strutil.f90 2011-10-19 14:43:26 UTC (rev 11977) @@ -20,10 +20,10 @@ subroutine plstrf2c(string1, string2, maxlen) - integer*4 maxlen - character*(*) string1, string2 + integer :: maxlen + character*(*) :: string1, string2 - integer*4 limit, islen + integer :: limit, islen external islen limit = min0(islen(string1),maxlen-1) @@ -40,8 +40,8 @@ character*(*) string1, string2 - integer*4 limit - character*300 stringbuf + integer :: limit + character (len=300) :: stringbuf limit = 1 10 if (ichar(string1(limit:limit)) .eq. 0) goto 20 @@ -61,7 +61,7 @@ integer function islen(string) character*(*) string - integer i + integer :: i do 100 i = len(string),1,-1 if (string(i:i) .ne. ' ') then Modified: trunk/examples/f95/plf95demos.inc.cmake =================================================================== --- trunk/examples/f95/plf95demos.inc.cmake 2011-10-19 11:08:56 UTC (rev 11976) +++ trunk/examples/f95/plf95demos.inc.cmake 2011-10-19 14:43:26 UTC (rev 11977) @@ -1,8 +1,9 @@ function myisnan(x) + use plplot_flt implicit none - logical myisnan - real*8 x + logical :: myisnan + real (kind=plflt) :: x @HAVE_F77_ISNAN_FALSE@ myisnan = (x.ne.x) @HAVE_F77_ISNAN_TRUE@ myisnan = isnan(x) Modified: trunk/examples/f95/x03f.f90 =================================================================== --- trunk/examples/f95/x03f.f90 2011-10-19 11:08:56 UTC (rev 11976) +++ trunk/examples/f95/x03f.f90 2011-10-19 14:43:26 UTC (rev 11977) @@ -25,7 +25,7 @@ character*3 text real(kind=plflt) x0(0:360), y0(0:360) real(kind=plflt) x(0:360), y(0:360), dtr, theta, dx, dy, r, offset - integer i, j, nsp + integer i, nsp ! Process command-line arguments call plparseopts(PL_PARSE_FULL) Modified: trunk/examples/f95/x11f.f90 =================================================================== --- trunk/examples/f95/x11f.f90 2011-10-19 11:08:56 UTC (rev 11976) +++ trunk/examples/f95/x11f.f90 2011-10-19 14:43:26 UTC (rev 11977) @@ -24,7 +24,7 @@ integer i, j, k, ifshade, xpts, ypts parameter (xpts=35, ypts=46) - real(kind=plflt) x(xpts), y(ypts), z(xpts,ypts), xx, yy, r + real(kind=plflt) x(xpts), y(ypts), z(xpts,ypts), xx, yy character*80 title(2) real(kind=plflt) alt(2),az(2) Modified: trunk/examples/f95/x14f.f90 =================================================================== --- trunk/examples/f95/x14f.f90 2011-10-19 11:08:56 UTC (rev 11976) +++ trunk/examples/f95/x14f.f90 2011-10-19 14:43:26 UTC (rev 11977) @@ -28,7 +28,7 @@ use plplot implicit none - integer i, digmax + integer digmax character*80 driver character*15 geometry_master @@ -40,7 +40,6 @@ real(kind=plflt) xs(6), ys(6) real(kind=plflt) xscale, yscale, xoff, yoff common /plotdat/ x, y, xs, ys, xscale, yscale, xoff, yoff - character*80 version real(kind=plflt) xp0, yp0 integer xleng0, yleng0, xoff0, yoff0 logical valid_geometry Modified: trunk/examples/f95/x17f.f90 =================================================================== --- trunk/examples/f95/x17f.f90 2011-10-19 11:08:56 UTC (rev 11976) +++ trunk/examples/f95/x17f.f90 2011-10-19 14:43:26 UTC (rev 11977) @@ -26,14 +26,13 @@ program x17f use plplot, PI => PL_PI implicit none - integer id1, id2, n, nsteps + integer id1, n, nsteps logical autoy, acc parameter ( nsteps = 1000 ) real(kind=plflt) y1, y2, y3, y4, ymin, ymax, xlab, ylab real(kind=plflt) t, tmin, tmax, tjump, dt, noise integer colbox, collab, colline(4), styline(4) character*20 legline(4) - character*20 toplab logical pl_errcode character*80 errmsg Modified: trunk/examples/f95/x18f.f90 =================================================================== --- trunk/examples/f95/x18f.f90 2011-10-19 11:08:56 UTC (rev 11976) +++ trunk/examples/f95/x18f.f90 2011-10-19 14:43:26 UTC (rev 11977) @@ -32,7 +32,7 @@ integer NPTS parameter ( NPTS = 1000 ) - integer i, j, k + integer i, k real(kind=plflt) x(NPTS), y(NPTS), z(NPTS) real(kind=plflt) r character*80 title @@ -127,7 +127,7 @@ call plcol0(1) call plw3d(1.0_plflt, 1.0_plflt, 1.0_plflt, & -1.0_plflt, 1.0_plflt, -1.0_plflt, & - 1.0_plflt, -1.0_plflt, 1.0_plflt, & + 1.0_plflt, -1.0_plflt, 1.0_plflt, & alt, az) call plbox3('bnstu', 'x axis', 0.0_plflt, 0, & 'bnstu', 'y axis', 0.0_plflt, 0, & Modified: trunk/examples/f95/x19f.f90 =================================================================== --- trunk/examples/f95/x19f.f90 2011-10-19 11:08:56 UTC (rev 11976) +++ trunk/examples/f95/x19f.f90 2011-10-19 14:43:26 UTC (rev 11977) @@ -91,7 +91,7 @@ real(kind=plflt) :: value character*(length) label character*5 direction_label - real(kind=plflt) :: label_val + real(kind=plflt) :: label_val = 0.0_plflt real(kind=plflt) :: normalize_longitude if (axis .eq. 2) then @@ -134,7 +134,6 @@ implicit none real(kind=plflt) minx, maxx, miny, maxy real(kind=plflt), dimension(1:1) :: x, y - integer c external map_transform external mapform19 external geolocation_labeler Modified: trunk/examples/f95/x20f.f90 =================================================================== --- trunk/examples/f95/x20f.f90 2011-10-19 11:08:56 UTC (rev 11976) +++ trunk/examples/f95/x20f.f90 2011-10-19 14:43:26 UTC (rev 11977) @@ -224,7 +224,7 @@ if (get_clip(xi, xe, yi, ye)) then call plend() - call myexit(0) + stop endif ! @@ -295,7 +295,7 @@ deallocate( img_f, xg, yg ) call plend() - call myexit(0) + stop contains @@ -330,17 +330,17 @@ character, dimension(8) :: img character(len=80), dimension(2) :: ver - integer i, j, k, w, h, b + integer :: i, j, w, h, b - integer ierr - integer count - integer record + integer :: ierr + integer :: count + integer :: record - integer bytes - integer lastlf - integer first - integer last - integer pixel + integer :: bytes = 0 + integer :: lastlf = 0 + integer :: first + integer :: last + integer :: pixel ! Naive grayscale binary ppm reading. If you know how to, improve it @@ -499,7 +499,9 @@ real(kind=plflt) sx(5), sy(5) integer PLK_Return - parameter(PLK_Return = Z'0D') + data PLK_Return / Z'0D' / + integer hex100 + data hex100 / Z'100' / xxi = xi yyi = yi @@ -534,7 +536,7 @@ sy(5) = yyi endif - if (iand(gin%state,Z'100').ne.0) then + if (iand(gin%state,hex100).ne.0) then xxe = gin%wX yye = gin%wY if (start) then @@ -640,12 +642,3 @@ enddo end -!---------------------------------------------------------------------------- -! Subroutine myexit -! Just calls exit - works around bug in gfortran <= 4.1 - subroutine myexit(icode) - implicit none - integer icode - - call exit(icode) - end Modified: trunk/examples/f95/x21f.f90 =================================================================== --- trunk/examples/f95/x21f.f90 2011-10-19 11:08:56 UTC (rev 11976) +++ trunk/examples/f95/x21f.f90 2011-10-19 14:43:26 UTC (rev 11977) @@ -49,9 +49,9 @@ character*80 title(6) data title /'Cubic Spline Approximation', & 'Delaunay Linear Interpolation', & - 'Natural Neighbors Interpolation', & - 'KNN Inv. Distance Weighted', & - '3NN Linear Interpolation', & + 'Natural Neighbors Interpolation', & + 'KNN Inv. Distance Weighted', & + '3NN Linear Interpolation', & '4NN Around Inv. Dist. Weighted'/ real(kind=plflt) opt(6) Modified: trunk/examples/f95/x22f.f90 =================================================================== --- trunk/examples/f95/x22f.f90 2011-10-19 11:08:56 UTC (rev 11976) +++ trunk/examples/f95/x22f.f90 2011-10-19 14:43:26 UTC (rev 11977) @@ -28,7 +28,7 @@ logical fill parameter (narr=6) real(kind=plflt) arrow_x(narr),arrow_y(narr), & - arrow2_x(narr),arrow2_y(narr) + arrow2_x(narr),arrow2_y(narr) data arrow_x/-0.5_plflt, 0.5_plflt, 0.3_plflt, 0.5_plflt, 0.3_plflt, 0.5_plflt/ data arrow_y/0._plflt, 0._plflt, 0.2_plflt, 0._plflt, -0.2_plflt, 0._plflt/ @@ -87,8 +87,8 @@ xx = (dble(i)-nx/2.0_plflt-0.5_plflt)*dx do j=1,ny yy = (dble(j)-ny/2.0_plflt-0.5_plflt)*dy - xg(i,j) = xx - yg(i,j) = yy + xg(i,j) = xx + yg(i,j) = yy u(i,j) = yy v(i,j) = -xx enddo @@ -96,7 +96,7 @@ call plenv(xmin, xmax, ymin, ymax, 0, 0) call pllab('(x)', '(y)', & - '#frPLplot Example 22 - circulation') + '#frPLplot Example 22 - circulation') call plcol0(2) scaling = 0.0_plflt call plvect(u,v,scaling,xg,yg) @@ -130,8 +130,8 @@ xx = (dble(i)-dble(nx)/2.0_plflt-0.5_plflt)*dx do j=1,ny yy = (dble(j)-dble(ny)/2.0_plflt-0.5_plflt)*dy - xg(i,j) = xx - yg(i,j) = yy + xg(i,j) = xx + yg(i,j) = yy b = ymax/4.0_plflt*(3.0_plflt-cos(PI*xx/xmax)) if (abs(yy).lt.b) then dbdx = ymax/4.0_plflt*sin(PI*xx/xmax)*yy/b @@ -146,7 +146,7 @@ call plenv(xmin, xmax, ymin, ymax, 0, 0) call pllab('(x)', '(y)', & - '#frPLplot Example 22 - constriction') + '#frPLplot Example 22 - constriction') call plcol0(2) scaling = -0.5_plflt call plvect(u,v,scaling,xg,yg) @@ -216,7 +216,7 @@ call plenv(xmin, xmax, ymin, ymax, 0, 0) call pllab('(x)', '(y)', & - '#frPLplot Example 22 - potential gradient vector plot') + '#frPLplot Example 22 - potential gradient vector plot') ! plot contours of the potential dz = abs(zmax - zmin)/dble (nlevel) Modified: trunk/examples/f95/x23f.f90 =================================================================== --- trunk/examples/f95/x23f.f90 2011-10-19 11:08:56 UTC (rev 11976) +++ trunk/examples/f95/x23f.f90 2011-10-19 14:43:26 UTC (rev 11977) @@ -192,36 +192,36 @@ ! the marker is not needed, in any case, for calls to plsfci. data (fci(i), i=1,fci_combinations) / & - z'00000000', & - z'00000001', & - z'00000002', & - z'00000003', & - z'00000004', & - z'00000010', & - z'00000011', & - z'00000012', & - z'00000013', & - z'00000014', & - z'00000020', & - z'00000021', & - z'00000022', & - z'00000023', & - z'00000024', & - z'00000100', & - z'00000101', & - z'00000102', & - z'00000103', & - z'00000104', & - z'00000110', & - z'00000111', & - z'00000112', & - z'00000113', & - z'00000114', & - z'00000120', & - z'00000121', & - z'00000122', & - z'00000123', & - z'00000124' / + z'00000000', & + z'00000001', & + z'00000002', & + z'00000003', & + z'00000004', & + z'00000010', & + z'00000011', & + z'00000012', & + z'00000013', & + z'00000014', & + z'00000020', & + z'00000021', & + z'00000022', & + z'00000023', & + z'00000024', & + z'00000100', & + z'00000101', & + z'00000102', & + z'00000103', & + z'00000104', & + z'00000110', & + z'00000111', & + z'00000112', & + z'00000113', & + z'00000114', & + z'00000120', & + z'00000121', & + z'00000122', & + z'00000123', & + z'00000124' / data (family(i), i=1,5) / & "sans-serif", & @@ -317,57 +317,57 @@ call plwind(0.0_plflt, 1.0_plflt, 0.0_plflt, 1.0_plflt) call plsfci(0_plunicode) if (page == 11) then - call plmtex('t', 1.5_plflt, 0.5_plflt, 0.5_plflt, & + call plmtex('t', 1.5_plflt, 0.5_plflt, 0.5_plflt, & '#<0x10>PLplot Example 23 - '// & 'Set Font with plsfci') elseif (page == 12) then - call plmtex('t', 1.5_plflt, 0.5_plflt, 0.5_plflt, & + call plmtex('t', 1.5_plflt, 0.5_plflt, 0.5_plflt, & '#<0x10>PLplot Example 23 - '// & 'Set Font with plsfont') elseif(page == 13) then - call plmtex('t', 1.5_plflt, 0.5_plflt, 0.5_plflt, & + call plmtex('t', 1.5_plflt, 0.5_plflt, 0.5_plflt, & '#<0x10>PLplot Example 23 - '// & 'Set Font with ##<0x8nnnnnnn> construct') elseif(page == 14) then - call plmtex('t', 1.5_plflt, 0.5_plflt, 0.5_plflt, & + call plmtex('t', 1.5_plflt, 0.5_plflt, 0.5_plflt, & '#<0x10>PLplot Example 23 - '// & 'Set Font with ##<0xmn> constructs') elseif(page == 15) then - call plmtex('t', 1.5_plflt, 0.5_plflt, 0.5_plflt, & + call plmtex('t', 1.5_plflt, 0.5_plflt, 0.5_plflt, & '#<0x10>PLplot Example 23 - '// & 'Set Font with ##<FCI COMMAND STRING/> constructs') endif call plschr(0._plflt, 0.75_plflt) do i=0,fci_combinations-1 - family_index = mod(i,5) - style_index = mod(i/5,3) - weight_index = mod((i/5)/3,2) - if(page == 11) then - call plsfci(fci(i+1)) - write(string,'(a)') & + family_index = mod(i,5) + style_index = mod(i/5,3) + weight_index = mod((i/5)/3,2) + if(page == 11) then + call plsfci(fci(i+1)) + write(string,'(a)') & 'Page 12, '// & trim(family(family_index+1))//', '// & trim(style(style_index+1))//', '// & trim(weight(weight_index+1))//': '// & 'The quick brown fox jumps over the lazy dog' - elseif(page == 12) then - call plsfont(family_index, style_index, weight_index) - write(string,'(a)') & + elseif(page == 12) then + call plsfont(family_index, style_index, weight_index) + write(string,'(a)') & 'Page 13, '// & trim(family(family_index+1))//', '// & trim(style(style_index+1))//', '// & trim(weight(weight_index+1))//': '// & 'The quick brown fox jumps over the lazy dog' - elseif(page == 13) then + elseif(page == 13) then ! Note, must put in missing FCI marker for this particular case. - write(string,'(a,"#<0x8",z7.7,">",a)') & + write(string,'(a,"#<0x8",z7.7,">",a)') & 'Page 14, '//trim(family(family_index+1))//', '// & trim(style(style_index+1))//', '// & trim(weight(weight_index+1))//': ', & fci(i+1), & 'The quick brown fox jumps over the lazy dog' - elseif(page == 14) then - write(string,'(a,"#<0x",z1,"0>#<0x",z1,"1>#<0x",z1,"2>",a)') & + elseif(page == 14) then + write(string,'(a,"#<0x",z1,"0>#<0x",z1,"1>#<0x",z1,"2>",a)') & 'Page 15, '// & trim(family(family_index+1))//', '// & trim(style(style_index+1))//', '// & @@ -376,8 +376,8 @@ style_index, & weight_index, & 'The quick brown fox jumps over the lazy dog' - elseif(page == 15) then - write(string,'(a)') & + elseif(page == 15) then + write(string,'(a)') & 'Page 16, '// & trim(family(family_index+1))//', '// & trim(style(style_index+1))//', '// & Modified: trunk/examples/f95/x29f.f90 =================================================================== --- trunk/examples/f95/x29f.f90 2011-10-19 11:08:56 UTC (rev 11976) +++ trunk/examples/f95/x29f.f90 2011-10-19 14:43:26 UTC (rev 11977) @@ -65,7 +65,7 @@ parameter(ymax = 20.0_plflt) do i = 1,npts - x(i) = xmax*(dble(i-1)/dble(npts)) + x(i) = xmax*(dble(i-1)/dble(npts)) y(i) = 15.0_plflt - 5.0_plflt*cos(2.0_plflt*PI*dble(i-1)/dble(npts)) ! Set x error bars to +/- 5 minute xerr1(i) = x(i)-60.0_plflt*5.0_plflt @@ -176,7 +176,7 @@ integer :: i, npts real(kind=plflt) :: xmin, xmax, ymin, ymax - integer :: tstart, t1, t2 + integer :: tstart ! real(kind=plflt) :: toff real(kind=plflt), dimension(365) :: x, y, xerr1, xerr2, yerr1, yerr2 common /plotdat/ x, y, xerr1, xerr2, yerr1, yerr2 @@ -240,8 +240,8 @@ real(kind=plflt) :: scale, offset1, offset2 real(kind=plflt) :: xmin, xmax, ymin, ymax, xlabel_step - integer :: k, npts, i - logical :: if_TAI_time_format + integer :: k, npts = 0, i + logical :: if_TAI_time_format = .false. cha... [truncated message content] |