From c80d26a894bd1fea22e9a42c5cbed1bfa04dac3b Mon Sep 17 00:00:00 2001 From: skarg Date: Sun, 19 Feb 2006 01:31:09 +0000 Subject: [PATCH] created indent and comment script to standardize the code. --- bacnet-stack/comment.sh | 16 ++++++++++++++++ bacnet-stack/indent.sh | 16 ++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100755 bacnet-stack/comment.sh create mode 100755 bacnet-stack/indent.sh diff --git a/bacnet-stack/comment.sh b/bacnet-stack/comment.sh new file mode 100755 index 00000000..84ee554e --- /dev/null +++ b/bacnet-stack/comment.sh @@ -0,0 +1,16 @@ +#!/bin/sh +directory=${1-`pwd`} +for filename in $( find $directory -name '*.c' ) +do + echo Converting $filename + ccmtcnvt $filename > /tmp/ccmtcnvt.karg + mv /tmp/ccmtcnvt.karg $filename +done + +for filename in $( find $directory -name '*.h' ) +do + echo Converting $filename + ccmtcnvt $filename > /tmp/ccmtcnvt.karg + mv /tmp/ccmtcnvt.karg $filename +done + diff --git a/bacnet-stack/indent.sh b/bacnet-stack/indent.sh new file mode 100755 index 00000000..5799c922 --- /dev/null +++ b/bacnet-stack/indent.sh @@ -0,0 +1,16 @@ +#!/bin/sh +# indent uses a local indent.pro file if it exists +# echo "-kr -nut -nlp" > .indent.pro + +directory=${1-`pwd`} +for filename in $( find $directory -name '*.c' ) +do + echo Indenting $filename + indent -kr -nut -nlp $filename +done + +for filename in $( find $directory -name '*.h' ) +do + echo Indenting $filename + indent -kr -nut -nlp $filename +done