head	1.1;
branch	1.1.1;
access;
symbols
	RELENG_9_1_0_RELEASE:1.1.1.2
	RELENG_9_1:1.1.1.2.0.16
	RELENG_9_1_BP:1.1.1.2
	RELENG_8_3_0_RELEASE:1.1.1.2
	RELENG_8_3:1.1.1.2.0.14
	RELENG_8_3_BP:1.1.1.2
	RELENG_9_0_0_RELEASE:1.1.1.2
	RELENG_9_0:1.1.1.2.0.12
	RELENG_9_0_BP:1.1.1.2
	RELENG_9:1.1.1.2.0.10
	RELENG_9_BP:1.1.1.2
	RELENG_7_4_0_RELEASE:1.1.1.1.20.1
	RELENG_8_2_0_RELEASE:1.1.1.2
	RELENG_7_4:1.1.1.1.20.1.0.8
	RELENG_7_4_BP:1.1.1.1.20.1
	RELENG_8_2:1.1.1.2.0.8
	RELENG_8_2_BP:1.1.1.2
	RELENG_8_1_0_RELEASE:1.1.1.2
	RELENG_8_1:1.1.1.2.0.6
	RELENG_8_1_BP:1.1.1.2
	RELENG_7_3_0_RELEASE:1.1.1.1.20.1
	RELENG_7_3:1.1.1.1.20.1.0.6
	RELENG_7_3_BP:1.1.1.1.20.1
	RELENG_8_0_0_RELEASE:1.1.1.2
	RELENG_8_0:1.1.1.2.0.4
	RELENG_8_0_BP:1.1.1.2
	RELENG_8:1.1.1.2.0.2
	RELENG_8_BP:1.1.1.2
	RELENG_7_2_0_RELEASE:1.1.1.1.20.1
	RELENG_7_2:1.1.1.1.20.1.0.4
	RELENG_7_2_BP:1.1.1.1.20.1
	RELENG_7_1_0_RELEASE:1.1.1.1.20.1
	RELENG_6_4_0_RELEASE:1.1.1.1.10.1
	RELENG_7_1:1.1.1.1.20.1.0.2
	RELENG_7_1_BP:1.1.1.1.20.1
	RELENG_6_4:1.1.1.1.10.1.0.2
	RELENG_6_4_BP:1.1.1.1.10.1
	RELENG_7_0_0_RELEASE:1.1.1.1
	RELENG_6_3_0_RELEASE:1.1.1.1
	RELENG_7_0:1.1.1.1.0.24
	RELENG_7_0_BP:1.1.1.1
	RELENG_6_3:1.1.1.1.0.22
	RELENG_6_3_BP:1.1.1.1
	RELENG_7:1.1.1.1.0.20
	RELENG_7_BP:1.1.1.1
	RELENG_6_2_0_RELEASE:1.1.1.1
	RELENG_6_2:1.1.1.1.0.18
	RELENG_6_2_BP:1.1.1.1
	RELENG_5_5_0_RELEASE:1.1.1.1
	RELENG_5_5:1.1.1.1.0.16
	RELENG_5_5_BP:1.1.1.1
	RELENG_6_1_0_RELEASE:1.1.1.1
	RELENG_6_1:1.1.1.1.0.14
	RELENG_6_1_BP:1.1.1.1
	RELENG_6_0_0_RELEASE:1.1.1.1
	RELENG_6_0:1.1.1.1.0.12
	RELENG_6_0_BP:1.1.1.1
	RELENG_6:1.1.1.1.0.10
	RELENG_6_BP:1.1.1.1
	RELENG_5_4_0_RELEASE:1.1.1.1
	RELENG_5_4:1.1.1.1.0.8
	RELENG_5_4_BP:1.1.1.1
	RELENG_5_3_0_RELEASE:1.1.1.1
	RELENG_5_3:1.1.1.1.0.6
	RELENG_5_3_BP:1.1.1.1
	RELENG_5:1.1.1.1.0.4
	RELENG_5_BP:1.1.1.1
	amd_6_0_10p1:1.1.1.1
	RELENG_5_2_1_RELEASE:1.1.1.1
	RELENG_5_2_0_RELEASE:1.1.1.1
	RELENG_5_2:1.1.1.1.0.2
	RELENG_5_2_BP:1.1.1.1
	amd_6_0_9:1.1.1.1
	COLUMBIA:1.1.1;
locks; strict;
comment	@# @;


1.1
date	2003.09.02.15.27.37;	author mbr;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	2003.09.02.15.27.37;	author mbr;	state Exp;
branches
	1.1.1.1.10.1
	1.1.1.1.20.1;
next	1.1.1.2;

1.1.1.2
date	2007.12.05.14.20.30;	author obrien;	state dead;
branches;
next	;

1.1.1.1.10.1
date	2008.02.09.01.35.33;	author obrien;	state dead;
branches;
next	;

1.1.1.1.20.1
date	2008.01.30.03.18.55;	author obrien;	state dead;
branches;
next	;


desc
@@


1.1
log
@Initial revision
@
text
@#!/bin/sh
# indent all am-utils files
if [ ! -f amd/amd.c ]; then
    # maybe we are in a subdir
    echo cd ..
    cd ..
fi
if [ ! -f amd/amd.c ]; then
    echo "please run $0 from the top level of the am-utils source tree"
    exit 2
fi

# files="
# */*.[hc]
# */*.h.in
# conf/*/*.[hc]
# OLD/*/*.[hc]
# "
#files="conf/*/*.[hc]"
files="specify_the_file.c"

sunopts="
-npro
-nbad
-bap
-bbb
-nbc
-br
-ncdb
-d0
-di0
-nei
-eei
-nfc1
-i2
-lp
-nsc
-TIntFuncPtr
-Tadd_fn
-Taddrlist
-Tam_node
-Tam_ops
-Tam_opts
-Tam_stats
-Tamq_mount_info
-Tamq_mount_info_list
-Tamq_mount_stats
-Tamq_mount_tree
-Tamq_mount_tree_list
-Tamq_mount_tree_p
-Tamq_opt
-Tamq_setopt
-Tamq_string
-Tattrstat
-Tauto_tree
-Tautomount
-Tcallout
-Tcreateargs
-Tdict
-Tdict_data
-Tdict_ent
-Tdirlist
-Tdiropargs
-Tdiropokres
-Tdiropres
-Tdirpath
-Tdisk_fs
-Tentry
-Tether_if
-Texportnode
-Texports
-Tfattr
-Tfh_cache
-Tfhandle
-Tfhandle_t
-Tfhstatus
-Tfilename
-Tfserver
-Tfsmount
-Tftype
-Tfwd_fun
-Tgid_t
-Tgroupnode
-Tgroups
-Thost
-Tioloc
-Tkv
-Tlinkargs
-Tmap_type
-Tmnt_map
-Tmntfs
-Tmntlist
-Tmount
-Tmountbody
-Tmountlist
-Tname
-Tnfs_fh
-Tnfs_private
-Tnfscookie
-Tnfspath
-Tnfsstat
-Tnfstime
-Tnfsx_mnt
-Tnsw_lookup
-Tnsw_switchconfig
-Topt_apply
-Tpid_t
-Tpjob
-Tqelem
-Treadargs
-Treaddirargs
-Treaddirres
-Treadlinkres
-Treadokres
-Treadres
-Trenameargs
-Trpc_forward
-Tsattr
-Tsattrargs
-Tserv_state
-Tstatfsokres
-Tstatfsres
-Tsymlinkargs
-Ttask_fun
-Ttime_t
-Ttime_type
-Tuid2home_t
-Tuid_t
-Tusername2uid_t
-Tvffserver
-Tvfmount_fs
-Tvfs_init
-Tvfs_match
-Tvfumount_fs
-Tvmount_fs
-Tvmounted
-Tvoidp
-Tvumount_fs
-Tvumounted
-Twriteargs
"

gnuopts="
-npro
-nbad
-bap
-sob
-fca
-nfc1
-ncdb
-br
-ce
-ss
-npcs
-cs
-nbc
-psl
-lp
-sc
-T IntFuncPtr
-T add_fn
-T addrlist
-T am_node
-T am_ops
-T am_opts
-T am_stats
-T amq_mount_info
-T amq_mount_info_list
-T amq_mount_stats
-T amq_mount_tree
-T amq_mount_tree_list
-T amq_mount_tree_p
-T amq_opt
-T amq_setopt
-T amq_string
-T attrstat
-T auto_tree
-T automount
-T callout
-T createargs
-T dict
-T dict_data
-T dict_ent
-T dirlist
-T diropargs
-T diropokres
-T diropres
-T dirpath
-T disk_fs
-T entry
-T ether_if
-T exportnode
-T exports
-T fattr
-T fh_cache
-T fhandle
-T fhandle_t
-T fhstatus
-T filename
-T fserver
-T fsmount
-T ftype
-T fwd_fun
-T gid_t
-T groupnode
-T groups
-T host
-T ioloc
-T kv
-T linkargs
-T map_type
-T mnt_map
-T mntfs
-T mntlist
-T mount
-T mountbody
-T mountlist
-T name
-T nfs_fh
-T nfs_private
-T nfscookie
-T nfspath
-T nfsstat
-T nfstime
-T nfsx_mnt
-T nsw_lookup
-T nsw_switchconfig
-T opt_apply
-T pid_t
-T pjob
-T qelem
-T readargs
-T readdirargs
-T readdirres
-T readlinkres
-T readokres
-T readres
-T renameargs
-T rpc_forward
-T sattr
-T sattrargs
-T serv_state
-T statfsokres
-T statfsres
-T symlinkargs
-T task_fun
-T time_t
-T time_type
-T uid2home_t
-T uid_t
-T username2uid_t
-T vffserver
-T vfmount_fs
-T vfs_init
-T vfs_match
-T vfumount_fs
-T vmount_fs
-T vmounted
-T voidp
-T vumount_fs
-T vumounted
-T writeargs
"


#prefix=".C"

# check args
if [ $# -lt 1 ]; then
    echo "Usage: $0 <-g|-s> [files...]"
    exit 1
fi
if [ $1 = "-g" -o "$1" = "-s" ]; then
    OPT=$1
    shift
else
    echo "Usage: $0 <-g|-s> [files...]"
    exit 1
fi
# check if specified files to process
if [ $# -gt 0 ]; then
    files="$*"
fi

for i in ${files}; do
    if [ ! -f $i ]; then
	echo "No such file: $i"
	continue
    fi

    case $OPT in

	-g )
	    icmd="/usr/local/gnu/bin/indent"
	    cmd="${icmd} $i -o $i$prefix $gnuopts"
	    showcmd="${icmd} $i -o $i$prefix"
	    
	;;

	-s )
	    icmd="/opt/SUNWspro/bin/indent"
	    cmd="${icmd} $i $i$prefix $sunopts"
	    showcmd="${icmd} $i $i$prefix"
	;;

	* )
	    echo "Usage: $0 <-g|-s>"
	    exit 1
	;;
    esac
 
    echo ${showcmd}
    ${cmd}
    if [ $? != 0 ]; then
	echo Failed!
	exit $?
    fi

    # remove trailing spaces
    cmd="./m4/rmtspc $i"
    echo ${cmd}
    ${cmd}
    if [ $? != 0 ]; then
	echo Failed!
	exit $?
    fi
    
done
@


1.1.1.1
log
@Virgin import of AMD (am-utils) 20030828 (6.0.9)
@
text
@@


1.1.1.1.10.1
log
@MFC: version 6.1.5.
@
text
@@


1.1.1.1.20.1
log
@MFC: version 6.1.5.
@
text
@@


1.1.1.2
log
@Delete from the vendor brach a few things that are dead on head.
(they should have been removed here instead of on HEAD in the first place...)
@
text
@@

