#!/usr/bin/env perl

#:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# This file is part of G-language Genome Analysis Environment package
#
#     Copyright (C) 2001 - 2002 Keio University
#:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# 
#   $Id: gimv,v 1.2 2002/05/27 19:40:31 gaou Exp $
#
# G-language GAE 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.
# 
# G-language GAE 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 G-language GAE -- see the file COPYING.
# If not, write to the Free Software Foundation, Inc.,
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# 
#END_HEADER
#
# written by Kazuharu Arakawa <gaou@g-language.org> at
# G-language Project, Institute for Advanced Biosciences, Keio University.
#

package gimv;

use strict;

;#######################################################################
;#      constants
;#######################################################################

my $sHelp = 
    "\n===== gimv: G-language Manager Image Viewer =====\n\n" .
    "  Copyright (C) 2001 - 2002 G-language Project, Keio University\n" .
    "  version: 1.0.2\n" .
    "  usage:   gimv *.gif\n" ;

;#######################################################################
;#      main
;#######################################################################

if ($#ARGV < 0) {
     print $sHelp;
     exit(1);
}

foreach my $sDataFileName (@ARGV) {
    if (! -r $sDataFileName) {
	print "Data file $sDataFileName cannot be read.\n";
	last;
    }

    &gimv($sDataFileName);
}

exit;


sub gimv {
    my $file = shift;

    system("display $file &");
}

1;


