Skip to content

Commit

Permalink
Merge pull request #1846 from gforney/master
Browse files Browse the repository at this point in the history
disable .sinfo file
  • Loading branch information
gforney authored Mar 20, 2024
2 parents c87d8a5 + 54f97e4 commit 1225e3d
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 58 deletions.
8 changes: 7 additions & 1 deletion Source/smokeview/IOslice.c
Original file line number Diff line number Diff line change
Expand Up @@ -3072,8 +3072,9 @@ void GetSliceParams(sliceparmdata *sp){
int error;

int build_cache=0;
FILE *stream;
FILE *stream=NULL;

#ifdef pp_SINFO
if(IfFirstLineBlank(sliceinfo_filename)==1){
build_cache=1;
stream=fopen(sliceinfo_filename,"w");
Expand All @@ -3082,6 +3083,9 @@ void GetSliceParams(sliceparmdata *sp){
build_cache=0;
stream=fopen(sliceinfo_filename,"r");
}
#else
build_cache=1;
#endif

INIT_PRINT_TIMER(timer_getsliceparams1);
for(i=0;i<sp->nsliceinfo;i++){
Expand Down Expand Up @@ -3135,7 +3139,9 @@ void GetSliceParams(sliceparmdata *sp){
nk = ks2+1-ks1;
sd->volslice = volslice;
error = 0;
#ifdef pp_SINFO
if(stream!=NULL&&doit_anyway==0)fprintf(stream,"%i %i %i %i %i %i %i %i %i %i %i\n",sd->seq_id,is1,is2,js1,js2,ks1,ks2,ni,nj,nk,sd->volslice);
#endif
}
}
else if(sd->compression_type!=UNCOMPRESSED){
Expand Down
16 changes: 12 additions & 4 deletions Source/smokeview/command_args.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ CommandlineArgs ParseCommandlineNew(int argc, char **argv, char *message,
strcpy(args.prog, argv[0]);
}
int i;
#ifdef pp_OSX_1X
#ifdef pp_OSX_HIGHRES
args.x1 = true;
args.x2 = false;
#endif
#endif
for (i = 1; i < argc; i++) {
if (strcmp(argv[i], "-ini") == 0) {
args.ini = true;
Expand All @@ -65,7 +71,9 @@ CommandlineArgs ParseCommandlineNew(int argc, char **argv, char *message,
#ifdef pp_OSX_HIGHRES
else if (strcmp(argv[i], "-1x") == 0) {
args.x1 = true;
args.x2 = false;
} else if (strcmp(argv[i], "-2x") == 0) {
args.x1 = false;
args.x2 = true;
}
#endif
Expand Down Expand Up @@ -207,22 +215,22 @@ CommandlineArgs ParseCommandlineNew(int argc, char **argv, char *message,
sscanf(argv[i],"%f",&args.max_mem_GB);
if(args.max_mem_GB<0.0)args.max_mem_GB = 0.0;
}
else if(strcmp(argv[i], "-x0") == 0 || strcmp(argv[i], "-screenX0") == 0) {
else if(strcmp(argv[i], "-x0") == 0) {
args.have_x0 = true;
i++;
sscanf(argv[i],"%i",&args.x0);
}
else if(strcmp(argv[i], "-y0") == 0 || strcmp(argv[i], "-screenY0") == 0) {
else if(strcmp(argv[i], "-y0") == 0) {
args.have_y0 = true;
i++;
sscanf(argv[i],"%i",&args.y0);
}
else if(strcmp(argv[i], "-X0") == 0 || strcmp(argv[i], "-dialogX0") == 0) {
else if(strcmp(argv[i], "-X0") == 0) {
args.have_X0 = true;
i++;
sscanf(argv[i], "%i", &args.X0);
}
else if(strcmp(argv[i], "-Y0") == 0 || strcmp(argv[i], "-dialogY0") == 0) {
else if(strcmp(argv[i], "-Y0") == 0) {
args.have_Y0 = true;
i++;
sscanf(argv[i], "%i", &args.Y0);
Expand Down
4 changes: 0 additions & 4 deletions Source/smokeview/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,6 @@ void Usage(char *prog,int option){
PRINTF("%s\n", _(" -y0 val - vertical screen coordinate in pixels where smokeview window is place at startup"));
PRINTF("%s\n", _(" -X0 val - horizontal screen coordinate in pixels where dialog windows are placed when opened"));
PRINTF("%s\n", _(" -Y0 val - vertical screen coordinate in pixels where dialog windows are placed when opened"));
PRINTF("%s\n", _(" -screenX0 val - same as -x0 val"));
PRINTF("%s\n", _(" -screenY0 val - same as -y0 val"));
PRINTF("%s\n", _(" -dialogX0 val - same as -X0 val"));
PRINTF("%s\n", _(" -dialogY0 val - same as -Y0 val"));
PRINTF("%s\n", _(" -volrender - generate images of volume rendered smoke and fire"));
UsageCommon(HELP_ALL);
}
Expand Down
3 changes: 3 additions & 0 deletions Source/smokeview/options.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@

#define pp_GBND // use .gbnd files

//#define pp_OSX_1X // use -1x option by default on macs

//#define pp_SLICE_MENU // make slice menu formation consistent (sort step, build step)
//#define pp_SLICE_MENU_DEBUG // output slice menu infoo to casename_sliceinfo.csv
//#define pp_SINFO // use .sinfo file to cache slice file info

//*** parallel file loading
#define pp_SLICE_MULTI // load slice files in parallel
Expand Down
49 changes: 0 additions & 49 deletions Source/smokeview/readsmv.c
Original file line number Diff line number Diff line change
Expand Up @@ -16028,31 +16028,6 @@ int ReadIni(char *inifile){
UpdateTerrainOptions();
}

// Read "smokeview.ini" from the user's config dir $HOME/.smokeview (Linux,
// OSX) or %userprofile%\.smokeview (Windows)
{
int returnval;

returnval = ReadIni2(smokeviewini_filename, 0);
if(returnval==2)return 2;
if(returnval == 0 && readini_output==1){
if(verbose_output==1)PRINTF("- complete\n");
}
}

// Read "smokeview.ini" from the current dir
{
int returnval;
char smokeviewini_localfilename[100];

strcpy(smokeviewini_localfilename, "smokeview.ini");
returnval = ReadIni2(smokeviewini_localfilename, 0);
if(returnval==2)return 2;
if(returnval==0&&readini_output==1){
if(verbose_output==1)PRINTF("- complete\n");
}
}

// Read "${fdsprefix}.ini" from the current directory
if(caseini_filename!=NULL){
int returnval;
Expand Down Expand Up @@ -16100,30 +16075,6 @@ int ReadIni(char *inifile){
UpdateRGBColors(COLORBAR_INDEX_NONE);
}

#ifdef SMOKEVIEW_CONFIG_PATH
{
// Read objects file pointed to be macro SMOKEVIEW_CONFIG_PATH. Useful
// when install paths differ per platform.
int returnval = ReadIni2(SMOKEVIEW_CONFIG_PATH, 0);
if (returnval == 2) return 2;
if (returnval == 0 && readini_output == 1) {
if (verbose_output == 1) PRINTF("- complete\n");
}
}
#endif

// Read objects file from the envar SMOKEVIEW_CONFIG
{
char *envar_config_path = getenv("SMOKEVIEW_CONFIG");
if (envar_config_path != NULL) {
int returnval = ReadIni2(envar_config_path, 0);
if (returnval == 2) return 2;
if (returnval == 0 && readini_output == 1) {
if (verbose_output == 1) PRINTF("- complete\n");
}
}
}

if(use_graphics==1){
if(showall_textures==1)TextureShowMenu(MENU_TEXTURE_SHOWALL);
}
Expand Down

0 comments on commit 1225e3d

Please sign in to comment.