#!/bin/csh -f
#++++++++++++++++
# Copyright:    (C) 2008-2017 UDS/CNRS
# License:       GNU General Public License
#.IDENTIFICATION findacro
#.LANGUAGE       C-shell
#.AUTHOR         Francois Ochsenbein [CDS]
#.ENVIRONMENT    
#.KEYWORDS       
#.VERSION  1.0   18-Feb-1993
#.VERSION  1.1   04-Jan-1995: Use cdsarc
#.PURPOSE        Get All Details concerning Acronyms
#.COMMENTS       
#----------------
set D_BIN = `dirname $0`
set path = ($D_BIN /usr/local/bin /usr/bin /usr/ucb /bin)

set acl_con = "aclient cdsweb.u-strasbg.fr 1660"
set cgi_con = "aclient_cgi cdsweb.u-strasbg.fr"

set rcon="$acl_con"
which aclient |& grep -v ' ' >& /dev/null # note SUN needs the grep
if( $status > 0 || $?http_proxy ) set rcon="$cgi_con"

if ($#argv < 1) then
    echo "Usage: `basename $0` [cati] Acronym"
    exit 1
endif
set opt = ""
if ("$1" =~ -*) then
    set opt = "$1"
    shift
else
    if ($#argv == 1) then
    	set opt = "-1 cati $1"
	shift
    endif
endif
if ($#argv == 1) set opt = "$opt cati"
$rcon acro $opt $*:q
exit $status
