From: <ai...@us...> - 2013-12-17 01:27:17
|
Revision: 12873 http://sourceforge.net/p/plplot/code/12873 Author: airwin Date: 2013-12-17 01:27:14 +0000 (Tue, 17 Dec 2013) Log Message: ----------- Style previous commits. Modified Paths: -------------- trunk/bindings/tcl/tclAPI.c trunk/bindings/tk/plframe.c trunk/bindings/tk/pltkd.h trunk/bindings/tk/tcpip.c trunk/bindings/tk/tkMain.c trunk/drivers/pdf.c trunk/examples/c/x04c.c trunk/examples/c++/x31.cc trunk/src/plctrl.c trunk/src/pllegend.c Modified: trunk/bindings/tcl/tclAPI.c =================================================================== --- trunk/bindings/tcl/tclAPI.c 2013-12-17 01:25:27 UTC (rev 12872) +++ trunk/bindings/tcl/tclAPI.c 2013-12-17 01:27:14 UTC (rev 12873) @@ -695,7 +695,7 @@ int pls_auto_path( Tcl_Interp *interp ) { - int debug = plsc->debug; + int debug = plsc->debug; char *buf, *ptr = NULL, *dn; int return_code = TCL_OK; #ifdef DEBUG @@ -707,7 +707,7 @@ // Add TCL_DIR #ifdef TCL_DIR - if( debug ) + if ( debug ) fprintf( stderr, "adding %s to auto_path\n", TCL_DIR ); Tcl_SetVar( interp, "dir", TCL_DIR, TCL_GLOBAL_ONLY ); if ( tcl_cmd( interp, "set auto_path [linsert $auto_path 0 $dir]" ) == TCL_ERROR ) Modified: trunk/bindings/tk/plframe.c =================================================================== --- trunk/bindings/tk/plframe.c 2013-12-17 01:25:27 UTC (rev 12872) +++ trunk/bindings/tk/plframe.c 2013-12-17 01:27:14 UTC (rev 12873) @@ -1195,8 +1195,8 @@ dbug_enter( "PlFrameKeyEH" ); -#if !defined( __WIN32__ ) - nchars = XLookupString( event, string, 10, &keysym, &cs ); +#if !defined ( __WIN32__ ) + nchars = XLookupString( event, string, 10, &keysym, &cs ); #else nchars = 0; #endif @@ -2548,7 +2548,7 @@ (char *) NULL ); return TCL_ERROR; } -#if !defined( __WIN32__ ) +#if !defined ( __WIN32__ ) if ( ( iodev->fd = open( argv[1], O_RDONLY ) ) == -1 ) #else if ( 1 ) @@ -2560,10 +2560,10 @@ } iodev->type = 0; iodev->typeName = "fifo"; -#if !defined( __WIN32__ ) - iodev->file = fdopen( iodev->fd, "rb" ); +#if !defined ( __WIN32__ ) + iodev->file = fdopen( iodev->fd, "rb" ); #else - iodev->file = NULL; + iodev->file = NULL; #endif } @@ -2875,7 +2875,7 @@ if ( plFramePtr->plpr_cmd == NULL ) plFramePtr->plpr_cmd = plFindCommand( "plpr" ); -#if !defined( __WIN32__ ) +#if !defined ( __WIN32__ ) if ( ( plFramePtr->plpr_cmd == NULL ) || ( pid = fork() ) < 0 ) #else if ( 1 ) @@ -2888,7 +2888,7 @@ } else if ( pid == 0 ) { -#if !defined( __WIN32__ ) +#if !defined ( __WIN32__ ) if ( execl( plFramePtr->plpr_cmd, plFramePtr->plpr_cmd, sfnam, (char *) 0 ) ) #else Modified: trunk/bindings/tk/pltkd.h =================================================================== --- trunk/bindings/tk/pltkd.h 2013-12-17 01:25:27 UTC (rev 12872) +++ trunk/bindings/tk/pltkd.h 2013-12-17 01:27:14 UTC (rev 12873) @@ -22,8 +22,8 @@ #endif // Define the type pid_t - a dummy for the moment - for MS Windows -#if defined(__WIN32__) -typedef unsigned int pid_t; +#if defined ( __WIN32__ ) +typedef unsigned int pid_t; #endif // One of these holds the TK driver state information Modified: trunk/bindings/tk/tcpip.c =================================================================== --- trunk/bindings/tk/tcpip.c 2013-12-17 01:25:27 UTC (rev 12872) +++ trunk/bindings/tk/tcpip.c 2013-12-17 01:27:14 UTC (rev 12873) @@ -105,16 +105,16 @@ #include <sys/types.h> #include <fcntl.h> #include <ctype.h> -#if !defined( __WIN32__ ) +#if !defined ( __WIN32__ ) #include <sys/uio.h> #endif #include <errno.h> // Supply dummy macros for the low-level I/O functions - Windows -#if defined( __WIN32__ ) -#define read(a,b,c) 0 -#define close(a) -#define write(a,b,c) 0 +#if defined ( __WIN32__ ) +#define read( a, b, c ) 0 +#define close( a ) +#define write( a, b, c ) 0 #endif //extern int errno; Modified: trunk/bindings/tk/tkMain.c =================================================================== --- trunk/bindings/tk/tkMain.c 2013-12-17 01:25:27 UTC (rev 12872) +++ trunk/bindings/tk/tkMain.c 2013-12-17 01:27:14 UTC (rev 12873) @@ -108,11 +108,11 @@ // extern int isatty _ANSI_ARGS_((int fd)); // extern int read _ANSI_ARGS_((int fd, char *buf, size_t size)); // -#if !defined(__WIN32__) +#if !defined ( __WIN32__ ) extern char * strrchr _ANSI_ARGS_( ( CONST char *string, int c ) ); #else // On Windows we do not have a convenient console to work with -#define isatty( a ) 0 +#define isatty( a ) 0 #endif // @@ -204,7 +204,7 @@ // // Parse command-line arguments. // - fprintf( stderr, "Before Tk_ParseArgv\n"); + fprintf( stderr, "Before Tk_ParseArgv\n" ); if ( Tk_ParseArgv( interp, (Tk_Window) NULL, &argc, argv, argTable, 0 ) != TCL_OK ) @@ -212,7 +212,7 @@ fprintf( stderr, "%s\n", Tcl_GetStringResult( interp ) ); exit( 1 ); } - fprintf( stderr, "After Tk_ParseArgv\n"); + fprintf( stderr, "After Tk_ParseArgv\n" ); if ( name == NULL ) { if ( fileName != NULL ) @@ -315,7 +315,7 @@ // and "argv". Also set the "geometry" variable from the geometry // specified on the command line. // - fprintf( stderr, "Before Tcl_Merge\n"); + fprintf( stderr, "Before Tcl_Merge\n" ); args = Tcl_Merge( argc - 1, ( CONST char * CONST * )argv + 1 ); Tcl_SetVar( interp, "argv", args, TCL_GLOBAL_ONLY ); @@ -323,7 +323,7 @@ sprintf( buf, "%d", argc - 1 ); Tcl_SetVar( interp, "argc", buf, TCL_GLOBAL_ONLY ); - fprintf( stderr, "After Tcl_Merge\n"); + fprintf( stderr, "After Tcl_Merge\n" ); if ( geometry != NULL ) { Tcl_SetVar( interp, "geometry", geometry, TCL_GLOBAL_ONLY ); @@ -345,7 +345,7 @@ // // Invoke application-specific initialization. // - fprintf( stderr, "Before AppInit\n"); + fprintf( stderr, "Before AppInit\n" ); if ( ( *AppInit )( interp ) != TCL_OK ) { @@ -369,7 +369,7 @@ // // Process the startup script, if any. // - fprintf( stderr, "Before startup\n"); + fprintf( stderr, "Before startup\n" ); if ( script != NULL ) { @@ -384,7 +384,7 @@ // // Invoke the script specified on the command line, if any. // - fprintf( stderr, "Before source\n"); + fprintf( stderr, "Before source\n" ); if ( fileName != NULL ) { @@ -448,7 +448,7 @@ // are no windows left, Tk_MainLoop returns and we exit. // - fprintf( stderr, "Before Tk_MainLoop\n"); + fprintf( stderr, "Before Tk_MainLoop\n" ); Tk_MainLoop(); // @@ -502,10 +502,10 @@ int code, count; const char *res; -#if !defined(__WIN32__) +#if !defined ( __WIN32__ ) count = (int) read( fileno( stdin ), input, BUFFER_SIZE ); #else - count = fread( input, BUFFER_SIZE, sizeof( char ), stdin ); + count = fread( input, BUFFER_SIZE, sizeof ( char ), stdin ); #endif if ( count <= 0 ) { Modified: trunk/drivers/pdf.c =================================================================== --- trunk/drivers/pdf.c 2013-12-17 01:25:27 UTC (rev 12872) +++ trunk/drivers/pdf.c 2013-12-17 01:27:14 UTC (rev 12873) @@ -750,7 +750,7 @@ dup = 0.5 * ( 1.0 - sscale ); dev->fontScale = (HPDF_REAL) sscale; PSSetFont( dev, fci ); - dev->yOffset = (HPDF_REAL) (dev->fontSize * ( soffset * RISE_FACTOR + dup )); + dev->yOffset = (HPDF_REAL) ( dev->fontSize * ( soffset * RISE_FACTOR + dup ) ); } if ( ucs4[i] == (PLUNICODE) 'd' ) // Subscript { Modified: trunk/examples/c/x04c.c =================================================================== --- trunk/examples/c/x04c.c 2013-12-17 01:25:27 UTC (rev 12872) +++ trunk/examples/c/x04c.c 2013-12-17 01:27:14 UTC (rev 12873) @@ -125,8 +125,8 @@ line_styles[0] = 1; line_widths[0] = 1.; // note from the above opt_array the first symbol (and box) indices - // do not have to be specified, at least in C. For Fortran we need - // to set the symbols to be something, since the string is always + // do not have to be specified, at least in C. For Fortran we need + // to set the symbols to be something, since the string is always // copied as part of the bindings. symbols[0] = ""; Modified: trunk/examples/c++/x31.cc =================================================================== --- trunk/examples/c++/x31.cc 2013-12-17 01:25:27 UTC (rev 12872) +++ trunk/examples/c++/x31.cc 2013-12-17 01:27:14 UTC (rev 12873) @@ -288,7 +288,6 @@ } delete pls; - } int main( int argc, const char **argv ) Modified: trunk/src/plctrl.c =================================================================== --- trunk/src/plctrl.c 2013-12-17 01:25:27 UTC (rev 12872) +++ trunk/src/plctrl.c 2013-12-17 01:27:14 UTC (rev 12873) @@ -698,11 +698,11 @@ if ( alt_hue_path == NULL ) plsc->cmap1cp[n].alt_hue_path = 0; else - if ( n != npts-1 ) - plsc->cmap1cp[n].alt_hue_path = alt_hue_path[n]; - else - // Note final element is unused, so we set to zero for completeness. - plsc->cmap1cp[n].alt_hue_path = 0; + if ( n != npts - 1 ) + plsc->cmap1cp[n].alt_hue_path = alt_hue_path[n]; + else + // Note final element is unused, so we set to zero for completeness. + plsc->cmap1cp[n].alt_hue_path = 0; } // Calculate and set color map @@ -784,11 +784,11 @@ if ( alt_hue_path == NULL ) plsc->cmap1cp[n].alt_hue_path = 0; else - if ( n != npts-1 ) - plsc->cmap1cp[n].alt_hue_path = alt_hue_path[n]; - else - // Note final element is unused, so we set to zero for completeness. - plsc->cmap1cp[n].alt_hue_path = 0; + if ( n != npts - 1 ) + plsc->cmap1cp[n].alt_hue_path = alt_hue_path[n]; + else + // Note final element is unused, so we set to zero for completeness. + plsc->cmap1cp[n].alt_hue_path = 0; } // Calculate and set color map @@ -1726,7 +1726,7 @@ fuzzy_range_check( g[i], 0., 1., FUZZ_EPSILON, 2 ); fuzzy_range_check( b[i], 0., 1., FUZZ_EPSILON, 3 ); fuzzy_range_check( pos[i], 0., 1., FUZZ_EPSILON, 4 ); - if ( ( return_sscanf == 5 ) && ( i != number_colors - 1 ) ) + if ( ( return_sscanf == 5 ) && ( i != number_colors - 1 ) ) { // Next to oldest tk format with alt_hue_path specified. alt_hue_path[i] = (PLBOOL) alt_hue_path_i; Modified: trunk/src/pllegend.c =================================================================== --- trunk/src/pllegend.c 2013-12-17 01:25:27 UTC (rev 12872) +++ trunk/src/pllegend.c 2013-12-17 01:27:14 UTC (rev 12873) @@ -933,14 +933,14 @@ static void remove_characters( char *string, const char *characters ) { - char *src, *dst; + char *src, *dst; const char *ptr; - for(src=dst=string; *src != '\0'; src++) + for ( src = dst = string; *src != '\0'; src++ ) { ptr = characters; - while ( (*ptr != '\0') && (*src != *ptr) ) + while ( ( *ptr != '\0' ) && ( *src != *ptr ) ) ptr++; - if (*src != *ptr) + if ( *src != *ptr ) { *dst = *src; dst++; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |