"Fossies" - the Fresh Open Source Software Archive

Member "xosview-1.23/main.cc" (11 Jul 2020, 623 Bytes) of package /linux/misc/xosview-1.23.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "main.cc" see the Fossies "Dox" file reference documentation.

    1 //
    2 //  Copyright (c) 1994, 1995, 2006, 2007 by Mike Romberg ( mike.romberg@noaa.gov )
    3 //
    4 //  This file may be distributed under terms of the GPL
    5 //
    6 
    7 #include "xosview.h"
    8 #include <string.h>
    9 
   10 int main( int argc, char *argv[] ) {
   11   /*  Icky.  Need to check for -name option here.  */
   12   char** argp = argv;
   13   const char* instanceName = "xosview"; // Default value.
   14   while (argp && *argp)
   15   {
   16     if (!strncmp(*argp, "-name", 6))
   17       instanceName = argp[1];
   18     argp++;
   19   }  //  instanceName will end up pointing to the last such -name option.
   20   XOSView xosview( instanceName, argc, argv );
   21 
   22   xosview.run();
   23 
   24   return 0;
   25 }