From: <ai...@us...> - 2010-09-13 02:01:35
|
Revision: 11176 http://plplot.svn.sourceforge.net/plplot/?rev=11176&view=rev Author: airwin Date: 2010-09-13 02:01:25 +0000 (Mon, 13 Sep 2010) Log Message: ----------- Style changes (mostly splitting one-line ifs, but one-line whiles, else ifs, and fors are also split up and trailing comments are sometimes also split into separate lines) caused by moving from uncrustify 0.55 to uncrustify 0.56. All these style changes have been tested by an installed examples test (both noninteractive and interactive) for shared libraries. Modified Paths: -------------- trunk/bindings/gnome2/lib/gcw-lib.c trunk/bindings/gnome2/lib/plplotcanvas.c trunk/bindings/octave/massage.c trunk/bindings/qt_gui/plqt.cpp trunk/bindings/tcl/tclAPI.c trunk/bindings/tk/plframe.c trunk/drivers/aqt.c trunk/drivers/cairo.c trunk/drivers/cgm.c trunk/drivers/dg300.c trunk/drivers/gcw.c trunk/drivers/gd.c trunk/drivers/ljiip.c trunk/drivers/pbm.c trunk/drivers/plplotcanvas-hacktext.c trunk/drivers/ps.c trunk/drivers/pstex.c trunk/drivers/qt.cpp trunk/drivers/tk.c trunk/drivers/tkwin.c trunk/drivers/wingcc.c trunk/drivers/wxwidgets.cpp trunk/drivers/wxwidgets_dc.cpp trunk/drivers/wxwidgets_gc.cpp trunk/drivers/xwin.c trunk/examples/c/plplotcanvas_animation.c trunk/examples/c/x01c.c trunk/examples/c/x07c.c trunk/examples/c/x17c.c trunk/examples/c/x20c.c trunk/examples/c/x27c.c trunk/examples/c++/x01.cc trunk/examples/c++/x07.cc trunk/examples/c++/x17.cc trunk/examples/c++/x20.cc trunk/examples/c++/x27.cc trunk/examples/d/x07d.d trunk/examples/d/x16d.d trunk/examples/d/x20d.d trunk/examples/d/x27d.d trunk/examples/d/x28d.d trunk/fonts/font01.c trunk/fonts/plhershey-unicode-gen.c trunk/include/gcw.h trunk/lib/nistcd/cd.c trunk/lib/nistcd/cdmulti.c trunk/lib/nistcd/cdsimple.c trunk/lib/nistcd/cdtest.c trunk/lib/nistcd/cdtext.c trunk/lib/nistcd/color16.c trunk/lib/nn/delaunay.h trunk/lib/nn/nnpi.c trunk/lib/qsastime/qsastime.c trunk/lib/qsastime/qsastime_extra.c trunk/lib/qsastime/tai-utc-gen.c trunk/src/mt19937ar.c trunk/src/pdfutils.c trunk/src/plargs.c trunk/src/plbuf.c trunk/src/plcont.c trunk/src/plcore.c trunk/src/plctrl.c trunk/src/plcvt.c trunk/src/pldeprecated.c trunk/src/plf2ops.c trunk/src/plfill.c trunk/src/plfreetype.c trunk/src/plgradient.c trunk/src/plgridd.c trunk/src/pllegend.c trunk/src/plline.c trunk/src/plmap.c trunk/src/plot3d.c trunk/src/plshade.c trunk/src/plstdio.c trunk/src/plsym.c trunk/src/plvect.c trunk/utils/plrender.c Modified: trunk/bindings/gnome2/lib/gcw-lib.c =================================================================== --- trunk/bindings/gnome2/lib/gcw-lib.c 2010-09-13 01:57:39 UTC (rev 11175) +++ trunk/bindings/gnome2/lib/gcw-lib.c 2010-09-13 02:01:25 UTC (rev 11176) @@ -130,7 +130,8 @@ gcw_debug( "<gcw_init_canvas>\n" ); #endif - if ( !GNOME_IS_CANVAS( canvas ) ) plexit( "GCW driver: Canvas not found" ); + if ( !GNOME_IS_CANVAS( canvas ) ) + plexit( "GCW driver: Canvas not found" ); /* Add the canvas to the device */ dev->canvas = canvas; @@ -219,7 +220,7 @@ gcw_set_canvas_zoom( canvas, ZOOMSTEP ); else if ( flag == 0 ) /* Zoom out */ - { /* Don't zoom smaller than the original size: this causes GDK pixmap + { /* Don't zoom smaller than the original size: this causes GDK pixmap * errors. */ gnome_canvas_c2w( canvas, 1, 0, &curmag, &dum ); @@ -338,7 +339,8 @@ result = gtk_dialog_run( dialog ); gtk_widget_destroy( GTK_WIDGET( dialog ) ); - if ( result == GTK_RESPONSE_REJECT ) return; + if ( result == GTK_RESPONSE_REJECT ) + return; } /* Hide the file selection widget */ @@ -361,15 +363,24 @@ * */ n = strlen( fname ); - if ( strcasecmp( &fname[n - 3], "png" ) == 0 ) sprintf( devname, "png" ); - else if ( strcasecmp( &fname[n - 3], "gif" ) == 0 ) sprintf( devname, "gif" ); - else if ( strcasecmp( &fname[n - 3], "jpg" ) == 0 ) sprintf( devname, "jpg" ); - else if ( strcasecmp( &fname[n - 4], "jpeg" ) == 0 ) sprintf( devname, "jpeg" ); - else if ( strcasecmp( &fname[n - 2], "ps" ) == 0 ) sprintf( devname, "ps" ); - else if ( strcasecmp( &fname[n - 3], "psc" ) == 0 ) sprintf( devname, "psc" ); - else if ( strcasecmp( &fname[n - 4], "xwin" ) == 0 ) sprintf( devname, "xwin" ); - else if ( strcasecmp( &fname[n - 3], "gcw" ) == 0 ) sprintf( devname, "gcw" ); - else if ( strcasecmp( &fname[n - 2], "tk" ) == 0 ) sprintf( devname, "tk" ); + if ( strcasecmp( &fname[n - 3], "png" ) == 0 ) + sprintf( devname, "png" ); + else if ( strcasecmp( &fname[n - 3], "gif" ) == 0 ) + sprintf( devname, "gif" ); + else if ( strcasecmp( &fname[n - 3], "jpg" ) == 0 ) + sprintf( devname, "jpg" ); + else if ( strcasecmp( &fname[n - 4], "jpeg" ) == 0 ) + sprintf( devname, "jpeg" ); + else if ( strcasecmp( &fname[n - 2], "ps" ) == 0 ) + sprintf( devname, "ps" ); + else if ( strcasecmp( &fname[n - 3], "psc" ) == 0 ) + sprintf( devname, "psc" ); + else if ( strcasecmp( &fname[n - 4], "xwin" ) == 0 ) + sprintf( devname, "xwin" ); + else if ( strcasecmp( &fname[n - 3], "gcw" ) == 0 ) + sprintf( devname, "gcw" ); + else if ( strcasecmp( &fname[n - 2], "tk" ) == 0 ) + sprintf( devname, "tk" ); else { if ( dev->statusbar != NULL ) @@ -383,7 +394,8 @@ ); return; } - else plabort( "GCW driver <file_ok_sel>: File type not recognized" ); + else + plabort( "GCW driver <file_ok_sel>: File type not recognized" ); } /* Check that we are set up appropriately for device */ @@ -510,10 +522,14 @@ void key_release( GtkWidget *widget, GdkEventKey *event, gpointer data ) { - if ( event->keyval == '+' ) zoom( data, 2 ); - if ( event->keyval == '=' ) zoom( data, 1 ); - if ( event->keyval == '-' ) zoom( data, 0 ); - if ( event->keyval == 'q' ) destroy( widget, data ); + if ( event->keyval == '+' ) + zoom( data, 2 ); + if ( event->keyval == '=' ) + zoom( data, 1 ); + if ( event->keyval == '-' ) + zoom( data, 0 ); + if ( event->keyval == 'q' ) + destroy( widget, data ); } /********************** @@ -728,7 +744,8 @@ #endif /* Set the device size, if resizing is allowed. */ - if ( dev->allow_resize ) gcw_set_device_size( width, height ); + if ( dev->allow_resize ) + gcw_set_device_size( width, height ); width = dev->width; height = dev->height; @@ -764,7 +781,8 @@ /* Set up the background pixmap */ if ( dev->background == NULL || dev->allow_resize ) { - if ( GDK_IS_PIXMAP( dev->background ) ) g_object_unref( dev->background ); + if ( GDK_IS_PIXMAP( dev->background ) ) + g_object_unref( dev->background ); /* Why does this next *useless* command speed up the animation demo? * If we unref the allocated pixmaps, the benefit goes away!! */ @@ -792,7 +810,8 @@ GDK_GC_LINE_STYLE | GDK_GC_CAP_STYLE | GDK_GC_JOIN_STYLE ); } - else dev->gc = gdk_gc_new( dev->background ); + else + dev->gc = gdk_gc_new( dev->background ); } /* Clear the background pixmap */ @@ -801,7 +820,8 @@ /* Advance the page if we are allowing resizing. This ensures that * the physical coordinate system is set up correctly. */ - if ( dev->allow_resize ) pladv( 0 ); + if ( dev->allow_resize ) + pladv( 0 ); #ifdef DEBUG_GCW_1 gcw_debug( "</gcw_set_canvas_size>\n" ); @@ -868,8 +888,10 @@ #ifdef HAVE_FREETYPE - if ( use_text ) plsc->dev_text = 1; /* Allow text handling */ - else plsc->dev_text = 0; /* Disallow text handling */ + if ( use_text ) + plsc->dev_text = 1; /* Allow text handling */ + else + plsc->dev_text = 0; /* Disallow text handling */ #endif Modified: trunk/bindings/gnome2/lib/plplotcanvas.c =================================================================== --- trunk/bindings/gnome2/lib/plplotcanvas.c 2010-09-13 01:57:39 UTC (rev 11175) +++ trunk/bindings/gnome2/lib/plplotcanvas.c 2010-09-13 02:01:25 UTC (rev 11176) @@ -68,7 +68,8 @@ plmkstrm( &Nstream ); self->Nstream = (gint) Nstream; } - else self->Nstream = 0; + else + self->Nstream = 0; } static void plplot_canvas_class_init( PlplotCanvasClass *klass ) Modified: trunk/bindings/octave/massage.c =================================================================== --- trunk/bindings/octave/massage.c 2010-09-13 01:57:39 UTC (rev 11175) +++ trunk/bindings/octave/massage.c 2010-09-13 02:01:25 UTC (rev 11176) @@ -63,7 +63,8 @@ if ( ( p2 = strchr( b, '(' ) ) ) /* function ... = ...( */ { p1 = p2; - while ( *p1-- != ' ' ) ; + while ( *p1-- != ' ' ) + ; p1 += 2; if ( *( p1 + 1 ) == '_' ) /* c_... */ p1 += 2; Modified: trunk/bindings/qt_gui/plqt.cpp =================================================================== --- trunk/bindings/qt_gui/plqt.cpp 2010-09-13 01:57:39 UTC (rev 11175) +++ trunk/bindings/qt_gui/plqt.cpp 2010-09-13 02:01:25 UTC (rev 11176) @@ -92,7 +92,8 @@ void QtPLDriver::drawLine( short x1, short y1, short x2, short y2 ) { - if ( !m_painterP->isActive() ) return; + if ( !m_painterP->isActive() ) + return; QLineF line( (PLFLT) x1 * downscale, m_dHeight - (PLFLT) y1 * downscale, (PLFLT) x2 * downscale, @@ -104,7 +105,8 @@ void QtPLDriver::drawPolyline( short * x, short * y, PLINT npts ) { - if ( !m_painterP->isActive() ) return; + if ( !m_painterP->isActive() ) + return; QPointF * polyline = new QPointF[npts]; for ( int i = 0; i < npts; ++i ) { @@ -117,7 +119,8 @@ void QtPLDriver::drawPolygon( short * x, short * y, PLINT npts ) { - if ( !m_painterP->isActive() ) return; + if ( !m_painterP->isActive() ) + return; QPointF * polygon = new QPointF[npts]; for ( int i = 0; i < npts; ++i ) { @@ -156,9 +159,12 @@ } f.setFamily( "" ); // no family name, forcing Qt to find an appropriate font by itself - if ( fontStyle ) f.setItalic( true ); - if ( fontWeight ) f.setWeight( QFont::Bold ); - else f.setWeight( QFont::Normal ); + if ( fontStyle ) + f.setItalic( true ); + if ( fontWeight ) + f.setWeight( QFont::Bold ); + else + f.setWeight( QFont::Normal ); f.setUnderline( underlined ); f.setOverline( overlined ); @@ -321,7 +327,8 @@ void QtPLDriver::drawText( EscText* txt ) { - if ( !m_painterP->isActive() ) return; + if ( !m_painterP->isActive() ) + return; /* Check that we got unicode, warning message and return if not */ if ( txt->unicode_array_len == 0 ) @@ -365,7 +372,8 @@ void QtPLDriver::setColor( int r, int g, int b, double alpha ) { - if ( !m_painterP->isActive() ) return; + if ( !m_painterP->isActive() ) + return; QPen p = m_painterP->pen(); p.setColor( QColor( r, g, b, (int) ( alpha * 255 ) ) ); @@ -381,7 +389,8 @@ unsigned char *r, unsigned char *g, unsigned char *b, PLFLT *alpha, PLINT ncol1 ) { - if ( !m_painterP->isActive() || ncol1 < 2 ) return; + if ( !m_painterP->isActive() || ncol1 < 2 ) + return; int i; qreal stop_arg; @@ -404,7 +413,8 @@ void QtPLDriver::setWidth( PLINT w ) { - if ( !m_painterP->isActive() ) return; + if ( !m_painterP->isActive() ) + return; QPen p = m_painterP->pen(); p.setWidth( w ); @@ -428,7 +438,8 @@ void QtPLDriver::setSolid() { - if ( !m_painterP->isActive() ) return; + if ( !m_painterP->isActive() ) + return; QPen p = m_painterP->pen(); p.setStyle( Qt::SolidLine ); @@ -478,7 +489,8 @@ void QtRasterDevice::setBackgroundColor( int r, int g, int b, double alpha ) { - if ( !m_painterP->isActive() ) return; + if ( !m_painterP->isActive() ) + return; QBrush brush( QColor( r, g, b, (int) ( alpha * 255 ) ) ); m_painterP->fillRect( 0, 0, width(), height(), brush ); @@ -516,7 +528,8 @@ void QtSVGDevice::setBackgroundColor( int r, int g, int b, double alpha ) { - if ( !m_painterP->isActive() ) return; + if ( !m_painterP->isActive() ) + return; QBrush brush( QColor( r, g, b, (int) ( alpha * 255 ) ) ); m_painterP->fillRect( 0, 0, width(), height(), brush ); @@ -577,7 +590,8 @@ void QtEPSDevice::setBackgroundColor( int r, int g, int b, double alpha ) { - if ( !m_painterP->isActive() ) return; + if ( !m_painterP->isActive() ) + return; QBrush brush( QColor( r, g, b, (int) ( alpha * 255 ) ) ); m_painterP->fillRect( 0, 0, width(), height(), brush ); @@ -887,7 +901,8 @@ void QtPLWidget::renderText( QPainter* p, struct TextStruct_* s, double x_fact, double x_offset, double y_fact, double y_offset ) { - if ( s->len <= 0 || s->len >= 500 ) return; + if ( s->len <= 0 || s->len >= 500 ) + return; QPicture picText = getTextPicture( s->fci, s->text, s->len, s->chrht * y_fact ); double picDpi = picText.logicalDpiY(); @@ -1079,10 +1094,14 @@ x1 = gin.pX + dx; y1 = gin.pY + dy; - if ( x1 < xmin ) dx = xmin - gin.pX; - if ( y1 < ymin ) dy = ymin - gin.pY; - if ( x1 > xmax ) dx = xmax - gin.pX; - if ( y1 > ymax ) dy = ymax - gin.pY; + if ( x1 < xmin ) + dx = xmin - gin.pX; + if ( y1 < ymin ) + dy = ymin - gin.pY; + if ( x1 > xmax ) + dx = xmax - gin.pX; + if ( y1 > ymax ) + dy = ymax - gin.pY; QCursor::setPos( p.x() + dx, p.y() + dy ); plGinInit( &gin ); @@ -1390,7 +1409,8 @@ void QtExtWidget::mouseMoveEvent( QMouseEvent* event ) { - if ( !cursorParameters.isTracking ) return; + if ( !cursorParameters.isTracking ) + return; double x_fact, y_fact, x_offset, y_offset; //Parameters to scale and center the plot on the widget @@ -1423,7 +1443,8 @@ void QtExtWidget::mouseReleaseEvent( QMouseEvent* event ) { - if ( !cursorParameters.isTracking ) return; + if ( !cursorParameters.isTracking ) + return; double x_fact, y_fact, x_offset, y_offset; //Parameters to scale and center the plot on the widget @@ -1461,7 +1482,8 @@ { QtPLWidget::paintEvent( event ); - if ( !cursorParameters.isTracking || cursorParameters.cursor_x < 0 ) return; + if ( !cursorParameters.isTracking || cursorParameters.cursor_x < 0 ) + return; QPainter p( this ); Modified: trunk/bindings/tcl/tclAPI.c =================================================================== --- trunk/bindings/tcl/tclAPI.c 2010-09-13 01:57:39 UTC (rev 11175) +++ trunk/bindings/tcl/tclAPI.c 2010-09-13 02:01:25 UTC (rev 11176) @@ -76,8 +76,8 @@ typedef struct Command { - int ( *proc )(); /* Procedure to process command. */ - ClientData clientData; /* Arbitrary value to pass to proc. */ + int ( *proc )(); /* Procedure to process command. */ + ClientData clientData; /* Arbitrary value to pass to proc. */ int *deleteProc; /* Procedure to invoke when deleting * command. */ ClientData deleteData; /* Arbitrary value to pass to deleteProc @@ -410,7 +410,8 @@ #if 1 if ( Matrix_Init( interp ) != TCL_OK ) { - if ( debug ) fprintf( stderr, "error in matrix init\n" ); + if ( debug ) + fprintf( stderr, "error in matrix init\n" ); return TCL_ERROR; } #else @@ -424,7 +425,8 @@ #ifdef USE_MATRIX_STUBS if ( Matrix_InitStubs( interp, "0.1", 0 ) == NULL ) { - if ( debug ) fprintf( stderr, "error in matrix stubs init\n" ); + if ( debug ) + fprintf( stderr, "error in matrix stubs init\n" ); return TCL_ERROR; } #else @@ -441,7 +443,8 @@ /* if we are in the build tree, search there */ if ( plInBuildTree() ) { - if ( debug ) fprintf( stderr, "trying BUILD_DIR\n" ); + if ( debug ) + fprintf( stderr, "trying BUILD_DIR\n" ); libDir = BUILD_DIR "/bindings/tcl"; Tcl_SetVar( interp, "pllibrary", libDir, TCL_GLOBAL_ONLY ); if ( Tcl_Eval( interp, initScript ) != TCL_OK ) @@ -455,7 +458,8 @@ /* Tcl extension dir and/or PL_LIBRARY */ if ( libDir == NULL ) { - if ( debug ) fprintf( stderr, "trying init script\n" ); + if ( debug ) + fprintf( stderr, "trying init script\n" ); if ( Tcl_Eval( interp, initScript ) != TCL_OK ) { /* This unset is needed for Tcl < 8.4 support. */ @@ -471,7 +475,8 @@ /* Install directory */ if ( libDir == NULL ) { - if ( debug ) fprintf( stderr, "trying TCL_DIR\n" ); + if ( debug ) + fprintf( stderr, "trying TCL_DIR\n" ); libDir = TCL_DIR; Tcl_SetVar( interp, "pllibrary", libDir, TCL_GLOBAL_ONLY ); if ( Tcl_Eval( interp, initScript ) != TCL_OK ) @@ -487,7 +492,8 @@ /* Unix extension directory */ if ( libDir == NULL ) { - if ( debug ) fprintf( stderr, "trying extended init script\n" ); + if ( debug ) + fprintf( stderr, "trying extended init script\n" ); if ( Tcl_Eval( interp, initScriptExtended ) != TCL_OK ) { /* This unset is needed for Tcl < 8.4 support. */ @@ -503,10 +509,12 @@ if ( libDir == NULL ) { Tcl_DString ds; - if ( debug ) fprintf( stderr, "trying curdir\n" ); + if ( debug ) + fprintf( stderr, "trying curdir\n" ); if ( Tcl_Access( "plplot.tcl", 0 ) != 0 ) { - if ( debug ) fprintf( stderr, "couldn't find plplot.tcl in curdir\n" ); + if ( debug ) + fprintf( stderr, "couldn't find plplot.tcl in curdir\n" ); return TCL_ERROR; } @@ -514,7 +522,8 @@ libDir = Tcl_GetCwd( interp, &ds ); if ( libDir == NULL ) { - if ( debug ) fprintf( stderr, "couldn't get curdir\n" ); + if ( debug ) + fprintf( stderr, "couldn't get curdir\n" ); return TCL_ERROR; } libDir = plstrdup( libDir ); @@ -523,7 +532,8 @@ if ( Tcl_EvalFile( interp, "plplot.tcl" ) != TCL_OK ) { - if ( debug ) fprintf( stderr, "error evalling plplot.tcl\n" ); + if ( debug ) + fprintf( stderr, "error evalling plplot.tcl\n" ); return TCL_ERROR; } } @@ -531,7 +541,8 @@ if ( libDir == NULL ) { - if ( debug ) fprintf( stderr, "libdir NULL at end of search\n" ); + if ( debug ) + fprintf( stderr, "libdir NULL at end of search\n" ); return TCL_ERROR; } @@ -868,7 +879,8 @@ } matf = Tcl_GetMatrixPtr( interp, argv[1] ); - if ( matf == NULL ) return TCL_ERROR; + if ( matf == NULL ) + return TCL_ERROR; if ( matf->dim != 2 ) { @@ -933,7 +945,8 @@ } matclev = Tcl_GetMatrixPtr( interp, argv[0] ); - if ( matclev == NULL ) return TCL_ERROR; + if ( matclev == NULL ) + return TCL_ERROR; nclev = matclev->n[0]; if ( matclev->dim != 1 ) @@ -951,9 +964,11 @@ /* There is a pltr spec, parse it. */ pltrname = argv[0]; mattrx = Tcl_GetMatrixPtr( interp, argv[1] ); - if ( mattrx == NULL ) return TCL_ERROR; + if ( mattrx == NULL ) + return TCL_ERROR; mattry = Tcl_GetMatrixPtr( interp, argv[2] ); - if ( mattry == NULL ) return TCL_ERROR; + if ( mattry == NULL ) + return TCL_ERROR; argc -= 3, argv += 3; } @@ -1202,7 +1217,8 @@ } matu = Tcl_GetMatrixPtr( interp, argv[1] ); - if ( matu == NULL ) return TCL_ERROR; + if ( matu == NULL ) + return TCL_ERROR; if ( matu->dim != 2 ) { @@ -1229,7 +1245,8 @@ } matv = Tcl_GetMatrixPtr( interp, argv[2] ); - if ( matv == NULL ) return TCL_ERROR; + if ( matv == NULL ) + return TCL_ERROR; if ( matv->dim != 2 ) { @@ -1275,9 +1292,11 @@ /* There is a pltr spec, parse it. */ pltrname = argv[0]; mattrx = Tcl_GetMatrixPtr( interp, argv[1] ); - if ( mattrx == NULL ) return TCL_ERROR; + if ( mattrx == NULL ) + return TCL_ERROR; mattry = Tcl_GetMatrixPtr( interp, argv[2] ); - if ( mattry == NULL ) return TCL_ERROR; + if ( mattry == NULL ) + return TCL_ERROR; argc -= 3, argv += 3; } @@ -1532,11 +1551,14 @@ opt = atoi( argv[6] ); matx = Tcl_GetMatrixPtr( interp, argv[1] ); - if ( matx == NULL ) return TCL_ERROR; + if ( matx == NULL ) + return TCL_ERROR; maty = Tcl_GetMatrixPtr( interp, argv[2] ); - if ( maty == NULL ) return TCL_ERROR; + if ( maty == NULL ) + return TCL_ERROR; matz = Tcl_GetMatrixPtr( interp, argv[3] ); - if ( matz == NULL ) return TCL_ERROR; + if ( matz == NULL ) + return TCL_ERROR; matPtr = matz; /* For dumb indexer macro, grrrr. */ if ( matx->type != TYPE_FLOAT || @@ -1567,11 +1589,14 @@ opt = atoi( argv[4] ); matx = Tcl_GetMatrixPtr( interp, argv[1] ); - if ( matx == NULL ) return TCL_ERROR; + if ( matx == NULL ) + return TCL_ERROR; maty = Tcl_GetMatrixPtr( interp, argv[2] ); - if ( maty == NULL ) return TCL_ERROR; + if ( maty == NULL ) + return TCL_ERROR; matz = Tcl_GetMatrixPtr( interp, argv[3] ); - if ( matz == NULL ) return TCL_ERROR; + if ( matz == NULL ) + return TCL_ERROR; matPtr = matz; /* For dumb indexer macro, grrrr. */ if ( matx->type != TYPE_FLOAT || @@ -1667,15 +1692,19 @@ opt = atoi( argv[6] ); matx = Tcl_GetMatrixPtr( interp, argv[1] ); - if ( matx == NULL ) return TCL_ERROR; + if ( matx == NULL ) + return TCL_ERROR; maty = Tcl_GetMatrixPtr( interp, argv[2] ); - if ( maty == NULL ) return TCL_ERROR; + if ( maty == NULL ) + return TCL_ERROR; matz = Tcl_GetMatrixPtr( interp, argv[3] ); - if ( matz == NULL ) return TCL_ERROR; + if ( matz == NULL ) + return TCL_ERROR; matPtr = matz; /* For dumb indexer macro, grrrr. */ matlev = Tcl_GetMatrixPtr( interp, argv[7] ); - if ( matlev == NULL ) return TCL_ERROR; + if ( matlev == NULL ) + return TCL_ERROR; if ( matx->type != TYPE_FLOAT || maty->type != TYPE_FLOAT || @@ -1711,14 +1740,18 @@ opt = atoi( argv[6] ); matx = Tcl_GetMatrixPtr( interp, argv[1] ); - if ( matx == NULL ) return TCL_ERROR; + if ( matx == NULL ) + return TCL_ERROR; maty = Tcl_GetMatrixPtr( interp, argv[2] ); - if ( maty == NULL ) return TCL_ERROR; + if ( maty == NULL ) + return TCL_ERROR; matz = Tcl_GetMatrixPtr( interp, argv[3] ); - if ( matz == NULL ) return TCL_ERROR; + if ( matz == NULL ) + return TCL_ERROR; matPtr = matz; /* For dumb indexer macro, grrrr. */ matlev = Tcl_GetMatrixPtr( interp, argv[7] ); - if ( matlev == NULL ) return TCL_ERROR; + if ( matlev == NULL ) + return TCL_ERROR; if ( matx->type != TYPE_FLOAT || maty->type != TYPE_FLOAT || @@ -1756,11 +1789,14 @@ clev = NULL; matx = Tcl_GetMatrixPtr( interp, argv[1] ); - if ( matx == NULL ) return TCL_ERROR; + if ( matx == NULL ) + return TCL_ERROR; maty = Tcl_GetMatrixPtr( interp, argv[2] ); - if ( maty == NULL ) return TCL_ERROR; + if ( maty == NULL ) + return TCL_ERROR; matz = Tcl_GetMatrixPtr( interp, argv[3] ); - if ( matz == NULL ) return TCL_ERROR; + if ( matz == NULL ) + return TCL_ERROR; matPtr = matz; /* For dumb indexer macro, grrrr. */ if ( matx->type != TYPE_FLOAT || @@ -1792,11 +1828,14 @@ clev = NULL; matx = Tcl_GetMatrixPtr( interp, argv[1] ); - if ( matx == NULL ) return TCL_ERROR; + if ( matx == NULL ) + return TCL_ERROR; maty = Tcl_GetMatrixPtr( interp, argv[2] ); - if ( maty == NULL ) return TCL_ERROR; + if ( maty == NULL ) + return TCL_ERROR; matz = Tcl_GetMatrixPtr( interp, argv[3] ); - if ( matz == NULL ) return TCL_ERROR; + if ( matz == NULL ) + return TCL_ERROR; matPtr = matz; /* For dumb indexer macro, grrrr. */ if ( matx->type != TYPE_FLOAT || @@ -1887,11 +1926,14 @@ side = atoi( argv[7] ); matx = Tcl_GetMatrixPtr( interp, argv[1] ); - if ( matx == NULL ) return TCL_ERROR; + if ( matx == NULL ) + return TCL_ERROR; maty = Tcl_GetMatrixPtr( interp, argv[2] ); - if ( maty == NULL ) return TCL_ERROR; + if ( maty == NULL ) + return TCL_ERROR; matz = Tcl_GetMatrixPtr( interp, argv[3] ); - if ( matz == NULL ) return TCL_ERROR; + if ( matz == NULL ) + return TCL_ERROR; matPtr = matz; /* For dumb indexer macro, grrrr. */ if ( matx->type != TYPE_FLOAT || @@ -1923,11 +1965,14 @@ side = atoi( argv[5] ); matx = Tcl_GetMatrixPtr( interp, argv[1] ); - if ( matx == NULL ) return TCL_ERROR; + if ( matx == NULL ) + return TCL_ERROR; maty = Tcl_GetMatrixPtr( interp, argv[2] ); - if ( maty == NULL ) return TCL_ERROR; + if ( maty == NULL ) + return TCL_ERROR; matz = Tcl_GetMatrixPtr( interp, argv[3] ); - if ( matz == NULL ) return TCL_ERROR; + if ( matz == NULL ) + return TCL_ERROR; matPtr = matz; /* For dumb indexer macro, grrrr. */ if ( matx->type != TYPE_FLOAT || @@ -2023,15 +2068,19 @@ opt = atoi( argv[6] ); matx = Tcl_GetMatrixPtr( interp, argv[1] ); - if ( matx == NULL ) return TCL_ERROR; + if ( matx == NULL ) + return TCL_ERROR; maty = Tcl_GetMatrixPtr( interp, argv[2] ); - if ( maty == NULL ) return TCL_ERROR; + if ( maty == NULL ) + return TCL_ERROR; matz = Tcl_GetMatrixPtr( interp, argv[3] ); - if ( matz == NULL ) return TCL_ERROR; + if ( matz == NULL ) + return TCL_ERROR; matPtr = matz; /* For dumb indexer macro, grrrr. */ matlev = Tcl_GetMatrixPtr( interp, argv[7] ); - if ( matlev == NULL ) return TCL_ERROR; + if ( matlev == NULL ) + return TCL_ERROR; if ( matx->type != TYPE_FLOAT || maty->type != TYPE_FLOAT || @@ -2067,14 +2116,18 @@ opt = atoi( argv[6] ); matx = Tcl_GetMatrixPtr( interp, argv[1] ); - if ( matx == NULL ) return TCL_ERROR; + if ( matx == NULL ) + return TCL_ERROR; maty = Tcl_GetMatrixPtr( interp, argv[2] ); - if ( maty == NULL ) return TCL_ERROR; + if ( maty == NULL ) + return TCL_ERROR; matz = Tcl_GetMatrixPtr( interp, argv[3] ); - if ( matz == NULL ) return TCL_ERROR; + if ( matz == NULL ) + return TCL_ERROR; matPtr = matz; /* For dumb indexer macro, grrrr. */ matlev = Tcl_GetMatrixPtr( interp, argv[7] ); - if ( matlev == NULL ) return TCL_ERROR; + if ( matlev == NULL ) + return TCL_ERROR; if ( matx->type != TYPE_FLOAT || maty->type != TYPE_FLOAT || @@ -2112,11 +2165,14 @@ clev = NULL; matx = Tcl_GetMatrixPtr( interp, argv[1] ); - if ( matx == NULL ) return TCL_ERROR; + if ( matx == NULL ) + return TCL_ERROR; maty = Tcl_GetMatrixPtr( interp, argv[2] ); - if ( maty == NULL ) return TCL_ERROR; + if ( maty == NULL ) + return TCL_ERROR; matz = Tcl_GetMatrixPtr( interp, argv[3] ); - if ( matz == NULL ) return TCL_ERROR; + if ( matz == NULL ) + return TCL_ERROR; matPtr = matz; /* For dumb indexer macro, grrrr. */ if ( matx->type != TYPE_FLOAT || @@ -2148,11 +2204,14 @@ clev = NULL; matx = Tcl_GetMatrixPtr( interp, argv[1] ); - if ( matx == NULL ) return TCL_ERROR; + if ( matx == NULL ) + return TCL_ERROR; maty = Tcl_GetMatrixPtr( interp, argv[2] ); - if ( maty == NULL ) return TCL_ERROR; + if ( maty == NULL ) + return TCL_ERROR; matz = Tcl_GetMatrixPtr( interp, argv[3] ); - if ( matz == NULL ) return TCL_ERROR; + if ( matz == NULL ) + return TCL_ERROR; matPtr = matz; /* For dumb indexer macro, grrrr. */ if ( matx->type != TYPE_FLOAT || @@ -2248,15 +2307,19 @@ opt = atoi( argv[6] ); matx = Tcl_GetMatrixPtr( interp, argv[1] ); - if ( matx == NULL ) return TCL_ERROR; + if ( matx == NULL ) + return TCL_ERROR; maty = Tcl_GetMatrixPtr( interp, argv[2] ); - if ( maty == NULL ) return TCL_ERROR; + if ( maty == NULL ) + return TCL_ERROR; matz = Tcl_GetMatrixPtr( interp, argv[3] ); - if ( matz == NULL ) return TCL_ERROR; + if ( matz == NULL ) + return TCL_ERROR; matPtr = matz; /* For dumb indexer macro, grrrr. */ matlev = Tcl_GetMatrixPtr( interp, argv[7] ); - if ( matlev == NULL ) return TCL_ERROR; + if ( matlev == NULL ) + return TCL_ERROR; if ( matx->type != TYPE_FLOAT || maty->type != TYPE_FLOAT || @@ -2292,14 +2355,18 @@ opt = atoi( argv[6] ); matx = Tcl_GetMatrixPtr( interp, argv[1] ); - if ( matx == NULL ) return TCL_ERROR; + if ( matx == NULL ) + return TCL_ERROR; maty = Tcl_GetMatrixPtr( interp, argv[2] ); - if ( maty == NULL ) return TCL_ERROR; + if ( maty == NULL ) + return TCL_ERROR; matz = Tcl_GetMatrixPtr( interp, argv[3] ); - if ( matz == NULL ) return TCL_ERROR; + if ( matz == NULL ) + return TCL_ERROR; matPtr = matz; /* For dumb indexer macro, grrrr. */ matlev = Tcl_GetMatrixPtr( interp, argv[7] ); - if ( matlev == NULL ) return TCL_ERROR; + if ( matlev == NULL ) + return TCL_ERROR; if ( matx->type != TYPE_FLOAT || maty->type != TYPE_FLOAT || @@ -2337,11 +2404,14 @@ clev = NULL; matx = Tcl_GetMatrixPtr( interp, argv[1] ); - if ( matx == NULL ) return TCL_ERROR; + if ( matx == NULL ) + return TCL_ERROR; maty = Tcl_GetMatrixPtr( interp, argv[2] ); - if ( maty == NULL ) return TCL_ERROR; + if ( maty == NULL ) + return TCL_ERROR; matz = Tcl_GetMatrixPtr( interp, argv[3] ); - if ( matz == NULL ) return TCL_ERROR; + if ( matz == NULL ) + return TCL_ERROR; matPtr = matz; /* For dumb indexer macro, grrrr. */ if ( matx->type != TYPE_FLOAT || @@ -2373,11 +2443,14 @@ clev = NULL; matx = Tcl_GetMatrixPtr( interp, argv[1] ); - if ( matx == NULL ) return TCL_ERROR; + if ( matx == NULL ) + return TCL_ERROR; maty = Tcl_GetMatrixPtr( interp, argv[2] ); - if ( maty == NULL ) return TCL_ERROR; + if ( maty == NULL ) + return TCL_ERROR; matz = Tcl_GetMatrixPtr( interp, argv[3] ); - if ( matz == NULL ) return TCL_ERROR; + if ( matz == NULL ) + return TCL_ERROR; matPtr = matz; /* For dumb indexer macro, grrrr. */ if ( matx->type != TYPE_FLOAT || @@ -2532,7 +2605,8 @@ } matz = Tcl_GetMatrixPtr( interp, argv[1] ); - if ( matz == NULL ) return TCL_ERROR; + if ( matz == NULL ) + return TCL_ERROR; if ( matz->dim != 2 ) { interp->result = "Must plot a 2-d matrix."; @@ -2577,9 +2651,11 @@ { pltrname = argv[0]; mattrx = Tcl_GetMatrixPtr( interp, argv[1] ); - if ( mattrx == NULL ) return TCL_ERROR; + if ( mattrx == NULL ) + return TCL_ERROR; mattry = Tcl_GetMatrixPtr( interp, argv[2] ); - if ( mattry == NULL ) return TCL_ERROR; + if ( mattry == NULL ) + return TCL_ERROR; argc -= 3, argv += 3; } @@ -2848,7 +2924,8 @@ } matz = Tcl_GetMatrixPtr( interp, argv[1] ); - if ( matz == NULL ) return TCL_ERROR; + if ( matz == NULL ) + return TCL_ERROR; if ( matz->dim != 2 ) { interp->result = "Must plot a 2-d matrix."; @@ -2878,7 +2955,8 @@ ymax = atof( argv[5] ); matclevel = Tcl_GetMatrixPtr( interp, argv[6] ); - if ( matclevel == NULL ) return TCL_ERROR; + if ( matclevel == NULL ) + return TCL_ERROR; nlevel = matclevel->n[0]; if ( matclevel->dim != 1 ) { @@ -2897,9 +2975,11 @@ { pltrname = argv[0]; mattrx = Tcl_GetMatrixPtr( interp, argv[1] ); - if ( mattrx == NULL ) return TCL_ERROR; + if ( mattrx == NULL ) + return TCL_ERROR; mattry = Tcl_GetMatrixPtr( interp, argv[2] ); - if ( mattry == NULL ) return TCL_ERROR; + if ( mattry == NULL ) + return TCL_ERROR; argc -= 3, argv += 3; } @@ -3125,10 +3205,10 @@ * x[], y[] are the coordinates to be plotted. \*--------------------------------------------------------------------------*/ -static const char *transform_name; /* Name of the procedure that transforms the +static const char *transform_name; /* Name of the procedure that transforms the * coordinates */ -static Tcl_Interp *tcl_interp; /* Pointer to the current interp */ -static int return_code; /* Saved return code */ +static Tcl_Interp *tcl_interp; /* Pointer to the current interp */ +static int return_code; /* Saved return code */ void mapform( PLINT n, PLFLT *x, PLFLT *y ) @@ -3160,7 +3240,8 @@ sprintf( cmd, "%cy", (char) 1 ); yPtr = Tcl_GetMatrixPtr( tcl_interp, cmd ); - if ( xPtr == NULL || yPtr == NULL ) return; /* Impossible, but still */ + if ( xPtr == NULL || yPtr == NULL ) + return; /* Impossible, but still */ for ( i = 0; i < n; i++ ) { Modified: trunk/bindings/tk/plframe.c =================================================================== --- trunk/bindings/tk/plframe.c 2010-09-13 01:57:39 UTC (rev 11175) +++ trunk/bindings/tk/plframe.c 2010-09-13 02:01:25 UTC (rev 11176) @@ -1253,10 +1253,14 @@ x1 = x0 + dx; y1 = y0 + dy; - if ( x1 < xmin ) dx = xmin - x0; - if ( y1 < ymin ) dy = ymin - y0; - if ( x1 > xmax ) dx = xmax - x0; - if ( y1 > ymax ) dy = ymax - y0; + if ( x1 < xmin ) + dx = xmin - x0; + if ( y1 < ymin ) + dy = ymin - y0; + if ( x1 > xmax ) + dx = xmax - x0; + if ( y1 > ymax ) + dy = ymax - y0; /* Engage... */ Modified: trunk/drivers/aqt.c =================================================================== --- trunk/drivers/aqt.c 2010-09-13 01:57:39 UTC (rev 11175) +++ trunk/drivers/aqt.c 2010-09-13 02:01:25 UTC (rev 11176) @@ -647,7 +647,8 @@ /* initialize the attributed string */ - for ( i = 0; i < MAX_STRING_LEN; i++ ) dummy[i] = 'i'; + for ( i = 0; i < MAX_STRING_LEN; i++ ) + dummy[i] = 'i'; dummy[MAX_STRING_LEN] = '\0'; str = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithCString:dummy]]; Modified: trunk/drivers/cairo.c =================================================================== --- trunk/drivers/cairo.c 2010-09-13 01:57:39 UTC (rev 11175) +++ trunk/drivers/cairo.c 2010-09-13 02:01:25 UTC (rev 11176) @@ -1273,7 +1273,7 @@ void filled_polygon( PLStream *pls, short *xa, short *ya, PLINT npts ) { - int i; + int i; PLCairo *aStream; aStream = (PLCairo *) pls->dev; @@ -2393,8 +2393,10 @@ aStream = stream_and_font_setup( pls, 0 ); /* Test byte order */ - if ( endianTest.testByte[0] == 1 ) aStream->bigendian = 0; - else aStream->bigendian = 1; + if ( endianTest.testByte[0] == 1 ) + aStream->bigendian = 0; + else + aStream->bigendian = 1; /* Check that user supplied us with some memory to draw in */ if ( pls->dev == NULL ) @@ -3056,7 +3058,8 @@ if ( aStream != NULL ) { - if ( aStream->hdc != NULL ) ReleaseDC( aStream->hwnd, aStream->hdc ); + if ( aStream->hdc != NULL ) + ReleaseDC( aStream->hwnd, aStream->hdc ); free_mem( pls->dev ); } } Modified: trunk/drivers/cgm.c =================================================================== --- trunk/drivers/cgm.c 2010-09-13 01:57:39 UTC (rev 11175) +++ trunk/drivers/cgm.c 2010-09-13 02:01:25 UTC (rev 11176) @@ -227,7 +227,8 @@ if ( !pls->colorset ) pls->color = 1; /* Is a color device */ - if ( pls->width < 1 ) pls->width = 1; /* set a legal line width */ + if ( pls->width < 1 ) + pls->width = 1; /* set a legal line width */ /* Initialize family file info */ plFamInit( pls ); @@ -409,7 +410,8 @@ cdPolygon( dev->im_out, points, pls->dev_npts ); - if ( dev->force_edges == 1 ) cdSetEdgeVis( dev->im_out, 0 ); /* Turn edges off now */ + if ( dev->force_edges == 1 ) + cdSetEdgeVis( dev->im_out, 0 ); /* Turn edges off now */ free( points ); } @@ -429,15 +431,15 @@ cgm_Dev *dev = (cgm_Dev *) pls->dev; PLFLT tmp_colour_pos; - cdImageColorClear( dev->im_out ); /* UNDOCUMENTED FUNCTION TO RESET THE + cdImageColorClear( dev->im_out ); /* UNDOCUMENTED FUNCTION TO RESET THE * INTERNAL COLOUR TABLE OF THE * CD DRIVER. Seems to work and fix * the errors */ - if ( ncol0 > cdMaxColors / 2 ) /* Check for ridiculous number of colours */ - { /* in ncol0, and appropriately adjust the */ - plwarn( "Too many colours in cmap0." ); /* number, issuing a */ - ncol0 = cdMaxColors / 2; /* warning if it does */ + if ( ncol0 > cdMaxColors / 2 ) /* Check for ridiculous number of colours */ + { /* in ncol0, and appropriately adjust the */ + plwarn( "Too many colours in cmap0." ); /* number, issuing a */ + ncol0 = cdMaxColors / 2; /* warning if it does */ pls->ncol0 = ncol0; } @@ -746,7 +748,8 @@ { cdImageCgm( dev->im_out, pls->OutFile ); } - for ( i = 0; i < cdMaxColors; ++i ) dev->colour_index[i] = -1; + for ( i = 0; i < cdMaxColors; ++i ) + dev->colour_index[i] = -1; dev->fill_colour = dev->colour; /* initially set fill and line colour the same */ dev->last_fill_colour = -1; /* set to -1 = unallocated */ Modified: trunk/drivers/dg300.c =================================================================== --- trunk/drivers/dg300.c 2010-09-13 01:57:39 UTC (rev 11175) +++ trunk/drivers/dg300.c 2010-09-13 02:01:25 UTC (rev 11176) @@ -68,7 +68,8 @@ printf( "\n\036\107\051\n" ); scanf( "%s", (char *) &termattr ); - while ( getchar() != '\n' ) ; + while ( getchar() != '\n' ) + ; if ( !strncmp( (char *) &termattr.ram[0], "0000", 4 ) ) { printf( "Please wait while graphics interpreter is downloaded.\n" ); @@ -129,7 +130,8 @@ { putchar( '\007' ); fflush( stdout ); - while ( getchar() != '\n' ) ; + while ( getchar() != '\n' ) + ; printf( "ERASE\n" ); } Modified: trunk/drivers/gcw.c =================================================================== --- trunk/drivers/gcw.c 2010-09-13 01:57:39 UTC (rev 11175) +++ trunk/drivers/gcw.c 2010-09-13 02:01:25 UTC (rev 11176) @@ -209,7 +209,8 @@ { pls->dev_text = TRUE; pls->dev_unicode = TRUE; - if ( hrshsym ) pls->dev_hrshsym = 1; + if ( hrshsym ) + pls->dev_hrshsym = 1; /* Initialize freetype */ plD_FreeType_init( pls ); @@ -310,7 +311,8 @@ dev->allow_resize = FALSE; /* The size is set an should not be changed */ gcw_install_canvas( NULL ); } - else dev->allow_resize = TRUE; /* Resizing allowed for canvasses + else + dev->allow_resize = TRUE; /* Resizing allowed for canvasses * provided via PLESC_DEVINIT */ @@ -350,8 +352,10 @@ plexit( "GCW driver <plD_polyline_gcw>: Canvas not found" ); canvas = dev->canvas; - if ( dev->use_persistence ) group = dev->group_persistent; - else group = dev->group_hidden; + if ( dev->use_persistence ) + group = dev->group_persistent; + else + group = dev->group_hidden; if ( dev->use_pixmap && !dev->use_persistence ) /* Write to bg pixmap */ @@ -514,14 +518,17 @@ /* Ignore if there is no hidden group. This means BOP has not been * called yet. */ - if ( !GNOME_IS_CANVAS_GROUP( dev->group_hidden ) ) return; + if ( !GNOME_IS_CANVAS_GROUP( dev->group_hidden ) ) + return; #ifdef DEBUG_GCW_1 gcw_debug( "<plD_eop_gcw>\n" ); #endif - if ( dev->use_persistence ) group = dev->group_persistent; - else group = dev->group_hidden; + if ( dev->use_persistence ) + group = dev->group_persistent; + else + group = dev->group_hidden; /* Retrieve the device width and height of the canvas */ width = *(PLINT*) g_object_get_data( G_OBJECT( canvas ), "canvas-width" ); @@ -585,7 +592,8 @@ gnome_canvas_item_raise_to_top( GNOME_CANVAS_ITEM( dev->group_persistent ) ); /* Move the background to the back */ - if ( GNOME_IS_CANVAS_ITEM( item ) ) gnome_canvas_item_lower_to_bottom( item ); + if ( GNOME_IS_CANVAS_ITEM( item ) ) + gnome_canvas_item_lower_to_bottom( item ); /* Make the hidden group visible */ gnome_canvas_item_show( GNOME_CANVAS_ITEM( dev->group_hidden ) ); @@ -598,7 +606,8 @@ } /* Clear the background pixmap */ - if ( !dev->use_persistence && dev->pixmap_has_data ) gcw_clear_background(); + if ( !dev->use_persistence && dev->pixmap_has_data ) + gcw_clear_background(); /* Name the hidden group as visible */ dev->group_visible = dev->group_hidden; @@ -652,8 +661,10 @@ if ( !GNOME_IS_CANVAS( dev->canvas ) ) { - if ( pls->hack ) return; /* Wait for a canvas via DEVINIT */ - else gcw_install_canvas( NULL ); + if ( pls->hack ) + return; /* Wait for a canvas via DEVINIT */ + else + gcw_install_canvas( NULL ); } canvas = dev->canvas; @@ -664,9 +675,12 @@ /* Replay escape calls that come in before PLESC_DEVINIT. Some of them * required a Canvas that didn't exist yet. */ - if ( dev->plstate_width ) plD_state_gcw( pls, PLSTATE_WIDTH ); - if ( dev->plstate_color0 ) plD_state_gcw( pls, PLSTATE_COLOR0 ); - if ( dev->plstate_color1 ) plD_state_gcw( pls, PLSTATE_COLOR1 ); + if ( dev->plstate_width ) + plD_state_gcw( pls, PLSTATE_WIDTH ); + if ( dev->plstate_color0 ) + plD_state_gcw( pls, PLSTATE_COLOR0 ); + if ( dev->plstate_color1 ) + plD_state_gcw( pls, PLSTATE_COLOR1 ); dev->plstate_width = FALSE; dev->plstate_color0 = FALSE; dev->plstate_color1 = FALSE; @@ -748,13 +762,20 @@ char opname[20], msg[100]; #ifdef DEBUG_GCW_1 - if ( op == PLSTATE_WIDTH ) strcpy( opname, "PLSTATE_WIDTH" ); - else if ( op == PLSTATE_COLOR0 ) strcpy( opname, "PLSTATE_COLOR0" ); - else if ( op == PLSTATE_COLOR1 ) strcpy( opname, "PLSTATE_COLOR1" ); - else if ( op == PLSTATE_FILL ) strcpy( opname, "PLSTATE_FILL" ); - else if ( op == PLSTATE_CMAP0 ) strcpy( opname, "PLSTATE_CMAP0" ); - else if ( op == PLSTATE_CMAP1 ) strcpy( opname, "PLSTATE_CMAP1" ); - else strcpy( opname, "unknown" ); + if ( op == PLSTATE_WIDTH ) + strcpy( opname, "PLSTATE_WIDTH" ); + else if ( op == PLSTATE_COLOR0 ) + strcpy( opname, "PLSTATE_COLOR0" ); + else if ( op == PLSTATE_COLOR1 ) + strcpy( opname, "PLSTATE_COLOR1" ); + else if ( op == PLSTATE_FILL ) + strcpy( opname, "PLSTATE_FILL" ); + else if ( op == PLSTATE_CMAP0 ) + strcpy( opname, "PLSTATE_CMAP0" ); + else if ( op == PLSTATE_CMAP1 ) + strcpy( opname, "PLSTATE_CMAP1" ); + else + strcpy( opname, "unknown" ); snprintf( msg, 100, "<plD_state_gcw />: %s\n", opname ); gcw_debug( msg ); #endif @@ -772,25 +793,30 @@ GDK_JOIN_MITER ); } } - else dev->plstate_width = TRUE; + else + dev->plstate_width = TRUE; break; case PLSTATE_COLOR0: if ( GNOME_IS_CANVAS( dev->canvas ) ) { dev->color = plcolor_to_rgba( pls->cmap0[pls->icol0], 0xFF ); - if ( dev->use_pixmap ) gcw_set_gdk_color(); + if ( dev->use_pixmap ) + gcw_set_gdk_color(); } - else dev->plstate_color0 = TRUE; + else + dev->plstate_color0 = TRUE; break; case PLSTATE_COLOR1: if ( GNOME_IS_CANVAS( dev->canvas ) ) { dev->color = plcolor_to_rgba( pls->cmap1[pls->icol1], 0xFF ); - if ( dev->use_pixmap ) gcw_set_gdk_color(); + if ( dev->use_pixmap ) + gcw_set_gdk_color(); } - else dev->plstate_color1 = TRUE; + else + dev->plstate_color1 = TRUE; break; case PLSTATE_FILL: @@ -837,8 +863,10 @@ plexit( "GCW driver <fill_polygon>: Canvas not found" ); canvas = dev->canvas; - if ( dev->use_persistence ) group = dev->group_persistent; - else group = dev->group_hidden; + if ( dev->use_persistence ) + group = dev->group_persistent; + else + group = dev->group_hidden; if ( dev->use_pixmap && !dev->use_persistence ) /* Write to a pixmap */ @@ -981,8 +1009,10 @@ plexit( "GCW driver <proc_str>: Canvas not found" ); canvas = dev->canvas; - if ( dev->use_persistence ) group = dev->group_persistent; - else group = dev->group_hidden; + if ( dev->use_persistence ) + group = dev->group_persistent; + else + group = dev->group_hidden; /* Retrieve the escape character */ plgesc( &esc ); @@ -1063,16 +1093,20 @@ /* Move to lower sub/sup position */ case 'd': case 'D': - if ( up > 0. ) scale *= 1.25; /* Subscript scaling parameter */ - else scale *= 0.8; /* Subscript scaling parameter */ + if ( up > 0. ) + scale *= 1.25; /* Subscript scaling parameter */ + else + scale *= 0.8; /* Subscript scaling parameter */ up -= font_size / 2.; break; /* Move to higher sub/sup position */ case 'u': case 'U': - if ( up < 0. ) scale *= 1.25; /* Subscript scaling parameter */ - else scale *= 0.8; /* Subscript scaling parameter */ + if ( up < 0. ) + scale *= 1.25; /* Subscript scaling parameter */ + else + scale *= 0.8; /* Subscript scaling parameter */ up += font_size / 2.; break; @@ -1092,12 +1126,14 @@ break; } /* switch(text[i]) */ - if ( text[i] != '#' ) i++; /* Move ahead to the next character */ + if ( text[i] != '#' ) + i++; /* Move ahead to the next character */ } /* if(text[i] == esc) */ - } /* if(text[i] & PL_FCI_MARK) */ + } /* if(text[i] & PL_FCI_MARK) */ - if ( i == Ntext ) continue; /* End of string */ + if ( i == Ntext ) + continue; /* End of string */ /* Save the sub/sup position */ up_list[N] = up; @@ -1126,7 +1162,8 @@ /* Differentiate between ## and escape sequences */ if ( text[i] == esc ) { - if ( !( i > 0 && text[i - 1] == esc ) ) break; + if ( !( i > 0 && text[i - 1] == esc ) ) + break; } gnome_glyphlist_glyph( glyphlist, @@ -1143,7 +1180,8 @@ /* Keep track of the total string width so that we can justify it */ total_width += width[N]; - if ( N != 0 ) total_width += 2; /* Add a little extra space */ + if ( N != 0 ) + total_width += 2; /* Add a little extra space */ /* Create the canvas text item */ if ( !GNOME_IS_CANVAS_ITEM( @@ -1206,7 +1244,8 @@ /* Keep track of the position in the string */ sum_width += width[i]; - if ( i != N - 1 ) sum_width += 2; /* Add a little extra space */ + if ( i != N - 1 ) + sum_width += 2; /* Add a little extra space */ } #ifdef DEBUG_GCW_2 @@ -1229,12 +1268,18 @@ #ifdef DEBUG_GCW_1 char opname[20], msg[100]; - if ( op == PLESC_DEVINIT ) strcpy( opname, "PLESC_DEVINIT" ); - else if ( op == PLESC_CLEAR ) strcpy( opname, "PLESC_CLEAR" ); - else if ( op == PLESC_FILL ) strcpy( opname, "PLESC_FILL" ); - else if ( op == PLESC_HAS_TEXT ) strcpy( opname, "PLESC_HAS_TEXT" ); - else if ( op == PLESC_GRAPH ) strcpy( opname, "PLESC_GRAPH" ); - else strcpy( opname, "unknown" ); + if ( op == PLESC_DEVINIT ) + strcpy( opname, "PLESC_DEVINIT" ); + else if ( op == PLESC_CLEAR ) + strcpy( opname, "PLESC_CLEAR" ); + else if ( op == PLESC_FILL ) + strcpy( opname, "PLESC_FILL" ); + else if ( op == PLESC_HAS_TEXT ) + strcpy( opname, "PLESC_HAS_TEXT" ); + else if ( op == PLESC_GRAPH ) + strcpy( opname, "PLESC_GRAPH" ); + else + strcpy( opname, "unknown" ); snprintf( msg, 100, "<plD_esc_gcw />: %s\n", opname ); gcw_debug( msg ); #endif Modified: trunk/drivers/gd.c =================================================================== --- trunk/drivers/gd.c 2010-09-13 01:57:39 UTC (rev 11175) +++ trunk/drivers/gd.c 2010-09-13 02:01:25 UTC (rev 11176) @@ -427,7 +427,8 @@ NCOLOURS = 16777216; } - if ( ( dev->palette == 0 ) && ( dev->optimise == 0 ) && ( smooth_line == 1 ) ) dev->smooth = 1; /* Allow smoothing of lines if we have a truecolour device */ + if ( ( dev->palette == 0 ) && ( dev->optimise == 0 ) && ( smooth_line == 1 ) ) + dev->smooth = 1; /* Allow smoothing of lines if we have a truecolour device */ #endif @@ -1080,8 +1081,10 @@ pls->page++; - if ( dev->black15 ) plD_black15_gd( pls ); - if ( dev->red15 ) plD_red15_gd( pls ); + if ( dev->black15 ) + plD_black15_gd( pls ); + if ( dev->red15 ) + plD_red15_gd( pls ); #if GD2_VERS >= 2 if ( ( ( ( ( dev->truecolour > 0 ) && ( dev->palette > 0 ) ) || /* In an EXTREMELY convaluted */ @@ -1256,7 +1259,8 @@ char *bbuf; bbuf = calloc( 256, (size_t) 1 ); /* Allocate a buffer to "check off" colours as they are used */ - if ( bbuf == NULL ) plexit( "plD_gd_optimise: Out of memory." ); + if ( bbuf == NULL ) + plexit( "plD_gd_optimise: Out of memory." ); for ( i = 0; i < ( pls->xlength - 1 ); i++ ) /* Walk through the image pixel by pixel */ { /* checking to see what colour it is */ @@ -1268,7 +1272,8 @@ for ( i = 0; i < 256; i++ ) /* next walk over the colours and deallocate */ { /* unused ones */ - if ( bbuf[i] == 0 ) gdImageColorDeallocate( dev->im_out, i ); + if ( bbuf[i] == 0 ) + gdImageColorDeallocate( dev->im_out, i ); } free( bbuf ); Modified: trunk/drivers/ljiip.c =================================================================== --- trunk/drivers/ljiip.c 2010-09-13 01:57:39 UTC (rev 11175) +++ trunk/drivers/ljiip.c 2010-09-13 02:01:25 UTC (rev 11176) @@ -251,7 +251,8 @@ width = floor( 0.5 + width * ( tmp * tmp * tmp * ( 1.0 - 0.707107 ) + 0.707107 ) ); - if ( width < 1 ) width = 1; + if ( width < 1 ) + width = 1; if ( width > 1 ) { for ( i = 0; i < width; i++ ) @@ -392,7 +393,8 @@ /* find last non-zero byte */ last = BPROW - 1; - while ( last > 0 && p[last] == 0 ) last--; + while ( last > 0 && p[last] == 0 ) + last--; last++; /* translate to mode 2, save results in t_buf[] */ @@ -406,7 +408,8 @@ if ( i < last - 2 && ( c == p[i + 1] ) && ( c == p[i + 2] ) ) { j = i + 3; - while ( j < jmax && c == p[j] ) j++; + while ( j < jmax && c == p[j] ) + j++; t_buf[n++] = ( i - j + 1 ) & 0xff; t_buf[n++] = c; i = j; @@ -416,7 +419,8 @@ for ( j = i + 1; j < jmax; j++ ) { if ( j < last - 2 && ( p[j] == p[j + 1] ) && - ( p[j + 1] == p[j + 2] ) ) break; + ( p[j + 1] == p[j + 2] ) ) + break; } t_buf[n++] = j - i - 1; while ( i < j ) Modified: trunk/drivers/pbm.c =================================================================== --- trunk/drivers/pbm.c 2010-09-13 01:57:39 UTC (rev 11175) +++ trunk/drivers/pbm.c 2010-09-13 02:01:25 UTC (rev 11176) @@ -179,12 +179,16 @@ plot( x, y, pls ); while ( e >= 0 ) { - if ( change == 1 ) x += s1; - else y += s2; + if ( change == 1 ) + x += s1; + else + y += s2; e = e - 2 * dx; } - if ( change == 1 ) y += s2; - else x += s1; + if ( change == 1 ) + y += s2; + else + x += s1; e = e + 2 * dy; } } Modified: trunk/drivers/plplotcanvas-hacktext.c =================================================================== --- trunk/drivers/plplotcanvas-hacktext.c 2010-09-13 01:57:39 UTC (rev 11175) +++ trunk/drivers/plplotcanvas-hacktext.c 2010-09-13 02:01:25 UTC (rev 11176) @@ -577,7 +577,8 @@ ArtIRect ibox; art_drect_to_irect( &ibox, &gbbox ); gnome_canvas_request_redraw( hacktext->item.canvas, ibox.x0, ibox.y0, ibox.x1, ibox.y1 ); - if ( bbox ) art_irect_union( bbox, bbox, &ibox ); + if ( bbox ) + art_irect_union( bbox, bbox, &ibox ); } } Modified: trunk/drivers/ps.c =================================================================== --- trunk/drivers/ps.c 2010-09-13 01:57:39 UTC (rev 11175) +++ trunk/drivers/ps.c 2010-09-13 02:01:25 UTC (rev 11176) @@ -168,8 +168,10 @@ pls->xlength = 540; pls->ylength = 720; } - if ( pls->xdpi <= 0 ) pls->xdpi = 72.; - if ( pls->ydpi <= 0 ) pls->ydpi = 72.; + if ( pls->xdpi <= 0 ) + pls->xdpi = 72.; + if ( pls->ydpi <= 0 ) + pls->ydpi = 72.; pxlx = YPSSIZE / LPAGE_X; pxly = XPSSIZE / LPAGE_Y; @@ -178,7 +180,8 @@ { pls->dev_text = 1; /* want to draw text */ pls->dev_unicode = 1; /* want unicode */ - if ( hrshsym ) pls->dev_hrshsym = 1; /* want Hershey symbols */ + if ( hrshsym ) + pls->dev_hrshsym = 1; /* want Hershey symbols */ } pls->dev_fill0 = 1; /* Can do solid fills */ @@ -984,19 +987,24 @@ pldebug( "proc_str", "string-specified fci = 0x%x, font name = %s\n", fci, font ); continue; } - else switch ( *cur_strp++ ) + else + switch ( *cur_strp++ ) { case 'd': case 'D': - if ( up > 0. ) scale *= 1.25; /* Subscript scaling parameter */ - else scale *= 0.8; /* Subscript scaling parameter */ + if ( up > 0. ) + scale *= 1.25; /* Subscript scaling parameter */ + else + scale *= 0.8; /* Subscript scaling parameter */ up -= font_factor * ENLARGE * ft_ht / 2.; break; case 'u': case 'U': - if ( up < 0. ) scale *= 1.25; /* Subscript scaling parameter */ - else scale *= 0.8; /* Subscript scaling parameter */ + if ( up < 0. ) + scale *= 1.25; /* Subscript scaling parameter */ + else + scale *= 0.8; /* Subscript scaling parameter */ up += font_factor * ENLARGE * ft_ht / 2.; break; @@ -1022,7 +1030,8 @@ } *strp = '\0'; - if ( fabs( up ) < 0.001 ) up = 0.; /* Watch out for small differences */ + if ( fabs( up ) < 0.001 ) + up = 0.; /* Watch out for small differences */ /* Apply the scaling and the shear */ fprintf( OF, "/%s [%.3f %.3f %.3f %.3f 0 0] SF\n", @@ -1034,13 +1043,15 @@ /* if up/down escape sequences, save current point and adjust baseline; * take the shear into account */ - if ( up != 0. ) fprintf( OF, "gsave %.3f %.3f rmoveto\n", TRMFLT( up * tt[1] ), TRMFLT( up * tt[3] ) ); + if ( up != 0. ) + fprintf( OF, "gsave %.3f %.3f rmoveto\n", TRMFLT( up * tt[1] ), TRMFLT( up * tt[3] ) ); /* print the string */ fprintf( OF, "(%s) show\n", str ); /* back to baseline */ - if ( up != 0. ) fprintf( OF, "grestore (%s) stringwidth rmoveto\n", str ); + if ( up != 0. ) + fprintf( OF, "grestore (%s) stringwidth rmoveto\n", str ); } while ( *cur_strp ); fprintf( OF, "grestore\n" ); Modified: trunk/drivers/pstex.c =================================================================== --- trunk/drivers/pstex.c 2010-09-13 01:57:39 UTC (rev 11175) +++ trunk/drivers/pstex.c 2010-09-13 02:01:2... [truncated message content] |