# #################################################################### # Exceed Connection Server 13.7 # Copyright (c) 1997-2009 Open Text Corporation. All Rights Reserved. # #################################################################### # Migration Tool # $Revision: 10408 $ ####################################################################### function addPaths(pathBuffer, pathType, countType) { count = split(pathBuffer, paths, sep) if(count > 0) { --count } if(count > 0) { print countType "=" count > cfgFile } for(i = 1 ; i <= count ; ++i) { thisPath = paths[i] if(tolower(thisPath) == "unicode") { thisPath = "extra" } line = pathType i "=" thisPath print line > cfgFile } } function doMigration() { if(cursection ~ /\[FONT\]/) { if(lower1 ~ /^path/) { if((aFDirs ~ $2) || (eFDirs !~ $2)) { allPaths = allPaths $2 sep } } else if(lower1 ~ /^dpath/) { if((aFDirs ~ $2) || (eFDirs !~ $2)) { allDPaths = allDPaths $2 sep } } else if(lower1 == "newfontrequests") { newFontRequests = $2 } } else if(cursection ~ /\[FONT_DEFAULTS\]/) { if(($1 == "") && (lastlower1 == "defaultcursorfont")) { print "AutoFontSubstitution=1" > cfgFile } print $0 > cfgFile } else { print $0 > cfgFile } } function addFontSection() { print "[FONT]" > cfgFile addPaths(allPaths, "Path", "Count") print "NewFontRequests=" newFontRequests > cfgFile addPaths(allDPaths, "DPath", "DCount") print "" > cfgFile } BEGIN { FS = "=" sep = "|" allPaths = "" allDPaths = "" } { lastlower0=lower0 lower0 = tolower($0) lastlower1=lower1 lower1 = tolower($1) lastlower2=lower2 lower2 = tolower($2) } /^\[.*\]$/ { lastsection=cursection cursection=toupper($0) if(lastsection ~ /\[FONT\]/) { addFontSection() } if(cursection !~ /\[FONT\]/) { print $0 > cfgFile } next } { doMigration() } END { }