X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=tools%2Fif2img.cpp;h=d17409e29f75e6dcb95d26437f0b9be95fc264f3;hp=d9e7004ee25c504be31145fb363995fb839fa054;hb=1e88cf0f7fa4f690ea9f110e8ed3f2b5338d0a10;hpb=74a34e63a9a356e1467acdba65497ab15190dde0 diff --git a/tools/if2img.cpp b/tools/if2img.cpp index d9e7004..d17409e 100644 --- a/tools/if2img.cpp +++ b/tools/if2img.cpp @@ -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];