Index: scripts/unify-sources.sh
===================================================================
--- scripts/unify-sources.sh	(revision 208)
+++ scripts/unify-sources.sh	(revision 324)
@@ -4,7 +4,164 @@
 HGROOT=`hg root`
 
-function update_header() {
+# file enumaration modes
+
+function all_files() {
+    hg status -a -m -c |
+    cut -d ' ' -f 2 | grep -E '(\.(cc|h|dox)$|Makefile\.am$)' |
+    while read file; do echo $HGROOT/$file; done
+}
+
+function modified_files() {
+    hg status -a -m |
+    cut -d ' ' -f 2 | grep -E  '(\.(cc|h|dox)$|Makefile\.am$)' |
+    while read file; do echo $HGROOT/$file; done
+}
+
+function changed_files() {
+    {
+        if [ -n "$HG_PARENT1" ]
+        then
+            hg status --rev $HG_PARENT1:$HG_NODE -a -m
+        fi
+        if [ -n "$HG_PARENT2" ]
+        then
+            hg status --rev $HG_PARENT2:$HG_NODE -a -m
+        fi
+    } | cut -d ' ' -f 2 | grep -E '(\.(cc|h|dox)$|Makefile\.am$)' | 
+    sort | uniq |
+    while read file; do echo $HGROOT/$file; done
+}
+
+function given_files() {
+    for file in $GIVEN_FILES
+    do
+	echo $file
+    done
+}
+
+# actions
+
+function update_action() {
+    if ! diff -q $1 $2 >/dev/null
+    then
+	echo -n " [$3 updated]"
+	rm $2
+	mv $1 $2
+	CHANGED=YES
+    fi
+}
+
+function update_warning() {
+    echo -n " [$2 warning]"
+    WARNED=YES
+}
+
+function update_init() {
+    echo Update source files...
+    TOTAL_FILES=0
+    CHANGED_FILES=0
+    WARNED_FILES=0
+}
+
+function update_done() {
+    echo $CHANGED_FILES out of $TOTAL_FILES files has been changed.
+    echo $WARNED_FILES out of $TOTAL_FILES files has been warned.
+}
+
+function update_begin() {
+    ((TOTAL_FILES++))
+    CHANGED=NO
+    WARNED=NO
+}
+
+function update_end() {
+    if [ $CHANGED == YES ]
+    then
+	((++CHANGED_FILES))
+    fi
+    if [ $WARNED == YES ]
+    then
+	((++WARNED_FILES))
+    fi
+}
+
+function check_action() {
+    if ! diff -q $1 $2 >/dev/null
+    then
+	echo -n " [$3 failed]"
+	FAILED=YES
+    fi
+}
+
+function check_warning() {
+    echo -n " [$2 warning]"
+    WARNED=YES
+}
+
+function check_init() {
+    echo Check source files...
+    FAILED_FILES=0
+    WARNED_FILES=0
+    TOTAL_FILES=0
+}
+
+function check_done() {
+    echo $FAILED_FILES out of $TOTAL_FILES files has been failed.
+    echo $WARNED_FILES out of $TOTAL_FILES files has been warned.
+
+    if [ $FAILED_FILES -gt 0 ]
+    then
+	return 1
+    elif [ $WARNED_FILES -gt 0 ]
+    then
+	if [ "$WARNING" == 'INTERACTIVE' ]
+	then
+	    echo -n "Assume as normal behaviour? (yes/no) "
+	    while read answer
+	    do
+		if [ "$answer" == 'yes' ]
+		then
+		    return 0
+		elif [ "$answer" == 'no' ]
+		then
+		    return 1
+		fi
+		echo -n "Assume as normal behaviour? (yes/no) "		    
+	    done
+	elif [ "$WARNING" == 'WERROR' ]
+	then
+	    return 1
+	fi
+    fi
+}
+
+function check_begin() {
+    ((TOTAL_FILES++))
+    FAILED=NO
+    WARNED=NO
+}
+
+function check_end() {
+    if [ $FAILED == YES ]
+    then
+	((++FAILED_FILES))
+    fi
+    if [ $WARNED == YES ]
+    then
+	((++WARNED_FILES))
+    fi
+}
+
+
+
+# checks
+
+function header_check() {
+    if echo $1 | grep -q -E 'Makefile\.am$'
+    then
+	return
+    fi
+
     TMP_FILE=`mktemp`
-    FILE_NAME=$1
 
     (echo "/* -*- mode: C++; indent-tabs-mode: nil; -*-
@@ -26,5 +183,5 @@
  */
 "
-	awk 'BEGIN { pm=0; }
+    awk 'BEGIN { pm=0; }
      pm==3 { print }
      /\/\* / && pm==0 { pm=1;}
@@ -32,103 +189,149 @@
      /\*\// && pm==1 { pm=2;}
     ' $1
-	) >$TMP_FILE
-
-    HEADER_CH=`diff -q $TMP_FILE $FILE_NAME >/dev/null&&echo NO||echo YES`
-
-    rm $FILE_NAME
-    mv $TMP_FILE $FILE_NAME
-}
-
-function update_tabs() {
+    ) >$TMP_FILE
+
+    "$ACTION"_action "$TMP_FILE" "$1" header
+}
+
+function tabs_check() {
+    if echo $1 | grep -q -v -E 'Makefile\.am$'
+    then
+        OLD_PATTERN=$(echo -e '\t')
+        NEW_PATTERN='        '
+    else
+        OLD_PATTERN='        '
+        NEW_PATTERN=$(echo -e '\t')
+    fi
     TMP_FILE=`mktemp`
-    FILE_NAME=$1
-
-    cat $1 |
-    sed -e 's/\t/        /g' >$TMP_FILE
-
-    TABS_CH=`diff -q $TMP_FILE $FILE_NAME >/dev/null&&echo NO||echo YES`
-
-    rm $FILE_NAME
-    mv $TMP_FILE $FILE_NAME
-}
-
-function remove_trailing_space() {
+    cat $1 | sed -e "s/$OLD_PATTERN/$NEW_PATTERN/g" >$TMP_FILE
+
+    "$ACTION"_action "$TMP_FILE" "$1" 'tabs'
+}
+
+function spaces_check() {
     TMP_FILE=`mktemp`
-    FILE_NAME=$1
-
-    cat $1 |
-    sed -e 's/ \+$//g' >$TMP_FILE
-
-    SPACES_CH=`diff -q $TMP_FILE $FILE_NAME >/dev/null&&echo NO||echo YES`
-
-    rm $FILE_NAME
-    mv $TMP_FILE $FILE_NAME
-}
-
-function long_line_test() {
-    cat $1 |grep -q -E '.{81,}'
-}
-
-function update_file() {
-    echo -n '    update' $i ...
-
-    update_header $1
-    update_tabs $1
-    remove_trailing_space $1
-
-    CHANGED=NO;
-    if [[ $HEADER_CH = YES ]];
-    then
-	echo -n '  [header updated]'
-	CHANGED=YES;
-    fi
-    if [[ $TABS_CH = YES ]];
-    then
-	echo -n ' [tabs removed]'
-	CHANGED=YES;
-    fi
-    if [[ $SPACES_CH = YES ]];
-    then
-	echo -n ' [trailing spaces removed]'
-	CHANGED=YES;
-    fi
-    if long_line_test $1 ;
-    then
-	echo -n ' [LONG LINES]'
-	((LONG_LINE_FILES++))
-    fi
+    cat $1 | sed -e 's/ \+$//g' >$TMP_FILE
+
+    "$ACTION"_action "$TMP_FILE" "$1" 'spaces'
+}
+
+function long_lines_check() {
+    if cat $1 | grep -q -E '.{81,}'
+    then
+	"$ACTION"_warning $1 'long lines'
+    fi
+}
+
+# process the file
+
+function process_file() {
+    echo -n "    $ACTION " $1...
+
+    CHECKING="header tabs spaces long_lines"
+
+    "$ACTION"_begin $1
+    for check in $CHECKING
+    do
+	"$check"_check $1
+    done
+    "$ACTION"_end $1
     echo
-    if [[ $CHANGED = YES ]];
-    then
-	((CHANGED_FILES++))
-    fi
-}
-
-CHANGED_FILES=0
-TOTAL_FILES=0
-LONG_LINE_FILES=0
-if [ $# == 0 ]; then
-    echo Update all source files...
-    for i in `hg manifest|grep -E  '\.(cc|h|dox)$'`
+}
+
+function process_all {
+    "$ACTION"_init
+    while read file
     do
-	update_file $HGROOT/$i
-	((TOTAL_FILES++))
-    done
-    echo '  done.'
-else
-    for i in $*
-    do
-	update_file $i
-	((TOTAL_FILES++))
-    done
+	process_file $file
+    done < <($FILES)
+    "$ACTION"_done
+}
+
+while [ $# -gt 0 ]
+do
+    
+    if [ "$1" == '--help' ] || [ "$1" == '-h' ]
+    then
+	echo -n \
+"Usage:
+  $0 [OPTIONS] [files]
+Options:
+  --dry-run|-n
+     Check the given files, but do not modify them.
+  --interactive|-i
+     If --dry-run is specified and files are warned then a message is
+     prompted whether the warnings should be turned to errors.
+  --werror|-w
+     If --dry-run is specified and the warnings are turned to errors.
+  --all|-a
+     All files in the repository will be checked.
+  --modified|-m
+     Check only the modified source files. This option is proper to
+     use before a commit. E.g. all files which are modified or added
+     into the repository will be updated.
+  --changed|-c
+     Check only the changed source files compared to the parent(s) of
+     the current hg node.  This option is proper to use as hg hook
+     script. E.g. to check all your commited source files with this
+     script add the following section to the appropriate .hg/hgrc
+     file.
+
+       [hooks]
+       pretxncommit.checksources = scripts/unify-sources.sh -c -n -i
+
+  --help|-h
+     Print this help message.
+  files
+     The files to check/unify. If no file names are given, the
+     modified source will be checked/unified
+
+"
+        exit 0
+    elif [ "$1" == '--dry-run' ] || [ "$1" == '-n' ]
+    then
+	[ -n "$ACTION" ] && echo "Invalid option $1" >&2 && exit 1
+	ACTION=check
+    elif [ "$1" == "--all" ] || [ "$1" == '-a' ]
+    then
+	[ -n "$FILES" ] && echo "Invalid option $1" >&2 && exit 1
+	FILES=all_files
+    elif [ "$1" == "--changed" ] || [ "$1" == '-c' ]
+    then
+	[ -n "$FILES" ] && echo "Invalid option $1" >&2 && exit 1
+	FILES=changed_files
+    elif [ "$1" == "--modified" ] || [ "$1" == '-m' ]
+    then
+	[ -n "$FILES" ] && echo "Invalid option $1" >&2 && exit 1
+	FILES=modified_files
+    elif [ "$1" == "--interactive" ] || [ "$1" == "-i" ]
+    then
+	[ -n "$WARNING" ] && echo "Invalid option $1" >&2 && exit 1
+	WARNING='INTERACTIVE'
+    elif [ "$1" == "--werror" ] || [ "$1" == "-w" ]
+    then
+	[ -n "$WARNING" ] && echo "Invalid option $1" >&2 && exit 1
+	WARNING='WERROR'
+    elif [ $(echo $1 | cut -c 1) == '-' ]
+    then
+	echo "Invalid option $1" >&2 && exit 1
+    else
+	[ -n "$FILES" ] && echo "Invalid option $1" >&2 && exit 1
+	GIVEN_FILES=$@
+	FILES=given_files
+	break
+    fi
+    
+    shift
+done
+
+if [ -z $FILES ]
+then
+    FILES=modified_files
 fi
-echo $CHANGED_FILES out of $TOTAL_FILES files has been changed.
-if [[ $LONG_LINE_FILES -gt 1 ]]; then
-    echo
-    echo WARNING: $LONG_LINE_FILES files contains long lines!    
-    echo
-elif [[ $LONG_LINE_FILES -gt 0 ]]; then
-    echo
-    echo WARNING: a file contains long lines!
-    echo
+
+if [ -z $ACTION ]
+then
+    ACTION=update
 fi
+
+process_all
Index: tools/lemon-0.x-to-1.x.sh
===================================================================
--- tools/lemon-0.x-to-1.x.sh	(revision 323)
+++ tools/lemon-0.x-to-1.x.sh	(revision 310)
@@ -4,69 +4,124 @@
 
 if [ $# -eq 0 -o x$1 = "x-h" -o x$1 = "x-help" -o x$1 = "x--help" ]; then
-    echo "Usage:"
-    echo "  $0 source-file(s)"
-    exit
+	echo "Usage:"
+	echo "  $0 source-file"
+	exit
 fi
 
-for i in $@
-do
-    echo Update $i...
-    TMP=`mktemp`
-    sed -e "s/undirected graph/_gr_aph_label_/g"\
-        -e "s/undirected edge/_ed_ge_label_/g"\
-        -e "s/graph_/_gr_aph_label__/g"\
-        -e "s/_graph/__gr_aph_label_/g"\
-        -e "s/UGraph/_Gr_aph_label_/g"\
-        -e "s/uGraph/_gr_aph_label_/g"\
-        -e "s/ugraph/_gr_aph_label_/g"\
-        -e "s/Graph/_Digr_aph_label_/g"\
-        -e "s/graph/_digr_aph_label_/g"\
-        -e "s/UEdge/_Ed_ge_label_/g"\
-        -e "s/uEdge/_ed_ge_label_/g"\
-        -e "s/uedge/_ed_ge_label_/g"\
-        -e "s/IncEdgeIt/_In_cEd_geIt_label_/g"\
-        -e "s/Edge/_Ar_c_label_/g"\
-        -e "s/edge/_ar_c_label_/g"\
-        -e "s/ANode/_Re_d_label_/g"\
-        -e "s/BNode/_Blu_e_label_/g"\
-        -e "s/A-Node/_Re_d_label_/g"\
-        -e "s/B-Node/_Blu_e_label_/g"\
-        -e "s/anode/_re_d_label_/g"\
-        -e "s/bnode/_blu_e_label_/g"\
-        -e "s/aNode/_re_d_label_/g"\
-        -e "s/bNode/_blu_e_label_/g"\
-        -e "s/_Digr_aph_label_/Digraph/g"\
-        -e "s/_digr_aph_label_/digraph/g"\
-        -e "s/_Gr_aph_label_/Graph/g"\
-        -e "s/_gr_aph_label_/graph/g"\
-        -e "s/_Ar_c_label_/Arc/g"\
-        -e "s/_ar_c_label_/arc/g"\
-        -e "s/_Ed_ge_label_/Edge/g"\
-        -e "s/_ed_ge_label_/edge/g"\
-        -e "s/_In_cEd_geIt_label_/IncEdgeIt/g"\
-        -e "s/_Re_d_label_/Red/g"\
-        -e "s/_Blu_e_label_/Blue/g"\
-        -e "s/_re_d_label_/red/g"\
-        -e "s/_blu_e_label_/blue/g"\
-        -e "s/\<DefPredMap\>/SetPredMap/g"\
-        -e "s/\<DefDistMap\>/SetDistMap/g"\
-        -e "s/\<DefReachedMap\>/SetReachedMap/g"\
-        -e "s/\<DefProcessedMap\>/SetProcessedMap/g"\
-        -e "s/\<DefHeap\>/SetHeap/g"\
-        -e "s/\<DefStandardHeap\>/SetStandradHeap/g"\
-        -e "s/\<DefOperationTraits\>/SetOperationTraits/g"\
-        -e "s/\<DefProcessedMapToBeDefaultMap\>/SetStandardProcessedMap/g"\
-        -e "s/\<copyGraph\>/graphCopy/g"\
-        -e "s/\<copyDigraph\>/digraphCopy/g"\
-        -e "s/\<IntegerMap\>/RangeMap/g"\
-        -e "s/\<integerMap\>/rangeMap/g"\
-        -e "s/\<\([sS]\)tdMap\>/\1parseMap/g"\
-        -e "s/\<\([Ff]\)unctorMap\>/\1unctorToMap/g"\
-        -e "s/\<\([Mm]\)apFunctor\>/\1apToFunctor/g"\
-        -e "s/\<\([Ff]\)orkWriteMap\>/\1orkMap/g"\
-        -e "s/\<StoreBoolMap\>/LoggerBoolMap/g"\
-        -e "s/\<storeBoolMap\>/loggerBoolMap/g"\
-        -e "s/\<BoundingBox\>/Box/g"\
-    <$i > $TMP
-    mv $TMP $i
-done
+TMP=`mktemp`
+
+sed	-e "s/undirected graph/_gr_aph_label_/g"\
+	-e "s/undirected edge/_ed_ge_label_/g"\
+	-e "s/graph_/_gr_aph_label__/g"\
+	-e "s/_graph/__gr_aph_label_/g"\
+	-e "s/UGraph/_Gr_aph_label_/g"\
+	-e "s/uGraph/_gr_aph_label_/g"\
+	-e "s/ugraph/_gr_aph_label_/g"\
+	-e "s/Graph/_Digr_aph_label_/g"\
+	-e "s/graph/_digr_aph_label_/g"\
+	-e "s/UEdge/_Ed_ge_label_/g"\
+	-e "s/uEdge/_ed_ge_label_/g"\
+	-e "s/uedge/_ed_ge_label_/g"\
+	-e "s/IncEdgeIt/_In_cEd_geIt_label_/g"\
+	-e "s/Edge/_Ar_c_label_/g"\
+	-e "s/edge/_ar_c_label_/g"\
+	-e "s/ANode/_Re_d_label_/g"\
+	-e "s/BNode/_Blu_e_label_/g"\
+	-e "s/A-Node/_Re_d_label_/g"\
+	-e "s/B-Node/_Blu_e_label_/g"\
+	-e "s/anode/_re_d_label_/g"\
+	-e "s/bnode/_blu_e_label_/g"\
+	-e "s/aNode/_re_d_label_/g"\
+	-e "s/bNode/_blu_e_label_/g"\
+	-e "s/_Digr_aph_label_/Digraph/g"\
+	-e "s/_digr_aph_label_/digraph/g"\
+	-e "s/_Gr_aph_label_/Graph/g"\
+	-e "s/_gr_aph_label_/graph/g"\
+	-e "s/_Ar_c_label_/Arc/g"\
+	-e "s/_ar_c_label_/arc/g"\
+	-e "s/_Ed_ge_label_/Edge/g"\
+	-e "s/_ed_ge_label_/edge/g"\
+	-e "s/_In_cEd_geIt_label_/IncEdgeIt/g"\
+	-e "s/_Re_d_label_/Red/g"\
+	-e "s/_Blu_e_label_/Blue/g"\
+	-e "s/_re_d_label_/red/g"\
+	-e "s/_blu_e_label_/blue/g"\
+	-e "s/\(\W\)DefPredMap\(\W\)/\1SetPredMap\2/g"\
+	-e "s/\(\W\)DefPredMap$/\1SetPredMap/g"\
+	-e "s/^DefPredMap\(\W\)/SetPredMap\1/g"\
+	-e "s/^DefPredMap$/SetPredMap/g"\
+	-e "s/\(\W\)DefDistMap\(\W\)/\1SetDistMap\2/g"\
+	-e "s/\(\W\)DefDistMap$/\1SetDistMap/g"\
+	-e "s/^DefDistMap\(\W\)/SetDistMap\1/g"\
+	-e "s/^DefDistMap$/SetDistMap/g"\
+	-e "s/\(\W\)DefReachedMap\(\W\)/\1SetReachedMap\2/g"\
+	-e "s/\(\W\)DefReachedMap$/\1SetReachedMap/g"\
+	-e "s/^DefReachedMap\(\W\)/SetReachedMap\1/g"\
+	-e "s/^DefReachedMap$/SetReachedMap/g"\
+	-e "s/\(\W\)DefProcessedMap\(\W\)/\1SetProcessedMap\2/g"\
+	-e "s/\(\W\)DefProcessedMap$/\1SetProcessedMap/g"\
+	-e "s/^DefProcessedMap\(\W\)/SetProcessedMap\1/g"\
+	-e "s/^DefProcessedMap$/SetProcessedMap/g"\
+	-e "s/\(\W\)DefHeap\(\W\)/\1SetHeap\2/g"\
+	-e "s/\(\W\)DefHeap$/\1SetHeap/g"\
+	-e "s/^DefHeap\(\W\)/SetHeap\1/g"\
+	-e "s/^DefHeap$/SetHeap/g"\
+	-e "s/\(\W\)DefStandardHeap\(\W\)/\1SetStandradHeap\2/g"\
+	-e "s/\(\W\)DefStandardHeap$/\1SetStandradHeap/g"\
+	-e "s/^DefStandardHeap\(\W\)/SetStandradHeap\1/g"\
+	-e "s/^DefStandardHeap$/SetStandradHeap/g"\
+	-e "s/\(\W\)DefOperationTraits\(\W\)/\1SetOperationTraits\2/g"\
+	-e "s/\(\W\)DefOperationTraits$/\1SetOperationTraits/g"\
+	-e "s/^DefOperationTraits\(\W\)/SetOperationTraits\1/g"\
+	-e "s/^DefOperationTraits$/SetOperationTraits/g"\
+	-e "s/\(\W\)DefProcessedMapToBeDefaultMap\(\W\)/\1SetStandardProcessedMap\2/g"\
+	-e "s/\(\W\)DefProcessedMapToBeDefaultMap$/\1SetStandardProcessedMap/g"\
+	-e "s/^DefProcessedMapToBeDefaultMap\(\W\)/SetStandardProcessedMap\1/g"\
+	-e "s/^DefProcessedMapToBeDefaultMap$/SetStandardProcessedMap/g"\
+	-e "s/\(\W\)IntegerMap\(\W\)/\1RangeMap\2/g"\
+	-e "s/\(\W\)IntegerMap$/\1RangeMap/g"\
+	-e "s/^IntegerMap\(\W\)/RangeMap\1/g"\
+	-e "s/^IntegerMap$/RangeMap/g"\
+	-e "s/\(\W\)integerMap\(\W\)/\1rangeMap\2/g"\
+	-e "s/\(\W\)integerMap$/\1rangeMap/g"\
+	-e "s/^integerMap\(\W\)/rangeMap\1/g"\
+	-e "s/^integerMap$/rangeMap/g"\
+	-e "s/\(\W\)copyGraph\(\W\)/\1graphCopy\2/g"\
+	-e "s/\(\W\)copyGraph$/\1graphCopy/g"\
+	-e "s/^copyGraph\(\W\)/graphCopy\1/g"\
+	-e "s/^copyGraph$/graphCopy/g"\
+	-e "s/\(\W\)copyDigraph\(\W\)/\1digraphCopy\2/g"\
+	-e "s/\(\W\)copyDigraph$/\1digraphCopy/g"\
+	-e "s/^copyDigraph\(\W\)/digraphCopy\1/g"\
+	-e "s/^copyDigraph$/digraphCopy/g"\
+	-e "s/\(\W\)\([sS]\)tdMap\(\W\)/\1\2parseMap\3/g"\
+	-e "s/\(\W\)\([sS]\)tdMap$/\1\2parseMap/g"\
+	-e "s/^\([sS]\)tdMap\(\W\)/\1parseMap\2/g"\
+	-e "s/^\([sS]\)tdMap$/\1parseMap/g"\
+	-e "s/\(\W\)\([Ff]\)unctorMap\(\W\)/\1\2unctorToMap\3/g"\
+	-e "s/\(\W\)\([Ff]\)unctorMap$/\1\2unctorToMap/g"\
+	-e "s/^\([Ff]\)unctorMap\(\W\)/\1unctorToMap\2/g"\
+	-e "s/^\([Ff]\)unctorMap$/\1unctorToMap/g"\
+	-e "s/\(\W\)\([Mm]\)apFunctor\(\W\)/\1\2apToFunctor\3/g"\
+	-e "s/\(\W\)\([Mm]\)apFunctor$/\1\2apToFunctor/g"\
+	-e "s/^\([Mm]\)apFunctor\(\W\)/\1apToFunctor\2/g"\
+	-e "s/^\([Mm]\)apFunctor$/\1apToFunctor/g"\
+	-e "s/\(\W\)\([Ff]\)orkWriteMap\(\W\)/\1\2orkMap\3/g"\
+	-e "s/\(\W\)\([Ff]\)orkWriteMap$/\1\2orkMap/g"\
+	-e "s/^\([Ff]\)orkWriteMap\(\W\)/\1orkMap\2/g"\
+	-e "s/^\([Ff]\)orkWriteMap$/\1orkMap/g"\
+	-e "s/\(\W\)StoreBoolMap\(\W\)/\1LoggerBoolMap\2/g"\
+	-e "s/\(\W\)StoreBoolMap$/\1LoggerBoolMap/g"\
+	-e "s/^StoreBoolMap\(\W\)/LoggerBoolMap\1/g"\
+	-e "s/^StoreBoolMap$/LoggerBoolMap/g"\
+	-e "s/\(\W\)storeBoolMap\(\W\)/\1loggerBoolMap\2/g"\
+	-e "s/\(\W\)storeBoolMap$/\1loggerBoolMap/g"\
+	-e "s/^storeBoolMap\(\W\)/loggerBoolMap\1/g"\
+	-e "s/^storeBoolMap$/loggerBoolMap/g"\
+	-e "s/\(\W\)BoundingBox\(\W\)/\1Box\2/g"\
+	-e "s/\(\W\)BoundingBox$/\1Box/g"\
+	-e "s/^BoundingBox\(\W\)/Box\1/g"\
+	-e "s/^BoundingBox$/Box/g"\
+<$1 > $TMP
+
+mv $TMP $1
