Artifact 370a813d90a45c9c6108067599e253e17573798fcf3f285da40255d27b2a7b76:
- Executable file mttroot/mtt/bin/trans/mtt_fix_integers — part of check-in [4b43bcffa2] at 2002-09-03 23:44:43 on branch origin/global-optimisation — adding global optimisation (-optg). (user: geraint@users.sourceforge.net, size: 467) [annotate] [blame] [check-ins using] [more...]
#! /bin/sh mttmatrix='\(mtt[A-Za-z][A-Za-z]*\)' integer='\([0-9][0-9]*\)' exec gawk -v RS=${1:-"$"} -v ORS=${2:-"$\n"} ' { str = $0; str1 = gensub ( /([^A-Za-z_0-9\.\+])([0-9]+)([^\.0-9])/ , "\\1\\2.0\\3" , "g", str ); str2 = gensub ( /([^e]\+)([0-9]+)([^\.0-9])/ , "\\1\\2.0\\3" , "g", str1 ); str3 = gensub ( /([^A-Za-z_0-9\.\+])([0-9]+)e([0-9]+).0([^\.0-9])/ , "\\1\\2\\3\\4" , "g" , str2) printf "%s$\n", str3 ; }' | sed -e "s/$mttmatrix($integer\.0,/\1(\2,/g"