r184: *** empty log message ***
[ctsim.git] / tools / if2img.cpp
index d9e7004ee25c504be31145fb363995fb839fa054..d17409e29f75e6dcb95d26437f0b9be95fc264f3 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: if2img.cpp,v 1.5 2000/08/22 17:03:54 kevin Exp $
+**  $Id: if2img.cpp,v 1.6 2000/08/25 15:59:13 kevin Exp $
 **
 **  This program is free software; you can redistribute it and/or modify
 **  it under the terms of the GNU General Public License (version 2) as
@@ -48,7 +48,7 @@ static struct option my_options[] =
   {0, 0, 0, 0}
 };
 
-static const char* g_szIdStr = "$Id: if2img.cpp,v 1.5 2000/08/22 17:03:54 kevin Exp $";
+static const char* g_szIdStr = "$Id: if2img.cpp,v 1.6 2000/08/25 15:59:13 kevin Exp $";
 
 enum { O_AUTO_FULL, O_AUTO_STD0_1, O_AUTO_STD0_5, O_AUTO_STD1, O_AUTO_STD2, O_AUTO_STD3 };
 static const char O_AUTO_FULL_STR[]="full";
@@ -259,12 +259,16 @@ if2img_main (int argc, char *const argv[])
        }
     }
 
+#if HAVE_SGP
+  if (optind + 1 == argc)
+    opt_format = O_FORMAT_DISP;  // display image if no options
+#endif
+
   if ((opt_format == O_FORMAT_DISP && optind + 1 != argc) 
-      || (opt_format != O_FORMAT_DISP && optind + 2 != argc))
-    {
-       if2img_usage(argv[0]);
-       return (1);
-    }
+      || (opt_format != O_FORMAT_DISP && optind + 2 != argc)) {
+    if2img_usage(argv[0]);
+    return (1);
+  }
   
   in_file = argv[optind];