#! bash -f
#----------------------------------------------------------------------------
# Project:  NitroSDK - tools - sdkindent
# File:     sdkindent
#
# Copyright 2003,2004 Nintendo.  All rights reserved.
#
# These coded insructions, statements, and computer programs contain
# proprietary information of Nintendo of America Inc. and/or Nintendo
# Company Ltd., and are protected by Federal copyright law.  They may
# not be disclosed to third parties or copied or duplicated in any form,
# in whole or in part, without the prior written consent of Nintendo.
#
# $Log: sdkindent,v $
# Revision 1.1  2004/09/29 02:05:00  yasu
# Add code beautifier for NITRO-SDK
#
# $NoKeywords: $
#----------------------------------------------------------------------------
for i in "$@"
do
	( sed  -f $NITROSDK_ROOT/tools/bin/sdkindent.prefilter  "$i" | \
	  bash -f $NITROSDK_ROOT/tools/bin/sdkindent.beautifier -st  | \
	  sed  -f $NITROSDK_ROOT/tools/bin/sdkindent.postfilter > "$i.tmp$$" ) && \
	mv "$i" "$i.orig$$" && mv "$i.tmp$$" "$i"
done
