Index: /issm/trunk-jpl/src/c/EnumDefinitions/Synchronize.sh
===================================================================
--- /issm/trunk-jpl/src/c/EnumDefinitions/Synchronize.sh	(revision 12261)
+++ /issm/trunk-jpl/src/c/EnumDefinitions/Synchronize.sh	(revision 12262)
@@ -2,6 +2,6 @@
 #Synchronize EnumToStringx.cpp and StringToEnumx.cpp and matlab Enums
 
-#Get all lines of EnumDefinitions2.h which hold Enum | remove all comas | add line number in the first column > put everything in file temp
-cat EnumDefinitions.h | grep -e "[0-9]Enum," -e "[a-zA-Z]Enum," | grep -v include | sed -e "s/,//g" | awk '{ printf "%s %s\n", NR, $0 }' > temp
+#Get all lines of EnumDefinitions2.h which hold Enum | remove all comas > put everything in file temp
+cat EnumDefinitions.h | grep -e "[0-9]Enum," -e "[a-zA-Z]Enum," | grep -v include | sed -e "s/,//g" > temp
 
 #Removed existing files
@@ -13,5 +13,5 @@
 NUMENUMS=$(wc -l temp | awk '{printf("%s",$1);}');
 
-#Build EnumToStringx.cpp {{{1
+#Build EnumToStringx.cpp {{{
 #Header
 cat <<END >  $ISSM_DIR/src/c/modules/EnumToStringx/EnumToStringx.cpp
@@ -35,5 +35,5 @@
 END
 #core
-cat temp |  awk '{print "\t\t" "case " $2" : return \"" substr($2,1,length($2)-4) "\";"}' >> $ISSM_DIR/src/c/modules/EnumToStringx/EnumToStringx.cpp
+cat temp |  awk '{print "\t\t" "case " $1" : return \"" substr($1,1,length($1)-4) "\";"}' >> $ISSM_DIR/src/c/modules/EnumToStringx/EnumToStringx.cpp
 #Footer
 cat <<END >> $ISSM_DIR/src/c/modules/EnumToStringx/EnumToStringx.cpp
@@ -83,5 +83,5 @@
 	echo "   if(stage==$i){" >> $ISSM_DIR//src/c/modules/StringToEnumx/StringToEnumx.cpp
 	awk -v i1=$i1 -v i2=$i2 '{if(NR>=i1 && NR<=i2) print $0 }' temp |
-	awk '{print "\t" ((NR==1)?"      if":"      else if") " (strcmp(name,\"" substr($2,1,length($2)-4) "\")==0) return " $2 ";"}' >> $ISSM_DIR//src/c/modules/StringToEnumx/StringToEnumx.cpp
+	awk '{print "\t" ((NR==1)?"      if":"      else if") " (strcmp(name,\"" substr($1,1,length($1)-4) "\")==0) return " $1 ";"}' >> $ISSM_DIR//src/c/modules/StringToEnumx/StringToEnumx.cpp
 	echo "         else stage=$(($i+1));" >> $ISSM_DIR//src/c/modules/StringToEnumx/StringToEnumx.cpp
 	echo "   }" >> $ISSM_DIR//src/c/modules/StringToEnumx/StringToEnumx.cpp
@@ -104,5 +104,5 @@
 
 	#Get name and enum of the line i
-	NAMEENUM=$(cat temp | grep "^[ ]*$i " | awk '{printf("%s",$2);}');
+	NAMEENUM=$(cat temp | grep "^[ ]*$i " | awk '{printf("%s",$1);}');
 	NAME=$(echo $NAMEENUM | sed -e "s/Enum//g")
 	ENUM=$i;
@@ -156,5 +156,5 @@
 
 macro=$(cat EnumDefinitions.h | grep -e "[0-9]Enum" -e "[a-zA-Z]Enum" | grep -v include \
-		| awk '{ printf "%s %s\n", NR, $0 }' \
+		| awk '{ printf "%s %s\n", NR-1, $0 }' \
 		| grep "MaximumNumberOfEnums" | awk '{print $1}');
 END
