Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14598
Modified Files: Tag: desiredata desire.tk Log Message: tidy up read_ddrc
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.600.2.194 retrieving revision 1.1.2.600.2.195 diff -C2 -d -r1.1.2.600.2.194 -r1.1.2.600.2.195 *** desire.tk 30 Jun 2007 10:54:05 -0000 1.1.2.600.2.194 --- desire.tk 30 Jun 2007 11:31:31 -0000 1.1.2.600.2.195 *************** *** 547,557 **** #-----------------------------------------------------------------------------------# set accels {} ! proc read_ddrc {{filename ""}} { global cmdline look key accels set ::accels {} ! if {$filename == ""} { ! set fd [open $cmdline(ddrcfilename) "RDONLY CREAT"] } else { ! set fd [open $filename] } set contents [read $fd] --- 547,562 ---- #-----------------------------------------------------------------------------------# set accels {} ! proc read_ddrc {} { global cmdline look key accels set ::accels {} ! if {[file exists $cmdline(ddrcfilename)]} { ! set fd [open $cmdline(ddrcfilename) "RDONLY"] ! puts "reading from $cmdline(ddrcfilename)" ! } elseif {[file exists "defaults.ddrc"]} { ! set fd [open "defaults.ddrc" "RDONLY"] ! puts "reading from ./defaults.ddrc" } else { ! set fd [open [file join [file dirname [file dirname $::argh0]] "lib/pd/bin/defaults.ddrc"] "RDONLY"] ! puts "reading from [file join [file dirname [file dirname $::argh0]] "lib/pd/bin/defaults.ddrc"]" } set contents [read $fd] *************** *** 572,581 **** } } - - if {[file exists "defaults.ddrc"]} { - read_ddrc "defaults.ddrc" - } else { - read_ddrc [file join [file dirname [file dirname $argh0]] "lib/pd/bin/defaults.ddrc"] - } read_ddrc #-----------------------------------------------------------------------------------# --- 577,580 ----