From b1c10535650a5067e1a8948324f68a10c2f9cf24 Mon Sep 17 00:00:00 2001 From: gforney Date: Tue, 24 Sep 2024 17:58:45 -0400 Subject: [PATCH] smokeview source: correcion to ini file output when using -v option --- Source/smokeview/main.c | 7 ++----- Source/smokeview/smokeview.c | 12 +++++++----- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/Source/smokeview/main.c b/Source/smokeview/main.c index 255ab0b3e..099007bff 100644 --- a/Source/smokeview/main.c +++ b/Source/smokeview/main.c @@ -820,14 +820,11 @@ int main(int argc, char **argv){ Which("fds", &fdsprog); #endif - if(smv_filename == NULL){ + if(smv_filename == NULL && show_version == 1){ + InitStartupDirs(); DisplayVersionInfo("Smokeview "); SMV_EXIT(0); } - if(show_version==1 || smv_filename==NULL){ - PRINTVERSION("smokeview"); - return 1; - } if(CheckSMVFile(smv_filename, smokeview_casedir)==0){ SMV_EXIT(1); } diff --git a/Source/smokeview/smokeview.c b/Source/smokeview/smokeview.c index 53c8f677c..21fc78f09 100644 --- a/Source/smokeview/smokeview.c +++ b/Source/smokeview/smokeview.c @@ -243,11 +243,13 @@ void DisplayVersionInfo(char *progname){ if(FileExistsOrig(fullini_filename)==0)strcpy(fullini_filename, ""); } } - if(strlen(fullini_filename)>0){ - PRINTF("Casename ini : %s\n", fullini_filename); - } - else{ - PRINTF("Casename ini : not found\n"); + if(smv_filename != NULL || show_version == 0){ + if(strlen(fullini_filename) > 0){ + PRINTF("Casename ini : %s\n", fullini_filename); + } + else{ + PRINTF("Casename ini : not found\n"); + } } FREEMEMORY(smv_progname); FREEMEMORY(smv_bindir);