1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
|
/* main.c */
/*
* Vis5D system for visualizing five dimensional gridded data sets.
* Copyright (C) 1990 - 2000 Bill Hibbard, Johan Kellum, Brian Paul,
* Dave Santek, and Andre Battaiola.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* As a special exception to the terms of the GNU General Public
* License, you are permitted to link Vis5D with (and distribute the
* resulting source and executables) the LUI library (copyright by
* Stellar Computer Inc. and licensed for distribution with Vis5D),
* the McIDAS library, and/or the NetCDF library, where those
* libraries are governed by the terms of their own licenses.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#include "../config.h"
#include <stdio.h>
#include <string.h>
#include "analyze.h"
#include "file.h"
#include "grid.h"
#include "gui.h"
#include "select.h"
#include "ui.h"
#include "../src/v5d.h"
int Debug; /* -debug */
char *path = NULL; /* -path */
main( int argc, char *argv[] )
{
struct grid_db *db;
v5dstruct *v5dout;
int i;
int text_ui = 0;
db = alloc_grid_db();
v5dout = v5dNewStruct();
Debug = 0;
/* Read initial input files */
if (argc>1) {
for (i=1;i<argc;i++) {
if (strcmp(argv[i],"-t")==0) {
text_ui = 1;
}
else if (strcmp(argv[i],"-debug")==0) {
Debug = 1;
}
else if (strcmp(argv[i],"-path")==0) {
path = argv[i+1];
i++;
}
else {
get_file_info( argv[i], db );
}
}
}
analyze_grids( db );
select_all( db, ALL_BITS, 1 );
setup_defaults( db, v5dout, 1, 1, 1 );
if (text_ui) {
/* Text-based user interface */
ui_loop( db, v5dout );
}
else {
/* Graphical user interface */
make_gui();
gui_loop( db, v5dout );
}
return 0;
}
|