|
From: <and...@us...> - 2013-12-09 14:40:03
|
Revision: 12832
http://sourceforge.net/p/plplot/code/12832
Author: andrewross
Date: 2013-12-09 14:39:59 +0000 (Mon, 09 Dec 2013)
Log Message:
-----------
Style recent code changes.
Modified Paths:
--------------
trunk/bindings/d/plplot.d
trunk/bindings/java/plplotjavac.i
trunk/bindings/lua/plplotluac.i
trunk/bindings/octave/plplot_octave.i
trunk/bindings/python/plplotcmodule.i
trunk/bindings/qt_gui/plqt.cpp
trunk/bindings/tcl/tclAPI.c
trunk/bindings/tk/plframe.c
trunk/bindings/tk/tkMain.c
trunk/bindings/tk-x-plat/plplotter.c
trunk/drivers/ntk.c
trunk/drivers/tk.c
trunk/examples/c/x01c.c
trunk/examples/c/x17c.c
trunk/examples/c++/x01.cc
trunk/examples/c++/x17.cc
trunk/examples/c++/x22.cc
trunk/examples/d/x22d.d
trunk/examples/java/x22.java
Modified: trunk/bindings/d/plplot.d
===================================================================
--- trunk/bindings/d/plplot.d 2013-12-09 14:35:42 UTC (rev 12831)
+++ trunk/bindings/d/plplot.d 2013-12-09 14:39:59 UTC (rev 12832)
@@ -1418,11 +1418,11 @@
//alias c_pllegend pllegend;
alias c_pllightsource pllightsource;
//alias c_plline plline;
-alias c_plpath plpath;
+alias c_plpath plpath;
//alias c_plline3 plline3;
-alias c_pllsty pllsty;
+alias c_pllsty pllsty;
//alias c_plmap plmap;
-alias c_plmeridians plmeridians;
+alias c_plmeridians plmeridians;
//alias c_plmesh plmesh;
//alias c_plmeshc plmeshc;
alias c_plmkstrm plmkstrm;
Modified: trunk/bindings/java/plplotjavac.i
===================================================================
--- trunk/bindings/java/plplotjavac.i 2013-12-09 14:35:42 UTC (rev 12831)
+++ trunk/bindings/java/plplotjavac.i 2013-12-09 14:39:59 UTC (rev 12832)
@@ -741,7 +741,6 @@
{
if ( $1 != NULL )
free( $1 );
-
}
%typemap( jni ) ( const PLFLT * ArrayCkNull, PLINT n ) jPLFLTArray
%typemap( jtype ) ( const PLFLT * ArrayCkNull, PLINT n ) jPLFLTbracket
@@ -912,7 +911,7 @@
}
else
{
- $1 = NULL;
+ $1 = NULL;
Alen = 0;
}
}
@@ -1526,7 +1525,7 @@
%{
jobject ctClass = 0;
jobject ctClassRef = 0;
-
+
void ct_java( PLFLT x, PLFLT y, PLFLT *xt, PLFLT *yt, PLPointer data );
// C coordinate transform callback function which calls the java
Modified: trunk/bindings/lua/plplotluac.i
===================================================================
--- trunk/bindings/lua/plplotluac.i 2013-12-09 14:35:42 UTC (rev 12831)
+++ trunk/bindings/lua/plplotluac.i 2013-12-09 14:39:59 UTC (rev 12832)
@@ -183,13 +183,13 @@
else
{
$1 = (PLINT *) LUA_get_int_num_array_var( L, $input, &temp );
- if ( !$1 )
- SWIG_fail;
- if ( temp != Alen )
- {
- lua_pushfstring( L, "Tables must be of same length." );
- SWIG_fail;
- }
+ if ( !$1 )
+ SWIG_fail;
+ if ( temp != Alen )
+ {
+ lua_pushfstring( L, "Tables must be of same length." );
+ SWIG_fail;
+ }
}
}
%typemap( freearg ) const PLINT * ArrayCkNull { LUA_FREE_ARRAY( $1 ); }
@@ -218,13 +218,13 @@
else
{
$1 = (PLINT *) LUA_get_int_num_array_var( L, $input, &temp );
- if ( !$1 )
+ if ( !$1 )
SWIG_fail;
- if ( temp < Alen - 1 )
- {
- lua_pushfstring( L, "Tables must be at least length of others minus 1." );
- SWIG_fail;
- }
+ if ( temp < Alen - 1 )
+ {
+ lua_pushfstring( L, "Tables must be at least length of others minus 1." );
+ SWIG_fail;
+ }
}
}
%typemap( freearg ) const PLINT * ArrayCkMinus1Null { LUA_FREE_ARRAY( $1 ); }
@@ -320,13 +320,13 @@
else
{
$1 = (PLFLT *) LUA_get_double_num_array_var( L, $input, &temp );
- if ( !$1 )
- SWIG_fail;
- if ( temp != Alen )
- {
- lua_pushfstring( L, "Tables must be of same length." );
- SWIG_fail;
- }
+ if ( !$1 )
+ SWIG_fail;
+ if ( temp != Alen )
+ {
+ lua_pushfstring( L, "Tables must be of same length." );
+ SWIG_fail;
+ }
}
$2 = temp;
}
@@ -334,7 +334,10 @@
{
LUA_FREE_ARRAY( $1 );
}
-%typemap( default ) ( const PLFLT * ArrayCkNull, PLINT n ) { $1 = NULL; $2 = 0; }
+%typemap( default ) ( const PLFLT * ArrayCkNull, PLINT n )
+{
+ $1 = NULL; $2 = 0;
+}
// no count, but check consistency with previous
@@ -362,13 +365,13 @@
else
{
$1 = (PLFLT *) LUA_get_double_num_array_var( L, $input, &temp );
- if ( !$1 )
- SWIG_fail;
- if ( temp != Alen )
- {
- lua_pushfstring( L, "Tables must be of same length." );
- SWIG_fail;
- }
+ if ( !$1 )
+ SWIG_fail;
+ if ( temp != Alen )
+ {
+ lua_pushfstring( L, "Tables must be of same length." );
+ SWIG_fail;
+ }
}
}
%typemap( freearg ) const PLFLT * ArrayCkNull { LUA_FREE_ARRAY( $1 ); }
@@ -393,15 +396,15 @@
int temp;
if ( lua_isnil( L, $input ) )
{
- $1 = NULL;
- Alen = 0;
+ $1 = NULL;
+ Alen = 0;
}
else
{
$1 = (PLFLT *) LUA_get_double_num_array_var( L, $input, &temp );
- if ( !$1 )
- SWIG_fail;
- Alen = temp;
+ if ( !$1 )
+ SWIG_fail;
+ Alen = temp;
}
}
%typemap( freearg ) ( const PLFLT * Array )
@@ -864,7 +867,7 @@
typedef PLFLT ( *f2eval_func )( PLINT, PLINT, PLPointer );
typedef void ( *label_func )( PLINT, PLFLT, char*, PLINT, PLPointer );
-// Function prototypes
+// Function prototypes
void mypltr( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void * pltr_data );
void myct( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void * pltr_data );
void mylabel( PLINT axis, PLFLT value, char* label, PLINT length, PLPointer data );
@@ -961,7 +964,6 @@
void mylabel( PLINT axis, PLFLT value, char* label, PLINT length, PLPointer PL_UNUSED( data ) )
{
-
// check Lua state
if ( myL == NULL )
{
@@ -971,8 +973,8 @@
// push functions and arguments
lua_getglobal( myL, mylabel_funcstr ); // function to be called
- lua_pushnumber( myL, axis ); // push 1st argument
- lua_pushnumber( myL, value ); // push 1st argument
+ lua_pushnumber( myL, axis ); // push 1st argument
+ lua_pushnumber( myL, value ); // push 1st argument
// do the call (2 arguments, 1 result)
if ( lua_pcall( myL, 2, 1, 0 ) != 0 )
@@ -1423,7 +1425,10 @@
LUA_FREE_ARRAY( $2 );
}
-%typemap( default ) ( PLBOOL deffalse ) { $1 = 0; }
+%typemap( default ) ( PLBOOL deffalse )
+{
+ $1 = 0;
+}
//--------------------------------------------------------------------------
Modified: trunk/bindings/octave/plplot_octave.i
===================================================================
--- trunk/bindings/octave/plplot_octave.i 2013-12-09 14:35:42 UTC (rev 12831)
+++ trunk/bindings/octave/plplot_octave.i 2013-12-09 14:39:59 UTC (rev 12832)
@@ -411,14 +411,14 @@
if ( !$input.is_empty() )
{
if ( _dim( $input, 0 ) != Alen )
- {
- error( "argument vectors must be same length" ); SWIG_fail;
- }
- temp = $input.matrix_value();
- $1 = &temp( 0, 0 );
- $2 = (PLINT) ( _dim( $input, 0 ) );
+ {
+ error( "argument vectors must be same length" ); SWIG_fail;
+ }
+ temp = $input.matrix_value();
+ $1 = &temp( 0, 0 );
+ $2 = (PLINT) ( _dim( $input, 0 ) );
}
- else
+ else
{
$1 = NULL;
$2 = 0;
@@ -509,13 +509,13 @@
if ( !$input.is_empty() )
{
Alen = (PLINT) ( _dim( $input, 0 ) );
- temp = $input.matrix_value();
- $1 = &temp( 0, 0 );
+ temp = $input.matrix_value();
+ $1 = &temp( 0, 0 );
}
else
{
- $1 = NULL;
- Alen = 0;
+ $1 = NULL;
+ Alen = 0;
}
}
%typemap( freearg ) ( const PLFLT * ArrayNull )
Modified: trunk/bindings/python/plplotcmodule.i
===================================================================
--- trunk/bindings/python/plplotcmodule.i 2013-12-09 14:35:42 UTC (rev 12831)
+++ trunk/bindings/python/plplotcmodule.i 2013-12-09 14:39:59 UTC (rev 12832)
@@ -330,20 +330,20 @@
// trailing count and check consistency with previous
%typemap( in ) ( const PLFLT * ArrayCkNull, PLINT n ) ( PyArrayObject * tmp = NULL )
{
- if ( $input != Py_None )
+ if ( $input != Py_None )
{
- tmp = (PyArrayObject *) myArray_ContiguousFromObject( $input, NPY_PLFLT, 1, 1 );
- if ( tmp == NULL )
- return NULL;
- if ( PyArray_DIMS( tmp )[0] != Alen )
- {
- PyErr_SetString( PyExc_ValueError, "Vectors must be same length." );
- return NULL;
+ tmp = (PyArrayObject *) myArray_ContiguousFromObject( $input, NPY_PLFLT, 1, 1 );
+ if ( tmp == NULL )
+ return NULL;
+ if ( PyArray_DIMS( tmp )[0] != Alen )
+ {
+ PyErr_SetString( PyExc_ValueError, "Vectors must be same length." );
+ return NULL;
+ }
+ $1 = (PLFLT *) PyArray_DATA( tmp );
+ $2 = PyArray_DIMS( tmp )[0];
}
- $1 = (PLFLT *) PyArray_DATA( tmp );
- $2 = PyArray_DIMS( tmp )[0];
- }
- else
+ else
{
$1 = NULL;
$2 = 0;
@@ -374,16 +374,16 @@
{
if ( $input != Py_None )
{
- tmp = (PyArrayObject *) myArray_ContiguousFromObject( $input, NPY_PLFLT, 1, 1 );
- if ( tmp == NULL )
- return NULL;
- if ( PyArray_DIMS( tmp )[0] != Alen )
- {
- PyErr_SetString( PyExc_ValueError, "Vectors must be same length." );
- return NULL;
+ tmp = (PyArrayObject *) myArray_ContiguousFromObject( $input, NPY_PLFLT, 1, 1 );
+ if ( tmp == NULL )
+ return NULL;
+ if ( PyArray_DIMS( tmp )[0] != Alen )
+ {
+ PyErr_SetString( PyExc_ValueError, "Vectors must be same length." );
+ return NULL;
+ }
+ $1 = (PLFLT *) PyArray_DATA( tmp );
}
- $1 = (PLFLT *) PyArray_DATA( tmp );
- }
else
{
$1 = NULL;
@@ -505,16 +505,16 @@
{
if ( $input != Py_None )
{
- tmp = (PyArrayObject *) myArray_ContiguousFromObject( $input, NPY_PLFLT, 1, 1 );
- if ( tmp == NULL )
- return NULL;
- Alen = PyArray_DIMS( tmp )[0];
- $1 = (PLFLT *) PyArray_DATA( tmp );
+ tmp = (PyArrayObject *) myArray_ContiguousFromObject( $input, NPY_PLFLT, 1, 1 );
+ if ( tmp == NULL )
+ return NULL;
+ Alen = PyArray_DIMS( tmp )[0];
+ $1 = (PLFLT *) PyArray_DATA( tmp );
}
- else
+ else
{
- $1 = NULL;
- Alen = 0;
+ $1 = NULL;
+ Alen = 0;
}
}
%typemap( freearg ) const PLFLT * ArrayNull { Py_CLEAR( tmp$argnum );}
Modified: trunk/bindings/qt_gui/plqt.cpp
===================================================================
--- trunk/bindings/qt_gui/plqt.cpp 2013-12-09 14:35:42 UTC (rev 12831)
+++ trunk/bindings/qt_gui/plqt.cpp 2013-12-09 14:39:59 UTC (rev 12832)
@@ -1123,7 +1123,7 @@
//mouseEvent( event );
}
-void QtPLWidget::mouseMoveEvent( QMouseEvent * PL_UNUSED ( event ) )
+void QtPLWidget::mouseMoveEvent( QMouseEvent * PL_UNUSED( event ) )
{
//mouseEvent( event );
}
Modified: trunk/bindings/tcl/tclAPI.c
===================================================================
--- trunk/bindings/tcl/tclAPI.c 2013-12-09 14:35:42 UTC (rev 12831)
+++ trunk/bindings/tcl/tclAPI.c 2013-12-09 14:39:59 UTC (rev 12832)
@@ -1237,20 +1237,20 @@
static int
plsvectCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp,
- int argc, const char *argv[] )
+ int argc, const char *argv[] )
{
tclMatrix *matx, *maty;
- PLINT npts;
- PLBOOL fill;
+ PLINT npts;
+ PLBOOL fill;
if ( argc == 1
- || (strcmp( argv[1], "NULL" ) == 0 ) && ( strcmp( argv[2], "NULL" ) == 0 ) )
+ || ( strcmp( argv[1], "NULL" ) == 0 ) && ( strcmp( argv[2], "NULL" ) == 0 ) )
{
// The user has requested to clear the transform setting.
plsvect( NULL, NULL, 0, 0 );
return TCL_OK;
}
- else if (argc != 4)
+ else if ( argc != 4 )
{
Tcl_AppendResult( interp, "wrong # args: see documentation for ",
argv[0], (char *) NULL );
@@ -1284,7 +1284,7 @@
return TCL_ERROR;
}
- fill = (PLBOOL) atoi(argv[3]);
+ fill = (PLBOOL) atoi( argv[3] );
plsvect( matx->fdata, maty->fdata, npts, fill );
Modified: trunk/bindings/tk/plframe.c
===================================================================
--- trunk/bindings/tk/plframe.c 2013-12-09 14:35:42 UTC (rev 12831)
+++ trunk/bindings/tk/plframe.c 2013-12-09 14:39:59 UTC (rev 12832)
@@ -382,40 +382,40 @@
return TCL_ERROR;
}
- plFramePtr = (PlFrame *) ckalloc( sizeof ( PlFrame ) );
+ plFramePtr = (PlFrame *) ckalloc( sizeof ( PlFrame ) );
// Initialize in the same order as the members of the struct just
// to keep track of what is initialized and what not.
- plFramePtr->tkwin = new;
- plFramePtr->display = Tk_Display( new );
- plFramePtr->interp = interp;
+ plFramePtr->tkwin = new;
+ plFramePtr->display = Tk_Display( new );
+ plFramePtr->interp = interp;
//plFramePtr->widgetCMD = <initialized below for HAVE_ITCL case>
- plFramePtr->border = NULL;
+ plFramePtr->border = NULL;
//plFramePtr->borderWidth = <uninitialized>
//plFramePtr->relief = <uninitialized>
- plFramePtr->width = Tk_Width( plFramePtr->tkwin );
- plFramePtr->height = Tk_Height( plFramePtr->tkwin );
- plFramePtr->cursor = None;
- plFramePtr->flags = 0;
- plFramePtr->tkwin_initted = 0;
+ plFramePtr->width = Tk_Width( plFramePtr->tkwin );
+ plFramePtr->height = Tk_Height( plFramePtr->tkwin );
+ plFramePtr->cursor = None;
+ plFramePtr->flags = 0;
+ plFramePtr->tkwin_initted = 0;
// Associate new PLplot stream with this widget
plmkstrm( &plFramePtr->ipls );
plgpls( &plFramePtr->pls );
- plFramePtr->ipls_save = 0;
- plFramePtr->plr = (PLRDev *) ckalloc( sizeof ( PLRDev ) );
- plFramePtr->bgColor = NULL;
- plFramePtr->plpr_cmd = NULL;
- plFramePtr->pldis.x = 0;
- plFramePtr->pldis.y = 0;
- plFramePtr->pldis.width = 0;
- plFramePtr->pldis.height = 0;
- plFramePtr->prevWidth = 0;
- plFramePtr->prevHeight = 0;
- plFramePtr->SaveFnam = NULL;
+ plFramePtr->ipls_save = 0;
+ plFramePtr->plr = (PLRDev *) ckalloc( sizeof ( PLRDev ) );
+ plFramePtr->bgColor = NULL;
+ plFramePtr->plpr_cmd = NULL;
+ plFramePtr->pldis.x = 0;
+ plFramePtr->pldis.y = 0;
+ plFramePtr->pldis.width = 0;
+ plFramePtr->pldis.height = 0;
+ plFramePtr->prevWidth = 0;
+ plFramePtr->prevHeight = 0;
+ plFramePtr->SaveFnam = NULL;
// plFramePtr->devDesc = <uninitialized, to be malloced?>;
// plFramePtr->devName = <uninitialized, to be malloced?>;
- plFramePtr->xorGC = NULL;
+ plFramePtr->xorGC = NULL;
// plFram Ptr->pts = <uninitialized array>;
plFramePtr->continue_draw = 0;
plFramePtr->xhair_cursor = None;
@@ -431,15 +431,15 @@
plFramePtr->drawing_xhairs = 0;
// plFram Ptr->xhair_x = <uninitialized array>;
// plFram Ptr->xhair_y = <uninitialized array>;
- plFramePtr->rband = 0;
- plFramePtr->drawing_rband = 0;
+ plFramePtr->rband = 0;
+ plFramePtr->drawing_rband = 0;
// plFram Ptr->rband_pt = <uninitialized array>;
- plr = plFramePtr->plr;
- plr->pdfs = NULL;
- plr->at_bop = 0;
- plr->at_eop = 0;
- plr->iodev = (PLiodev *) ckalloc( sizeof ( PLiodev ) );
+ plr = plFramePtr->plr;
+ plr->pdfs = NULL;
+ plr->at_bop = 0;
+ plr->at_eop = 0;
+ plr->iodev = (PLiodev *) ckalloc( sizeof ( PLiodev ) );
plr_start( plr );
// Set up stuff for rubber-band drawing
Modified: trunk/bindings/tk/tkMain.c
===================================================================
--- trunk/bindings/tk/tkMain.c 2013-12-09 14:35:42 UTC (rev 12831)
+++ trunk/bindings/tk/tkMain.c 2013-12-09 14:39:59 UTC (rev 12832)
@@ -583,7 +583,7 @@
static void
Prompt( interploc, partial )
-Tcl_Interp * interploc; // Interpreter to use for prompting.
+Tcl_Interp * interploc; // Interpreter to use for prompting.
int partial; // Non-zero means there already
// exists a partial command, so use
// the secondary prompt.
Modified: trunk/bindings/tk-x-plat/plplotter.c
===================================================================
--- trunk/bindings/tk-x-plat/plplotter.c 2013-12-09 14:35:42 UTC (rev 12831)
+++ trunk/bindings/tk-x-plat/plplotter.c 2013-12-09 14:39:59 UTC (rev 12832)
@@ -371,7 +371,7 @@
}
Tk_SetClass( tkwin, "Plframe" );
- plPlotterPtr = (PlPlotter *) malloc( sizeof ( PlPlotter ) );
+ plPlotterPtr = (PlPlotter *) malloc( sizeof ( PlPlotter ) );
// Initialize in the same order as the members of the struct just
// to keep track of what is initialized and what not.
@@ -382,32 +382,32 @@
Tcl_CreateCommand( interp, Tk_PathName( plPlotterPtr->tkwin ),
(Tcl_CmdProc *) PlPlotterWidgetCmd, (ClientData) plPlotterPtr,
(Tcl_CmdDeleteProc *) NULL );
- plPlotterPtr->border = NULL;
+ plPlotterPtr->border = NULL;
//plPlotterPtr->borderWidth = <uninitialized>;
//plPlotterPtr->relief = <uninitialized>;
- plPlotterPtr->width = Tk_Width( plPlotterPtr->tkwin );
- plPlotterPtr->height = Tk_Height( plPlotterPtr->tkwin );
- plPlotterPtr->cursor = None;
- plPlotterPtr->flags = 0;
- plPlotterPtr->tkwin_initted = 0;
+ plPlotterPtr->width = Tk_Width( plPlotterPtr->tkwin );
+ plPlotterPtr->height = Tk_Height( plPlotterPtr->tkwin );
+ plPlotterPtr->cursor = None;
+ plPlotterPtr->flags = 0;
+ plPlotterPtr->tkwin_initted = 0;
// Associate new PLplot stream with this widget
plmkstrm( &plPlotterPtr->ipls );
plgpls( &plPlotterPtr->pls );
- plPlotterPtr->ipls_save = 0;
- plPlotterPtr->plr = (PLRDev *) malloc( sizeof ( PLRDev ) );
- plPlotterPtr->plpr_cmd = NULL;
- plPlotterPtr->active_plot = 1;
- plPlotterPtr->isActive = 0;
- plPlotterPtr->pldis.x = 0;
- plPlotterPtr->pldis.y = 0;
- plPlotterPtr->pldis.width = 0;
- plPlotterPtr->pldis.height = 0;
- plPlotterPtr->prevWidth = 0;
- plPlotterPtr->prevHeight = 0;
- plPlotterPtr->SaveFnam = NULL;
+ plPlotterPtr->ipls_save = 0;
+ plPlotterPtr->plr = (PLRDev *) malloc( sizeof ( PLRDev ) );
+ plPlotterPtr->plpr_cmd = NULL;
+ plPlotterPtr->active_plot = 1;
+ plPlotterPtr->isActive = 0;
+ plPlotterPtr->pldis.x = 0;
+ plPlotterPtr->pldis.y = 0;
+ plPlotterPtr->pldis.width = 0;
+ plPlotterPtr->pldis.height = 0;
+ plPlotterPtr->prevWidth = 0;
+ plPlotterPtr->prevHeight = 0;
+ plPlotterPtr->SaveFnam = NULL;
// plPlotterPtr->devDesc = <uninitialized, to be malloced?>;
// plPlotterPtr->devName = <uninitialized, to be malloced?>;
- plPlotterPtr->xorGC = NULL;
+ plPlotterPtr->xorGC = NULL;
// plPlotterPtr->pts = <uninitialized array>;
plPlotterPtr->continue_draw = 0;
plPlotterPtr->xhair_cursor = None;
@@ -423,10 +423,10 @@
plPlotterPtr->drawing_xhairs = 0;
// plPlotterPtr->xhair_x = <uninitialized array>;
// plPlotterPtr->xhair_y = <uninitialized array>;
- plPlotterPtr->rband = 0;
- plPlotterPtr->drawing_rband = 0;
+ plPlotterPtr->rband = 0;
+ plPlotterPtr->drawing_rband = 0;
// plPlotterPtr->rband_pt = <uninitialized array>;
- plPlotterPtr->double_buffer = 1;
+ plPlotterPtr->double_buffer = 1;
plr = plPlotterPtr->plr;
plr->pdfs = NULL;
Modified: trunk/drivers/ntk.c
===================================================================
--- trunk/drivers/ntk.c 2013-12-09 14:35:42 UTC (rev 12831)
+++ trunk/drivers/ntk.c 2013-12-09 14:39:59 UTC (rev 12832)
@@ -125,7 +125,7 @@
int columnbreak;
ccanv++;
- columnbreak = (ccanv%30 == 0);
+ columnbreak = ( ccanv % 30 == 0 );
// create new canvas
sprintf( cmd, "set ccanv %d; canvas $plf.f2.c$ccanv -width $xmax -height $ymax -background #%02x%02x%02x -xscrollcommand \"$hs set\" -yscrollcommand \"$vs set\" -scrollregion \"0 0 $xmax $ymax\"", ccanv, pls->cmap0[0].r, pls->cmap0[0].g, pls->cmap0[0].b );
@@ -484,8 +484,8 @@
void
plD_esc_ntk( PLStream *pls, PLINT op, void *ptr )
{
- PLINT i, j;
- short *xa, *ya;
+ PLINT i, j;
+ short *xa, *ya;
//Pixmap bitmap;
static const unsigned char bit_pat[] = {
0x24, 0x01, 0x92, 0x00, 0x49, 0x00, 0x24, 0x00, 0x12, 0x00, 0x09, 0x00,
@@ -496,8 +496,8 @@
switch ( op )
{
case PLESC_DASH:
- xa = (short *) malloc( sizeof ( short ) * ( size_t ) pls->dev_npts );
- ya = (short *) malloc( sizeof ( short ) * ( size_t ) pls->dev_npts );
+ xa = (short *) malloc( sizeof ( short ) * (size_t) pls->dev_npts );
+ ya = (short *) malloc( sizeof ( short ) * (size_t) pls->dev_npts );
for ( i = 0; i < pls->dev_npts; i++ )
{
xa[i] = pls->dev_x[i];
Modified: trunk/drivers/tk.c
===================================================================
--- trunk/drivers/tk.c 2013-12-09 14:35:42 UTC (rev 12831)
+++ trunk/drivers/tk.c 2013-12-09 14:39:59 UTC (rev 12832)
@@ -1518,9 +1518,9 @@
static void
link_init( PLStream *pls )
{
- TkDev *dev = (TkDev *) pls->dev;
- PLiodev *iodev = (PLiodev *) dev->iodev;
- size_t bufmax = (size_t) ( pls->bufmax * 1.2 );
+ TkDev *dev = (TkDev *) pls->dev;
+ PLiodev *iodev = (PLiodev *) dev->iodev;
+ size_t bufmax = (size_t) ( pls->bufmax * 1.2 );
const char *dirname = NULL;
dbug_enter( "link_init" );
Modified: trunk/examples/c/x01c.c
===================================================================
--- trunk/examples/c/x01c.c 2013-12-09 14:35:42 UTC (rev 12831)
+++ trunk/examples/c/x01c.c 2013-12-09 14:39:59 UTC (rev 12832)
@@ -274,9 +274,9 @@
if ( do_test && test_xor )
{
#ifdef PL_HAVE_NANOSLEEP
- PLINT st;
+ PLINT st;
struct timespec ts;
- ts.tv_sec = 0;
+ ts.tv_sec = 0;
ts.tv_nsec = 50000000;
plxormod( 1, &st ); // enter xor mode
if ( st )
@@ -284,7 +284,7 @@
for ( i = 0; i < 60; i++ )
{
plpoin( 1, x + i, y + i, 9 ); // draw a point
- nanosleep( &ts, NULL ); // wait a little
+ nanosleep( &ts, NULL ); // wait a little
plflush(); // force an update of the tk driver
plpoin( 1, x + i, y + i, 9 ); // erase point
}
Modified: trunk/examples/c/x17c.c
===================================================================
--- trunk/examples/c/x17c.c 2013-12-09 14:35:42 UTC (rev 12831)
+++ trunk/examples/c/x17c.c 2013-12-09 14:39:59 UTC (rev 12832)
@@ -30,11 +30,11 @@
int
main( int argc, const char *argv[] )
{
- PLINT id1, n, autoy, acc, nsteps = 1000;
- PLFLT y1, y2, y3, y4, ymin, ymax, xlab, ylab;
- PLFLT t, tmin, tmax, tjump, dt, noise;
- PLINT colbox, collab, colline[4], styline[4];
- const char *legline[4];
+ PLINT id1, n, autoy, acc, nsteps = 1000;
+ PLFLT y1, y2, y3, y4, ymin, ymax, xlab, ylab;
+ PLFLT t, tmin, tmax, tjump, dt, noise;
+ PLINT colbox, collab, colline[4], styline[4];
+ const char *legline[4];
#ifdef PL_HAVE_NANOSLEEP
struct timespec ts;
#endif
@@ -134,13 +134,13 @@
dt = 0.1;
#ifdef PL_HAVE_NANOSLEEP
- ts.tv_sec = 0;
+ ts.tv_sec = 0;
ts.tv_nsec = 10000000;
#endif
for ( n = 0; n < nsteps; n++ )
{
#ifdef PL_HAVE_NANOSLEEP
- nanosleep( &ts, NULL); // wait a little (10 ms) to simulate time elapsing
+ nanosleep( &ts, NULL ); // wait a little (10 ms) to simulate time elapsing
#else
# ifdef PL_HAVE_POLL
poll( 0, 0, 10 );
Modified: trunk/examples/c++/x01.cc
===================================================================
--- trunk/examples/c++/x01.cc 2013-12-09 14:35:42 UTC (rev 12831)
+++ trunk/examples/c++/x01.cc 2013-12-09 14:39:59 UTC (rev 12832)
@@ -279,9 +279,9 @@
if ( do_test && test_xor )
{
#ifdef PL_HAVE_NANOLEEP
- bool st;
+ bool st;
struct timespec ts;
- ts.tv_sec = 0;
+ ts.tv_sec = 0;
ts.tv_nsec = 50000000;
pls->xormod( true, &st ); // enter xor mode
if ( st )
Modified: trunk/examples/c++/x17.cc
===================================================================
--- trunk/examples/c++/x17.cc 2013-12-09 14:35:42 UTC (rev 12831)
+++ trunk/examples/c++/x17.cc 2013-12-09 14:39:59 UTC (rev 12832)
@@ -60,12 +60,12 @@
x17::x17( int argc, const char ** argv )
{
- PLINT id1, n, nsteps = 1000;
- bool autoy, acc;
- PLFLT y1, y2, y3, y4, ymin, ymax, xlab, ylab;
- PLFLT t, tmin, tmax, tjump, dt, noise;
- PLINT colbox, collab, colline[4], styline[4];
- const char *legline[4];
+ PLINT id1, n, nsteps = 1000;
+ bool autoy, acc;
+ PLFLT y1, y2, y3, y4, ymin, ymax, xlab, ylab;
+ PLFLT t, tmin, tmax, tjump, dt, noise;
+ PLINT colbox, collab, colline[4], styline[4];
+ const char *legline[4];
#ifdef PL_HAVE_NANOSLEEP
struct timespec ts;
#endif
@@ -156,7 +156,7 @@
dt = 0.1;
#ifdef PL_HAVE_NANOSLEEP
- ts.tv_sec = 0;
+ ts.tv_sec = 0;
ts.tv_nsec = 10000000;
#endif
for ( n = 0; n < nsteps; n++ )
Modified: trunk/examples/c++/x22.cc
===================================================================
--- trunk/examples/c++/x22.cc 2013-12-09 14:35:42 UTC (rev 12831)
+++ trunk/examples/c++/x22.cc 2013-12-09 14:39:59 UTC (rev 12832)
@@ -172,7 +172,7 @@
PLFLT dx, dy, x, y;
PLFLT xmin, xmax, ymin, ymax;
PLFLT Q, b;
-#define NC 11
+#define NC 11
int nc = NC;
PLFLT clev[NC];
Modified: trunk/examples/d/x22d.d
===================================================================
--- trunk/examples/d/x22d.d 2013-12-09 14:35:42 UTC (rev 12831)
+++ trunk/examples/d/x22d.d 2013-12-09 14:39:59 UTC (rev 12832)
@@ -35,8 +35,8 @@
void
transform( PLFLT x, PLFLT y, PLFLT *xt, PLFLT *yt, PLPointer data )
{
- PLFLT *xmax = cast(PLFLT *) data;
-
+ PLFLT *xmax = cast(PLFLT *) data;
+
*xt = x;
*yt = y / 4.0 * ( 3 - cos( PI * x / *xmax ) );
}
@@ -113,7 +113,7 @@
{
const int nx = 20;
const int ny = 20;
- string title;
+ string title;
PLFLT dx = 1.0;
PLFLT dy = 1.0;
@@ -164,7 +164,7 @@
}
plenv( xmin, xmax, ymin, ymax, 0, 0 );
- title = format("#frPLplot Example 22 - constriction (arrow style %d)", astyle);
+ title = format( "#frPLplot Example 22 - constriction (arrow style %d)", astyle );
pllab( "(x)", "(y)", title );
plcol0( 2 );
plvect( u, v, -1.0, cgrid2 );
@@ -173,15 +173,15 @@
//
- // Vector plot of flow through a constricted pipe
+ // Vector plot of flow through a constricted pipe
// with a coordinate transform
//
void
constriction2()
{
- const int nx = 20;
- const int ny = 20;
- const int nc = 11;
+ const int nx = 20;
+ const int ny = 20;
+ const int nc = 11;
const int nseg = 20;
PLFLT [] clev = new PLFLT[nc];
@@ -196,7 +196,7 @@
plstransform( &transform, cast(PLPointer) &xmax );
- PLcGrid2 cgrid2;
+ PLcGrid2 cgrid2;
cgrid2.xg = new PLFLT[][nx];
for ( int i = 0; i < nx; i++ )
cgrid2.xg[i] = new PLFLT[ny];
@@ -221,7 +221,7 @@
y = ( j - ny / 2 + 0.5 ) * dy;
cgrid2.xg[i][j] = x;
cgrid2.yg[i][j] = y;
- b = ymax / 4.0 * ( 3 - cos( PI * x / xmax ) );
+ b = ymax / 4.0 * ( 3 - cos( PI * x / xmax ) );
u[i][j] = Q * ymax / b;
v[i][j] = 0.0;
}
@@ -235,7 +235,7 @@
plenv( xmin, xmax, ymin, ymax, 0, 0 );
pllab( "(x)", "(y)", "#frPLplot Example 22 - constriction with plstransform" );
plcol0( 2 );
- plshades( u, null, xmin + dx / 2, xmax - dx / 2,
+ plshades( u, null, xmin + dx / 2, xmax - dx / 2,
ymin + dy / 2, ymax - dy / 2,
clev, 0.0, 1, 1.0, 0 );
plvect( u, v, -1.0, cgrid2 );
@@ -245,7 +245,6 @@
plcol0( 1 );
plstransform( null, null );
-
}
//--------------------------------------------------------------------------
@@ -417,7 +416,7 @@
myPlot.constriction2();
- plsvect( null, null, 0);
+ plsvect( null, null, 0 );
myPlot.potential();
Modified: trunk/examples/java/x22.java
===================================================================
--- trunk/examples/java/x22.java 2013-12-09 14:35:42 UTC (rev 12831)
+++ trunk/examples/java/x22.java 2013-12-09 14:39:59 UTC (rev 12832)
@@ -149,10 +149,10 @@
//
void constriction2( )
{
- int i, j;
- double dx, dy, x, y;
- double xmin, xmax, ymin, ymax;
- double Q, b, dbdx;
+ int i, j;
+ double dx, dy, x, y;
+ double xmin, xmax, ymin, ymax;
+ double Q, b, dbdx;
double[] clev = new double[nc];
Transform transform = new Transform();
@@ -172,12 +172,12 @@
x = ( i - nx / 2 + 0.5 ) * dx;
for ( j = 0; j < ny; j++ )
{
- y = ( j - ny / 2 + 0.5 ) * dy;
+ y = ( j - ny / 2 + 0.5 ) * dy;
xg[i][j] = x;
yg[i][j] = y;
- b = ymax / 4.0 * ( 3 - Math.cos( Math.PI * x / xmax ) );
- u[i][j] = Q * ymax / b;
- v[i][j] = 0.0;
+ b = ymax / 4.0 * ( 3 - Math.cos( Math.PI * x / xmax ) );
+ u[i][j] = Q * ymax / b;
+ v[i][j] = 0.0;
}
}
@@ -189,7 +189,7 @@
pls.env( xmin, xmax, ymin, ymax, 0, 0 );
pls.lab( "(x)", "(y)", "#frPLplot Example 22 - constriction with plstransform" );
pls.col0( 2 );
- pls.shades( u, xmin + dx / 2, xmax - dx / 2,
+ pls.shades( u, xmin + dx / 2, xmax - dx / 2,
ymin + dy / 2, ymax - dy / 2,
clev, 0, 1, 1.0, 0, xg, yg );
pls.vect( u, v, -1.0, xg, yg );
@@ -199,7 +199,7 @@
pls.col0( 1 );
pls.stransform( null, null );
-}
+ }
// Vector plot of the gradient of a shielded potential (see example 9)
void potential()
@@ -338,9 +338,9 @@
pls.init();
- nx = 20;
- ny = 20;
- nc = 11;
+ nx = 20;
+ ny = 20;
+ nc = 11;
nseg = 20;
// Allocate arrays
@@ -366,7 +366,7 @@
constriction2();
- pls.svect(null,null,false);
+ pls.svect( null, null, false );
potential();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|