Skip to content

Commit

Permalink
Merge pull request #2032 from gforney/devel
Browse files Browse the repository at this point in the history
smokeview source: correcion to ini file output when using -v option
  • Loading branch information
gforney authored Sep 24, 2024
2 parents 4d8f027 + b1c1053 commit de3df67
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
7 changes: 2 additions & 5 deletions Source/smokeview/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
12 changes: 7 additions & 5 deletions Source/smokeview/smokeview.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit de3df67

Please sign in to comment.