#!/bin/csh -f
#	$Source: /afs/sipb.mit.edu/project/sipb-athena/repository/src/kerberos/tools/k_indent,v $
#	$Author: ghudson $
#	$Header: /afs/sipb.mit.edu/project/sipb-athena/repository/src/kerberos/tools/k_indent,v 1.1 1996/06/02 08:24:16 ghudson Exp $
#
#  Copyright 1989 by the Massachusetts Institute of Technology.
# 
#  For copying and distribution information,
#  please see the file <mit-copyright.h>.
# 

set file=()
set prog=/usr/ucb/indent
set args=(-l72 -i4 -di8)

foreach i ($*)
   if ("$i" =~ -*) then
      set args=($args "$i")
   else
      set file=($file "$i")
   endif
end

if ($#file < 2) set args=($args -st)

switch ($#file)
case 0:
   $prog $args
   breaksw
case 1:
   cat $file[1] | $prog $args
   breaksw
default:
   $prog $args $file
   breaksw
endsw
