Changeset 1789
- Timestamp:
- 08/24/09 08:26:14 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/EnumDefinitions/SynchronizeMatlabEnum.sh
r1726 r1789 7 7 echo "Synchronizong with Matlab's Enums..." 8 8 cat EnumDefinitions.cpp | grep "return" | grep "int" | awk '{ printf "line%so %s\n", NR, $0 }' | sed -e "s/(void){//" > temp 9 cat <<END > AnalysisType AsEnum.m10 function string=AnalysisType AsEnum(enum)9 cat <<END > AnalysisTypeFromEnum.m 10 function string=AnalysisTypeFromEnum(enum) 11 11 %ANALYSISASENUM - get analysis type from Enum 12 12 % … … 16 16 % 17 17 % Usage: 18 % string=AnalysisType AsEnum(enum)18 % string=AnalysisTypeFromEnum(enum) 19 19 20 20 %initialize output … … 47 47 END 48 48 49 #update AnalysisType AsEnum49 #update AnalysisTypeFromEnum 50 50 if [ $(echo $NAME | grep AnalysisEnum) ] 51 51 then 52 cat <<END >> AnalysisType AsEnum.m52 cat <<END >> AnalysisTypeFromEnum.m 53 53 54 54 if enum==$NAME(), … … 63 63 done 64 64 65 #end of AnalysisType AsEnum66 cat <<END >> AnalysisType AsEnum.m65 #end of AnalysisTypeFromEnum 66 cat <<END >> AnalysisTypeFromEnum.m 67 67 68 68 %check that an analysis type has been found for enum 69 69 if strcmp(string,'not found'), 70 error(['AnalysisType AsEnum error message: enum ' num2str(enum) ' not supported!']);70 error(['AnalysisTypeFromEnum error message: enum ' num2str(enum) ' not supported!']); 71 71 end 72 72 END 73 73 74 74 #clean up 75 mv AnalysisType AsEnum.m $ISSM_DIR/src/m/enum/75 mv AnalysisTypeFromEnum.m $ISSM_DIR/src/m/enum/ 76 76 rm temp
Note:
See TracChangeset
for help on using the changeset viewer.