head	1.1;
branch	1.1.1;
access;
symbols
	netbsd-11-0-RC4:1.1.1.1
	netbsd-11-0-RC3:1.1.1.1
	netbsd-11-0-RC2:1.1.1.1
	netbsd-11-0-RC1:1.1.1.1
	perseant-exfatfs-base-20250801:1.1.1.1
	netbsd-11:1.1.1.1.0.78
	netbsd-11-base:1.1.1.1
	netbsd-10-1-RELEASE:1.1.1.1
	perseant-exfatfs-base-20240630:1.1.1.1
	perseant-exfatfs:1.1.1.1.0.76
	perseant-exfatfs-base:1.1.1.1
	netbsd-8-3-RELEASE:1.1.1.1
	netbsd-9-4-RELEASE:1.1.1.1
	netbsd-10-0-RELEASE:1.1.1.1
	netbsd-10-0-RC6:1.1.1.1
	netbsd-10-0-RC5:1.1.1.1
	netbsd-10-0-RC4:1.1.1.1
	netbsd-10-0-RC3:1.1.1.1
	netbsd-10-0-RC2:1.1.1.1
	netbsd-10-0-RC1:1.1.1.1
	netbsd-10:1.1.1.1.0.74
	netbsd-10-base:1.1.1.1
	netbsd-9-3-RELEASE:1.1.1.1
	cjep_sun2x-base1:1.1.1.1
	cjep_sun2x:1.1.1.1.0.72
	cjep_sun2x-base:1.1.1.1
	cjep_staticlib_x-base1:1.1.1.1
	netbsd-9-2-RELEASE:1.1.1.1
	cjep_staticlib_x:1.1.1.1.0.70
	cjep_staticlib_x-base:1.1.1.1
	netbsd-9-1-RELEASE:1.1.1.1
	phil-wifi-20200421:1.1.1.1
	phil-wifi-20200411:1.1.1.1
	is-mlppp:1.1.1.1.0.68
	is-mlppp-base:1.1.1.1
	phil-wifi-20200406:1.1.1.1
	netbsd-8-2-RELEASE:1.1.1.1
	netbsd-9-0-RELEASE:1.1.1.1
	netbsd-9-0-RC2:1.1.1.1
	netbsd-9-0-RC1:1.1.1.1
	phil-wifi-20191119:1.1.1.1
	netbsd-9:1.1.1.1.0.66
	netbsd-9-base:1.1.1.1
	phil-wifi-20190609:1.1.1.1
	netbsd-8-1-RELEASE:1.1.1.1
	netbsd-8-1-RC1:1.1.1.1
	pgoyette-compat-merge-20190127:1.1.1.1
	pgoyette-compat-20190127:1.1.1.1
	pgoyette-compat-20190118:1.1.1.1
	pgoyette-compat-1226:1.1.1.1
	pgoyette-compat-1126:1.1.1.1
	pgoyette-compat-1020:1.1.1.1
	pgoyette-compat-0930:1.1.1.1
	pgoyette-compat-0906:1.1.1.1
	netbsd-7-2-RELEASE:1.1.1.1
	pgoyette-compat-0728:1.1.1.1
	netbsd-8-0-RELEASE:1.1.1.1
	phil-wifi:1.1.1.1.0.64
	phil-wifi-base:1.1.1.1
	pgoyette-compat-0625:1.1.1.1
	netbsd-8-0-RC2:1.1.1.1
	pgoyette-compat-0521:1.1.1.1
	pgoyette-compat-0502:1.1.1.1
	pgoyette-compat-0422:1.1.1.1
	netbsd-8-0-RC1:1.1.1.1
	pgoyette-compat-0415:1.1.1.1
	pgoyette-compat-0407:1.1.1.1
	pgoyette-compat-0330:1.1.1.1
	pgoyette-compat-0322:1.1.1.1
	pgoyette-compat-0315:1.1.1.1
	netbsd-7-1-2-RELEASE:1.1.1.1
	pgoyette-compat:1.1.1.1.0.62
	pgoyette-compat-base:1.1.1.1
	netbsd-7-1-1-RELEASE:1.1.1.1
	matt-nb8-mediatek:1.1.1.1.0.60
	matt-nb8-mediatek-base:1.1.1.1
	perseant-stdc-iso10646:1.1.1.1.0.58
	perseant-stdc-iso10646-base:1.1.1.1
	netbsd-8:1.1.1.1.0.56
	netbsd-8-base:1.1.1.1
	prg-localcount2-base3:1.1.1.1
	prg-localcount2-base2:1.1.1.1
	prg-localcount2-base1:1.1.1.1
	prg-localcount2:1.1.1.1.0.54
	prg-localcount2-base:1.1.1.1
	pgoyette-localcount-20170426:1.1.1.1
	bouyer-socketcan-base1:1.1.1.1
	pgoyette-localcount-20170320:1.1.1.1
	netbsd-7-1:1.1.1.1.0.52
	netbsd-7-1-RELEASE:1.1.1.1
	netbsd-7-1-RC2:1.1.1.1
	netbsd-7-nhusb-base-20170116:1.1.1.1
	bouyer-socketcan:1.1.1.1.0.50
	bouyer-socketcan-base:1.1.1.1
	pgoyette-localcount-20170107:1.1.1.1
	netbsd-7-1-RC1:1.1.1.1
	pgoyette-localcount-20161104:1.1.1.1
	netbsd-7-0-2-RELEASE:1.1.1.1
	localcount-20160914:1.1.1.1
	netbsd-7-nhusb:1.1.1.1.0.48
	netbsd-7-nhusb-base:1.1.1.1
	pgoyette-localcount-20160806:1.1.1.1
	pgoyette-localcount-20160726:1.1.1.1
	pgoyette-localcount:1.1.1.1.0.46
	pgoyette-localcount-base:1.1.1.1
	netbsd-7-0-1-RELEASE:1.1.1.1
	netbsd-7-0:1.1.1.1.0.44
	netbsd-7-0-RELEASE:1.1.1.1
	netbsd-7-0-RC3:1.1.1.1
	netbsd-7-0-RC2:1.1.1.1
	netbsd-7-0-RC1:1.1.1.1
	am-utils-6-2-20140117:1.1.1.1
	netbsd-5-2-3-RELEASE:1.1.1.1
	netbsd-5-1-5-RELEASE:1.1.1.1
	netbsd-6-0-6-RELEASE:1.1.1.1
	netbsd-6-1-5-RELEASE:1.1.1.1
	netbsd-7:1.1.1.1.0.42
	netbsd-7-base:1.1.1.1
	yamt-pagecache-base9:1.1.1.1
	yamt-pagecache-tag8:1.1.1.1
	netbsd-6-1-4-RELEASE:1.1.1.1
	netbsd-6-0-5-RELEASE:1.1.1.1
	tls-earlyentropy:1.1.1.1.0.40
	tls-earlyentropy-base:1.1.1.1
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.1.1.1
	riastradh-drm2-base3:1.1.1.1
	netbsd-6-1-3-RELEASE:1.1.1.1
	netbsd-6-0-4-RELEASE:1.1.1.1
	netbsd-5-2-2-RELEASE:1.1.1.1
	netbsd-5-1-4-RELEASE:1.1.1.1
	netbsd-6-1-2-RELEASE:1.1.1.1
	netbsd-6-0-3-RELEASE:1.1.1.1
	netbsd-5-2-1-RELEASE:1.1.1.1
	netbsd-5-1-3-RELEASE:1.1.1.1
	netbsd-6-1-1-RELEASE:1.1.1.1
	riastradh-drm2-base2:1.1.1.1
	riastradh-drm2-base1:1.1.1.1
	riastradh-drm2:1.1.1.1.0.32
	riastradh-drm2-base:1.1.1.1
	netbsd-6-1:1.1.1.1.0.38
	netbsd-6-0-2-RELEASE:1.1.1.1
	netbsd-6-1-RELEASE:1.1.1.1
	khorben-n900:1.1.1.1.0.36
	netbsd-6-1-RC4:1.1.1.1
	netbsd-6-1-RC3:1.1.1.1
	agc-symver:1.1.1.1.0.34
	agc-symver-base:1.1.1.1
	netbsd-6-1-RC2:1.1.1.1
	netbsd-6-1-RC1:1.1.1.1
	yamt-pagecache-base8:1.1.1.1
	netbsd-5-2:1.1.1.1.0.30
	netbsd-6-0-1-RELEASE:1.1.1.1
	yamt-pagecache-base7:1.1.1.1
	netbsd-5-2-RELEASE:1.1.1.1
	netbsd-5-2-RC1:1.1.1.1
	matt-nb6-plus-nbase:1.1.1.1
	yamt-pagecache-base6:1.1.1.1
	netbsd-6-0:1.1.1.1.0.28
	netbsd-6-0-RELEASE:1.1.1.1
	netbsd-6-0-RC2:1.1.1.1
	tls-maxphys:1.1.1.1.0.26
	tls-maxphys-base:1.1.1.1
	matt-nb6-plus:1.1.1.1.0.24
	matt-nb6-plus-base:1.1.1.1
	netbsd-6-0-RC1:1.1.1.1
	yamt-pagecache-base5:1.1.1.1
	yamt-pagecache-base4:1.1.1.1
	netbsd-6:1.1.1.1.0.22
	netbsd-6-base:1.1.1.1
	netbsd-5-1-2-RELEASE:1.1.1.1
	netbsd-5-1-1-RELEASE:1.1.1.1
	yamt-pagecache-base3:1.1.1.1
	yamt-pagecache-base2:1.1.1.1
	yamt-pagecache:1.1.1.1.0.2
	yamt-pagecache-base:1.1.1.1
	cherry-xenmp:1.1.1.1.0.20
	cherry-xenmp-base:1.1.1.1
	bouyer-quota2-nbase:1.1.1.1
	bouyer-quota2:1.1.1.1.0.18
	bouyer-quota2-base:1.1.1.1
	matt-mips64-premerge-20101231:1.1.1.1
	matt-nb5-mips64-premerge-20101231:1.1.1.1
	matt-nb5-pq3:1.1.1.1.0.16
	matt-nb5-pq3-base:1.1.1.1
	netbsd-5-1:1.1.1.1.0.14
	netbsd-5-1-RELEASE:1.1.1.1
	netbsd-5-1-RC4:1.1.1.1
	matt-nb5-mips64-k15:1.1.1.1
	netbsd-5-1-RC3:1.1.1.1
	netbsd-5-1-RC2:1.1.1.1
	netbsd-5-1-RC1:1.1.1.1
	netbsd-5-0-2-RELEASE:1.1.1.1
	matt-nb5-mips64-premerge-20091211:1.1.1.1
	matt-premerge-20091211:1.1.1.1
	matt-nb5-mips64-u2-k2-k4-k7-k8-k9:1.1.1.1
	matt-nb4-mips64-k7-u2a-k9b:1.1.1.1
	matt-nb5-mips64-u1-k1-k5:1.1.1.1
	matt-nb5-mips64:1.1.1.1.0.12
	netbsd-5-0-1-RELEASE:1.1.1.1
	jym-xensuspend-nbase:1.1.1.1
	netbsd-5-0:1.1.1.1.0.10
	netbsd-5-0-RELEASE:1.1.1.1
	netbsd-5-0-RC4:1.1.1.1
	am-utils-6-2a3-20090320:1.1.1.1
	netbsd-5-0-RC3:1.1.1.1
	netbsd-5-0-RC2:1.1.1.1
	jym-xensuspend:1.1.1.1.0.8
	jym-xensuspend-base:1.1.1.1
	netbsd-5-0-RC1:1.1.1.1
	haad-dm-base:1.1.1.1
	haad-dm-base2:1.1.1.1
	haad-nbase2:1.1.1.1
	netbsd-5:1.1.1.1.0.6
	netbsd-5-base:1.1.1.1
	matt-mips64-base2:1.1.1.1
	haad-dm:1.1.1.1.0.4
	haad-dm-base1:1.1.1.1
	am-utils-6-2a3-20080919:1.1.1.1
	ezk:1.1.1;
locks; strict;
comment	@# @;


1.1
date	2008.09.19.20.07.22;	author christos;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	2008.09.19.20.07.22;	author christos;	state Exp;
branches
	1.1.1.1.4.1;
next	;

1.1.1.1.4.1
date	2008.09.19.20.07.22;	author haad;	state dead;
branches;
next	1.1.1.1.4.2;

1.1.1.1.4.2
date	2008.10.19.22.39.42;	author haad;	state Exp;
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
@import current am-utils.
@
text
@@


1.1.1.1.4.1
log
@file amindent was added on branch haad-dm on 2008-10-19 22:39:42 +0000
@
text
@d1 328
@


1.1.1.1.4.2
log
@Sync with HEAD.
@
text
@a0 328
#!/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
@
