From 055746310d16a2766297346b98a5a4cc896ec0e3 Mon Sep 17 00:00:00 2001 From: gforney Date: Sun, 2 Aug 2026 19:39:55 -0400 Subject: [PATCH] smokeview source:make if and for statement formatting consistent - remove leading and trailing blanks --- Source/shared/dmalloc.c | 2 +- Source/shared/md5.c | 28 +++++------ Source/shared/readhvac.c | 2 +- Source/shared/readimage.c | 4 +- Source/shared/readobject.c | 10 ++-- Source/shared/readsmvfile.c | 8 +-- Source/shared/readtour.c | 2 +- Source/shared/sha1.c | 31 ++++++------ Source/shared/sha256.c | 59 ++++++++++------------- Source/shared/stdio_buffer.c | 2 +- Source/shared/translate.c | 2 +- Source/smokeview/IOboundary.c | 2 +- Source/smokeview/IOgeometry.c | 6 +-- Source/smokeview/IOiso.c | 2 +- Source/smokeview/IOpart.c | 2 +- Source/smokeview/IOslice.c | 2 +- Source/smokeview/IOsmoke.c | 2 +- Source/smokeview/IOwui.c | 2 +- Source/smokeview/callbacks.c | 14 +++--- Source/smokeview/drawGeometry.c | 2 +- Source/smokeview/glui_colorbar.cpp | 2 +- Source/smokeview/include/glui/glui.h | 6 +-- Source/smokeview/include/glui/viewmodel.h | 2 +- Source/smokeview/menus.c | 4 +- Source/smokeview/readsmv.c | 6 +-- Source/smokeview/showscene.c | 2 +- Source/smokeview/smokeviewdefs.h | 8 +-- Source/smokeview/smv_geometry.c | 18 +++---- Source/smokeview/update.c | 4 +- 29 files changed, 110 insertions(+), 126 deletions(-) diff --git a/Source/shared/dmalloc.c b/Source/shared/dmalloc.c index a739ba77d..3d2747edb 100644 --- a/Source/shared/dmalloc.c +++ b/Source/shared/dmalloc.c @@ -597,7 +597,7 @@ mallocflag CreateBlockInfo(bbyte *pbNew, size_t sizeNew){ assert(pbNew != NULL && sizeNew != 0); pbi = (blockinfo *)malloc(sizeof(blockinfo)); - if( pbi != NULL){ + if(pbi != NULL){ pbi->pb = pbNew; pbi->size = sizeNew; pbi->pbiNext = pbiHead; diff --git a/Source/shared/md5.c b/Source/shared/md5.c index 86562b807..2e1f4c9b9 100644 --- a/Source/shared/md5.c +++ b/Source/shared/md5.c @@ -52,7 +52,7 @@ /* Implementation that should never be optimized out by the compiler */ /* ------------------ mbedtls_zeroize ------------------------ */ -static void mbedtls_zeroize( void *v, size_t n ){ +static void mbedtls_zeroize( void *v, size_t n){ volatile unsigned char *p = v; while( n-- ) *p++ = 0; } @@ -90,7 +90,7 @@ void mbedtls_md5_init( mbedtls_md5_context *ctx ) void mbedtls_md5_free( mbedtls_md5_context *ctx ) { - if( ctx == NULL ) + if(ctx == NULL) return; mbedtls_zeroize( ctx, sizeof( mbedtls_md5_context ) ); @@ -257,7 +257,7 @@ void mbedtls_md5_update( mbedtls_md5_context *ctx, const unsigned char *input, s size_t fill; uint32_t left; - if( ilen == 0 ) + if(ilen == 0) return; left = ctx->total[0] & 0x3F; @@ -266,11 +266,10 @@ void mbedtls_md5_update( mbedtls_md5_context *ctx, const unsigned char *input, s ctx->total[0] += (uint32_t) ilen; ctx->total[0] &= 0xFFFFFFFF; - if( ctx->total[0] < (uint32_t) ilen ) + if(ctx->total[0] < (uint32_t) ilen ) ctx->total[1]++; - if( left && ilen >= fill ) - { + if(left && ilen >= fill){ memcpy( (void *) (ctx->buffer + left), input, fill ); mbedtls_md5_process( ctx, ctx->buffer ); input += fill; @@ -285,8 +284,7 @@ void mbedtls_md5_update( mbedtls_md5_context *ctx, const unsigned char *input, s ilen -= 64; } - if( ilen > 0 ) - { + if(ilen > 0){ memcpy( (void *) (ctx->buffer + left), input, ilen ); } } @@ -395,26 +393,24 @@ int mbedtls_md5_self_test( int verbose ) int i; unsigned char md5sum[16]; - for( i = 0; i < 7; i++ ) - { - if( verbose != 0 ) + for(i = 0; i < 7; i++){ + if(verbose != 0 ) mbedtls_printf( " MD5 test #%d: ", i + 1 ); mbedtls_md5( md5_test_buf[i], md5_test_buflen[i], md5sum ); - if( memcmp( md5sum, md5_test_sum[i], 16 ) != 0 ) - { - if( verbose != 0 ) + if(memcmp( md5sum, md5_test_sum[i], 16 ) != 0){ + if(verbose != 0 ) mbedtls_printf( "failed\n" ); return( 1 ); } - if( verbose != 0 ) + if(verbose != 0 ) mbedtls_printf( "passed\n" ); } - if( verbose != 0 ) + if(verbose != 0 ) mbedtls_printf( "\n" ); return( 0 ); diff --git a/Source/shared/readhvac.c b/Source/shared/readhvac.c index 9fbf6bece..f271b6041 100644 --- a/Source/shared/readhvac.c +++ b/Source/shared/readhvac.c @@ -222,7 +222,7 @@ void GetCellXYZs(float *xyz, int nxyz, int ncells, float **xyz_cellptr, fractions_cell[ncells] = 1.0; int i1, i2, nmerge; - for(i1 = 0, i2 = 0, nmerge = 0; i1 < nxyz || i2 < ncells; ){ + for(i1 = 0, i2 = 0, nmerge = 0; i1 < nxyz || i2 < ncells;){ if(i1 >= nxyz){ fractions_both[nmerge++] = fractions_cell[i2++]; continue; diff --git a/Source/shared/readimage.c b/Source/shared/readimage.c index 8de1504c4..55d6528d2 100644 --- a/Source/shared/readimage.c +++ b/Source/shared/readimage.c @@ -27,7 +27,7 @@ unsigned char *ReadJPEG(const char *filename,int *width, int *height, int *is_tr HEIGHT=gdImageSY(image); *width=WIDTH; *height=HEIGHT; - if( NewMemory((void **)&dataptr,(unsigned int)(4*WIDTH*HEIGHT) )==0){ + if(NewMemory((void **)&dataptr,(unsigned int)(4*WIDTH*HEIGHT) )==0){ gdImageDestroy(image); return NULL; } @@ -69,7 +69,7 @@ unsigned char *ReadPNG(const char *filename,int *width, int *height, int *is_tra fclose(file); *width=gdImageSX(image); *height=gdImageSY(image); - if( NewMemory((void **)&dataptr,(unsigned int)(4*(*width)*(*height)) )==0){ + if(NewMemory((void **)&dataptr,(unsigned int)(4*(*width)*(*height)) )==0){ gdImageDestroy(image); return NULL; } diff --git a/Source/shared/readobject.c b/Source/shared/readobject.c index 948307026..a17bd48fe 100644 --- a/Source/shared/readobject.c +++ b/Source/shared/readobject.c @@ -54,7 +54,7 @@ void FreeObject(sv_object *object){ frame_start = &object->first_frame; framei = frame_start->next; - for(; framei->next != NULL; ){ + for(; framei->next != NULL;){ sv_object_frame *next_frame; next_frame = framei->next; @@ -126,7 +126,7 @@ sv_object *GetSmvObjectType2(object_collection *objectscoll, char *olabel, if(strlen(labelptr) == 0) return default_object; object_start = objectscoll->object_def_first.next; objecti = object_start; - for(; objecti->next != NULL; ){ + for(; objecti->next != NULL;){ if(STRCMP(labelptr, objecti->label) == 0){ objecti->used = 1; return objecti; @@ -1283,7 +1283,7 @@ int ReadObjectDefs(object_collection *objectscoll, const char *file){ object_start = objectscoll->object_def_first.next; objecti = object_start; objectscoll->nobject_defs = 0; - for(; objecti->next != NULL; ){ + for(; objecti->next != NULL;){ CheckMemory; (objectscoll->nobject_defs)++; objecti->obj_frames = NULL; @@ -1303,7 +1303,7 @@ int ReadObjectDefs(object_collection *objectscoll, const char *file){ object_start = objectscoll->object_def_first.next; objecti = object_start; i = 0; - for(; objecti->next != NULL; ){ + for(; objecti->next != NULL;){ sv_object_frame *frame_start, *framei; CheckMemory; @@ -1312,7 +1312,7 @@ int ReadObjectDefs(object_collection *objectscoll, const char *file){ frame_start = objecti->first_frame.next; framei = frame_start; j = 0; - for(; framei->next != NULL; ){ + for(; framei->next != NULL;){ int npushpop = 0, ii; CheckMemory; diff --git a/Source/shared/readsmvfile.c b/Source/shared/readsmvfile.c index fb55c155f..775246556 100644 --- a/Source/shared/readsmvfile.c +++ b/Source/shared/readsmvfile.c @@ -3871,7 +3871,7 @@ int ParseSLCFProcess(smv_case *scase, int option, bufferstreamdata *stream, char if(FGETS(buffer, 255, stream)==NULL){ return RETURN_BREAK; } - if( (Match(buffer, "SLCF") == 1) || + if((Match(buffer, "SLCF") == 1) || (Match(buffer, "SLCC") == 1) || #ifdef pp_SLFC (Match(buffer, "SLFC") == 1) || @@ -4226,7 +4226,7 @@ int ParseSLCFProcess(smv_case *scase, int option, bufferstreamdata *stream, char sd->full_mesh = YES; } if(sd->slice_filetype==SLICE_CELL_CENTER){ - if( sd->is1==sd->is2&&sd->is1==1)sd->cell_center_edge = 1; + if(sd->is1==sd->is2&&sd->is1==1)sd->cell_center_edge = 1; if(sd->cell_center_edge==0&&sd->js1==sd->js2&&sd->js1==1)sd->cell_center_edge = 1; if(sd->cell_center_edge==0&&sd->ks1==sd->ks2&&sd->ks1==1)sd->cell_center_edge = 1; if(sd->cell_center_edge==0&&sd->is1==sd->is2&&sd->is1==meshi->ibar)sd->cell_center_edge = 1; @@ -5328,7 +5328,7 @@ int ReadSMV_Parse(smv_case *scase, bufferstreamdata *stream){ //*** SLCF - if( (MatchSMV(buffer, "SLCF") == 1) || + if((MatchSMV(buffer, "SLCF") == 1) || (MatchSMV(buffer, "SLCC") == 1) || #ifdef pp_SLFC (MatchSMV(buffer, "SLFC") == 1) || @@ -8621,7 +8621,7 @@ typedef struct { ++++++++++++++++++++++ SLCF ++++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */ - if( (MatchSMV(buffer, "SLCF") == 1) || + if((MatchSMV(buffer, "SLCF") == 1) || (MatchSMV(buffer, "SLCC") == 1) || #ifdef pp_SLFC (MatchSMV(buffer, "SLFC") == 1) || diff --git a/Source/shared/readtour.c b/Source/shared/readtour.c index 92f3b66f2..6b873eccb 100644 --- a/Source/shared/readtour.c +++ b/Source/shared/readtour.c @@ -210,7 +210,7 @@ keyframe *CopyFrame(const keyframe *framei) { void DeleteTourFrames(tourdata *thistour) { keyframe *frame; - for(frame = thistour->first_frame.next; frame->next != NULL; ){ + for(frame = thistour->first_frame.next; frame->next != NULL;){ keyframe *next; next = frame->next; diff --git a/Source/shared/sha1.c b/Source/shared/sha1.c index e9fa762c1..0bf98a2b1 100644 --- a/Source/shared/sha1.c +++ b/Source/shared/sha1.c @@ -53,7 +53,7 @@ /* ------------------ mbedtls_zeroize ------------------------ */ -static void mbedtls_zeroize( void *v, size_t n ){ +static void mbedtls_zeroize( void *v, size_t n){ volatile unsigned char *p = (unsigned char*)v; while( n-- ) *p++ = 0; } @@ -91,7 +91,7 @@ void mbedtls_sha1_init( mbedtls_sha1_context *ctx ) void mbedtls_sha1_free( mbedtls_sha1_context *ctx ) { - if( ctx == NULL ) + if(ctx == NULL) return; mbedtls_zeroize( ctx, sizeof( mbedtls_sha1_context ) ); @@ -292,7 +292,7 @@ void mbedtls_sha1_update( mbedtls_sha1_context *ctx, const unsigned char *input, size_t fill; uint32_t left; - if( ilen == 0 ) + if(ilen == 0) return; left = ctx->total[0] & 0x3F; @@ -301,11 +301,10 @@ void mbedtls_sha1_update( mbedtls_sha1_context *ctx, const unsigned char *input, ctx->total[0] += (uint32_t) ilen; ctx->total[0] &= 0xFFFFFFFF; - if( ctx->total[0] < (uint32_t) ilen ) + if(ctx->total[0] < (uint32_t) ilen) ctx->total[1]++; - if( left && ilen >= fill ) - { + if(left && ilen >= fill){ memcpy( (void *) (ctx->buffer + left), input, fill ); mbedtls_sha1_process( ctx, ctx->buffer ); input += fill; @@ -320,7 +319,7 @@ void mbedtls_sha1_update( mbedtls_sha1_context *ctx, const unsigned char *input, ilen -= 64; } - if( ilen > 0 ) + if(ilen > 0) memcpy( (void *) (ctx->buffer + left), input, ilen ); } @@ -424,18 +423,17 @@ int mbedtls_sha1_self_test( int verbose ) /* * SHA-1 */ - for( i = 0; i < 3; i++ ) + for(i = 0; i < 3; i++) { - if( verbose != 0 ) + if(verbose != 0 ) mbedtls_printf( " SHA-1 test #%d: ", i + 1 ); mbedtls_sha1_starts( &ctx ); - if( i == 2 ) - { + if(i == 2){ memset( buf, 'a', buflen = 1000 ); - for( j = 0; j < 1000; j++ ) + for(j = 0; j < 1000; j++) mbedtls_sha1_update( &ctx, buf, buflen ); } else @@ -444,20 +442,19 @@ int mbedtls_sha1_self_test( int verbose ) mbedtls_sha1_finish( &ctx, sha1sum ); - if( memcmp( sha1sum, sha1_test_sum[i], 20 ) != 0 ) - { - if( verbose != 0 ) + if(memcmp( sha1sum, sha1_test_sum[i], 20 ) != 0){ + if(verbose != 0 ) mbedtls_printf( "failed\n" ); ret = 1; goto exit; } - if( verbose != 0 ) + if(verbose != 0) mbedtls_printf( "passed\n" ); } - if( verbose != 0 ) + if(verbose != 0) mbedtls_printf( "\n" ); exit: diff --git a/Source/shared/sha256.c b/Source/shared/sha256.c index 891c88481..b6b5ce91d 100644 --- a/Source/shared/sha256.c +++ b/Source/shared/sha256.c @@ -56,7 +56,7 @@ /* ------------------ mbedtls_zeroize ------------------------ */ -static void mbedtls_zeroize( void *v, size_t n ){ +static void mbedtls_zeroize( void *v, size_t n){ volatile unsigned char *p = v; while( n-- ) *p++ = 0; } @@ -94,7 +94,7 @@ void mbedtls_sha256_init( mbedtls_sha256_context *ctx ) void mbedtls_sha256_free( mbedtls_sha256_context *ctx ) { - if( ctx == NULL ) + if(ctx == NULL) return; mbedtls_zeroize( ctx, sizeof( mbedtls_sha256_context ) ); @@ -119,8 +119,7 @@ void mbedtls_sha256_starts( mbedtls_sha256_context *ctx, int is224 ) ctx->total[0] = 0; ctx->total[1] = 0; - if( is224 == 0 ) - { + if(is224 == 0){ /* SHA-256 */ ctx->state[0] = 0x6A09E667; ctx->state[1] = 0xBB67AE85; @@ -201,13 +200,12 @@ void mbedtls_sha256_process( mbedtls_sha256_context *ctx, const unsigned char da uint32_t A[8]; unsigned int i; - for( i = 0; i < 8; i++ ) + for(i = 0; i < 8; i++) A[i] = ctx->state[i]; #if defined(MBEDTLS_SHA256_SMALLER) - for( i = 0; i < 64; i++ ) - { - if( i < 16 ) + for(i = 0; i < 64; i++){ + if(i < 16 ) GET_UINT32_BE( W[i], data, 4 * i ); else R( i ); @@ -218,11 +216,10 @@ void mbedtls_sha256_process( mbedtls_sha256_context *ctx, const unsigned char da A[3] = A[2]; A[2] = A[1]; A[1] = A[0]; A[0] = temp1; } #else /* MBEDTLS_SHA256_SMALLER */ - for( i = 0; i < 16; i++ ) + for(i = 0; i < 16; i++) GET_UINT32_BE( W[i], data, 4 * i ); - for( i = 0; i < 16; i += 8 ) - { + for(i = 0; i < 16; i += 8){ P( A[0], A[1], A[2], A[3], A[4], A[5], A[6], A[7], W[i+0], K[i+0] ); P( A[7], A[0], A[1], A[2], A[3], A[4], A[5], A[6], W[i+1], K[i+1] ); P( A[6], A[7], A[0], A[1], A[2], A[3], A[4], A[5], W[i+2], K[i+2] ); @@ -233,8 +230,7 @@ void mbedtls_sha256_process( mbedtls_sha256_context *ctx, const unsigned char da P( A[1], A[2], A[3], A[4], A[5], A[6], A[7], A[0], W[i+7], K[i+7] ); } - for( i = 16; i < 64; i += 8 ) - { + for(i = 16; i < 64; i += 8){ P( A[0], A[1], A[2], A[3], A[4], A[5], A[6], A[7], R(i+0), K[i+0] ); P( A[7], A[0], A[1], A[2], A[3], A[4], A[5], A[6], R(i+1), K[i+1] ); P( A[6], A[7], A[0], A[1], A[2], A[3], A[4], A[5], R(i+2), K[i+2] ); @@ -246,7 +242,7 @@ void mbedtls_sha256_process( mbedtls_sha256_context *ctx, const unsigned char da } #endif /* MBEDTLS_SHA256_SMALLER */ - for( i = 0; i < 8; i++ ) + for(i = 0; i < 8; i++) ctx->state[i] += A[i]; } #endif /* !MBEDTLS_SHA256_PROCESS_ALT */ @@ -263,7 +259,7 @@ void mbedtls_sha256_update( mbedtls_sha256_context *ctx, const unsigned char *in size_t fill; uint32_t left; - if( ilen == 0 ) + if(ilen == 0 ) return; left = ctx->total[0] & 0x3F; @@ -272,11 +268,10 @@ void mbedtls_sha256_update( mbedtls_sha256_context *ctx, const unsigned char *in ctx->total[0] += (uint32_t) ilen; ctx->total[0] &= 0xFFFFFFFF; - if( ctx->total[0] < (uint32_t) ilen ) + if(ctx->total[0] < (uint32_t) ilen) ctx->total[1]++; - if( left && ilen >= fill ) - { + if(left && ilen >= fill){ memcpy( (void *) (ctx->buffer + left), input, fill ); mbedtls_sha256_process( ctx, ctx->buffer ); input += fill; @@ -291,7 +286,7 @@ void mbedtls_sha256_update( mbedtls_sha256_context *ctx, const unsigned char *in ilen -= 64; } - if( ilen > 0 ) + if(ilen > 0) memcpy( (void *) (ctx->buffer + left), input, ilen ); } @@ -336,7 +331,7 @@ void mbedtls_sha256_finish( mbedtls_sha256_context *ctx, unsigned char output[32 PUT_UINT32_BE( ctx->state[5], output, 20 ); PUT_UINT32_BE( ctx->state[6], output, 24 ); - if( ctx->is224 == 0 ) + if(ctx->is224 == 0 ) PUT_UINT32_BE( ctx->state[7], output, 28 ); } @@ -425,9 +420,8 @@ int mbedtls_sha256_self_test( int verbose ) mbedtls_sha256_context ctx; buf = mbedtls_calloc( 1024, sizeof(unsigned char) ); - if( NULL == buf ) - { - if( verbose != 0 ) + if(NULL == buf){ + if(verbose != 0 ) mbedtls_printf( "Buffer allocation failed\n" ); return( 1 ); @@ -435,21 +429,19 @@ int mbedtls_sha256_self_test( int verbose ) mbedtls_sha256_init( &ctx ); - for( i = 0; i < 6; i++ ) - { + for(i = 0; i < 6; i++){ j = i % 3; k = i < 3; - if( verbose != 0 ) + if(verbose != 0 ) mbedtls_printf( " SHA-%d test #%d: ", 256 - k * 32, j + 1 ); mbedtls_sha256_starts( &ctx, k ); - if( j == 2 ) - { + if(j == 2){ memset( buf, 'a', buflen = 1000 ); - for( j = 0; j < 1000; j++ ) + for(j = 0; j < 1000; j++) mbedtls_sha256_update( &ctx, buf, buflen ); } else @@ -458,20 +450,19 @@ int mbedtls_sha256_self_test( int verbose ) mbedtls_sha256_finish( &ctx, sha256sum ); - if( memcmp( sha256sum, sha256_test_sum[i], 32 - k * 4 ) != 0 ) - { - if( verbose != 0 ) + if(memcmp( sha256sum, sha256_test_sum[i], 32 - k * 4 ) != 0){ + if(verbose != 0 ) mbedtls_printf( "failed\n" ); ret = 1; goto exit; } - if( verbose != 0 ) + if(verbose != 0 ) mbedtls_printf( "passed\n" ); } - if( verbose != 0 ) + if(verbose != 0 ) mbedtls_printf( "\n" ); exit: diff --git a/Source/shared/stdio_buffer.c b/Source/shared/stdio_buffer.c index 9daf21205..52933f8eb 100644 --- a/Source/shared/stdio_buffer.c +++ b/Source/shared/stdio_buffer.c @@ -261,7 +261,7 @@ filedata *fopen_buffer(char *filename, char *mode, int nthreads, int use_multith // only support r and rb modes (ascii and binary) if(mode==NULL)return NULL; - if( strcmp(mode, "r")!=0 && strcmp(mode, "rb")!=0 )return NULL; + if(strcmp(mode, "r")!=0 && strcmp(mode, "rb")!=0)return NULL; if(FILE_EXISTS(filename)==NO)return NULL; filesize = GetFileSizeSMV(filename); diff --git a/Source/shared/translate.c b/Source/shared/translate.c index a056bef8f..3cdc9f2df 100644 --- a/Source/shared/translate.c +++ b/Source/shared/translate.c @@ -102,7 +102,7 @@ int ParseLang(char *file, trdata **trinfoptr, int *ntrinfoptr){ tri->key=keybuf; } - for(doit=1; doit==1; ){ + for(doit=1; doit==1;){ doit=0; if(fgets(buffer,1000,stream)==NULL)break; buf=TrimFront(buffer); diff --git a/Source/smokeview/IOboundary.c b/Source/smokeview/IOboundary.c index 9d95c72b4..48842ba85 100644 --- a/Source/smokeview/IOboundary.c +++ b/Source/smokeview/IOboundary.c @@ -1739,7 +1739,7 @@ FILE_SIZE ReadBoundaryBndf(int ifile, int load_flag, int *errorcode){ } } START_TIMER(read_time); - for(ii=framestart; iintimes; ){ + for(ii=framestart; iintimes;){ if(loadpatchbysteps==UNCOMPRESSED_ALLFRAMES){ meshi->patchval_iframe = meshi->patchval + ii*meshi->npatchsize; } diff --git a/Source/smokeview/IOgeometry.c b/Source/smokeview/IOgeometry.c index 0d5162316..6f692d183 100644 --- a/Source/smokeview/IOgeometry.c +++ b/Source/smokeview/IOgeometry.c @@ -2956,7 +2956,7 @@ FILE_SIZE ReadGeom0(geomdata *geomi, int load_flag, int type, int *geom_frame_in // ijk 3*ntris // surf_ind ntris icount=-1; - for(iframe=-1; iframeis_terrain==1)continue; have_geom_triangles = 1; - if( (geomi->fdsblock == NOT_FDSBLOCK && geomi->geomtype!=GEOM_ISO)|| geomi->patchactive == 1)continue; + if((geomi->fdsblock == NOT_FDSBLOCK && geomi->geomtype!=GEOM_ISO)|| geomi->patchactive == 1)continue; for(itime = 0; itime < 2; itime++){ geomlistdata *geomlisti; int j; @@ -4813,7 +4813,7 @@ void ShowHideSortGeometry(int sort_geom, float *mm){ if(itime==1&&geomi->geomtype==GEOM_ISO){ if(plotstate != DYNAMIC_PLOTS)continue; if(use_tload_begin==1&&GetTime()global_scase.tload_end)continue; + if(use_tload_end==1&&GetTime()>global_scase.tload_end)continue; } for(j = 0; j < geomlisti->ntriangles; j++){ diff --git a/Source/smokeview/IOiso.c b/Source/smokeview/IOiso.c index 3f20fc1ab..d6cfa568e 100644 --- a/Source/smokeview/IOiso.c +++ b/Source/smokeview/IOiso.c @@ -1188,7 +1188,7 @@ void DrawIsoOrig(int tranflag){ void DrawIso(int tranflag){ if(niso_opaques>0||niso_trans>0){ if(use_tload_begin==1&&GetTime()global_scase.tload_end)return; + if(use_tload_end==1&&GetTime()>global_scase.tload_end)return; DrawIsoOrig(tranflag); } } diff --git a/Source/smokeview/IOpart.c b/Source/smokeview/IOpart.c index c94419a47..9882c6aec 100644 --- a/Source/smokeview/IOpart.c +++ b/Source/smokeview/IOpart.c @@ -590,7 +590,7 @@ void DrawPartFrame(int mode){ int i; if(use_tload_begin==1&&GetTime()global_scase.tload_end)return; + if(use_tload_end==1&&GetTime()>global_scase.tload_end)return; for(i=0; i0.0) || (show_timings==1 && smoke3d_timer>0.1) ){ + if((show_trirates==1 && smoke3d_timer>0.0) || (show_timings==1 && smoke3d_timer>0.1)){ float tri_fps = -1.0; printf("3D smoke "); diff --git a/Source/smokeview/IOwui.c b/Source/smokeview/IOwui.c index 58a59790f..1b3c07d91 100644 --- a/Source/smokeview/IOwui.c +++ b/Source/smokeview/IOwui.c @@ -683,7 +683,7 @@ void DrawTrees(void){ state=0; if(showtime==1&&global_times!=NULL){ assert(iglobal_times>=0); - if( treei->time_char>0.0&&GetTime()>treei->time_char)state=1; + if(treei->time_char>0.0&&GetTime()>treei->time_char)state=1; if(treei->time_complete>0.0&&GetTime()>treei->time_complete)state=2; } diff --git a/Source/smokeview/callbacks.c b/Source/smokeview/callbacks.c index 2b8b5ac8d..ab37b6a27 100644 --- a/Source/smokeview/callbacks.c +++ b/Source/smokeview/callbacks.c @@ -1469,7 +1469,7 @@ void MouseDragCB(int xm, int ym){ in_external=0; - if( colorbar_drag==1&&(showtime==1 || showplot3d==1)){ + if(colorbar_drag==1&&(showtime==1 || showplot3d==1)){ ColorbarDrag(xm,ym); GLUTPOSTREDISPLAY; return; @@ -3001,12 +3001,12 @@ void Keyboard(unsigned char key, int flag){ if(strncmp((const char *)&key2,"<",1)==0||strncmp((const char *)&key2,",",1)==0){ClipDir=-1;} else if(strncmp((const char *)&key2,">",1)==0||strncmp((const char *)&key2,".",1)==0){ClipDir=1;} - if(stepclip_xmin==1 )clip_i += skip_global*ClipDir; - if(stepclip_ymin==1 )clip_j += skip_global*ClipDir; - if(stepclip_zmin==1 )clip_k += skip_global*ClipDir; - if(stepclip_xmax==1 )global_scase.clip_I += skip_global*ClipDir; - if(stepclip_ymax==1 )global_scase.clip_J += skip_global*ClipDir; - if(stepclip_zmax==1 )global_scase.clip_K += skip_global*ClipDir; + if(stepclip_xmin==1)clip_i += skip_global*ClipDir; + if(stepclip_ymin==1)clip_j += skip_global*ClipDir; + if(stepclip_zmin==1)clip_k += skip_global*ClipDir; + if(stepclip_xmax==1)global_scase.clip_I += skip_global*ClipDir; + if(stepclip_ymax==1)global_scase.clip_J += skip_global*ClipDir; + if(stepclip_zmax==1)global_scase.clip_K += skip_global*ClipDir; UpdateClipbounds(clipinfo.clip_xmin,&clip_i,clipinfo.clip_xmax,&global_scase.clip_I,current_mesh->ibar); UpdateClipbounds(clipinfo.clip_ymin,&clip_j,clipinfo.clip_ymax,&global_scase.clip_J,current_mesh->jbar); diff --git a/Source/smokeview/drawGeometry.c b/Source/smokeview/drawGeometry.c index 198d810c4..c749b43f0 100644 --- a/Source/smokeview/drawGeometry.c +++ b/Source/smokeview/drawGeometry.c @@ -2589,7 +2589,7 @@ int IsVentVisible(ventdata *vi){ if(vi->wall_type == FRONTwall)return 1 - vis_boundary_type[FRONTwall]; if(vi->wall_type == BACKwall)return 1 - vis_boundary_type[BACKwall]; if(vi->wall_type == DOWNwall)return 1 - vis_boundary_type[DOWNwall]; - if(vi->wall_type == UPwall )return 1 - vis_boundary_type[UPwall]; + if(vi->wall_type == UPwall)return 1 - vis_boundary_type[UPwall]; return 0; //boundary file is visible so hide vent } diff --git a/Source/smokeview/glui_colorbar.cpp b/Source/smokeview/glui_colorbar.cpp index 9b9cd6399..0228d92f4 100644 --- a/Source/smokeview/glui_colorbar.cpp +++ b/Source/smokeview/glui_colorbar.cpp @@ -146,7 +146,7 @@ void ColorbarGeneral2Simple(colorbardata *cbi){ } ROLLOUT_cb_general->open(); if(cbi->nnodes > 5)colorbar_simple_type = 6; - if(cbi->nnodes < 2 )colorbar_simple_type = 0; + if(cbi->nnodes < 2)colorbar_simple_type = 0; RADIO_cb_simple_type->set_int_val(colorbar_simple_type); return; } diff --git a/Source/smokeview/include/glui/glui.h b/Source/smokeview/include/glui/glui.h index 4727b50d5..97d98a5a6 100644 --- a/Source/smokeview/include/glui/glui.h +++ b/Source/smokeview/include/glui/glui.h @@ -402,7 +402,7 @@ class GLUI_StdBitmaps GLUI_StdBitmaps( void ) { int i; - for( i=0; i