Artifact 511eb60f9c4a8cdd84031798ef9e8024c3505ee6d77f23b375c8e98f6433927b:
- Executable file mtt/bin/trans/mtt_fix_integers — part of check-in [af3953deae] at 2021-03-01 11:39:42 on branch master — Cleanup repository after cvs2git conversion. (user: jeff@gridfinity.com, size: 479) [annotate] [blame] [check-ins using] [more...]
- Executable file mttroot/mtt/bin/trans/mtt_fix_integers — part of check-in [64679c2c42] at 2002-09-04 07:12:19 on branch origin/global-optimisation — lines are joined before fixing integers - required to prevent vector indices becoming floating point. (user: geraint@users.sourceforge.net, size: 479) [annotate] [blame] [check-ins using]
#! /bin/sh mttmatrix='\(mtt[A-Za-z][A-Za-z]*\)' integer='\([0-9][0-9]*\)' mtt_join_lines | 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"