diff --git a/AppMain.tcl b/AppMain.tcl index 3941627..159aee2 100644 --- a/AppMain.tcl +++ b/AppMain.tcl @@ -8,7 +8,7 @@ # License ("GPL") version 3, as published by the Free Software Foundation. # -# MacOS X / Windows wrapper +# MacOS X / Windows wrapper # # Mac OSX: Remove Cocoa argument from arglist if {[string first "-psn" [lindex $argv 0]] == 0} { set argv [lrange $argv 1 end]} diff --git a/ps3mfw_base.tcl b/ps3mfw_base.tcl index 1ebb538..3c0fa2f 100644 --- a/ps3mfw_base.tcl +++ b/ps3mfw_base.tcl @@ -343,7 +343,7 @@ proc modify_coreos_file { file callback args } { set pkg [file join ${::CUSTOM_UPDATE_DIR} CORE_OS_PACKAGE.pkg] set unpkgdir [file join ${::CUSTOM_UPDATE_DIR} CORE_OS_PACKAGE.unpkg] set cosunpkgdir [file join ${::CUSTOM_UPDATE_DIR} CORE_OS_PACKAGE] - + ::unpkg_archive $pkg $unpkgdir ::cosunpkg_package [file join $unpkgdir content] $cosunpkgdir diff --git a/ps3mfw_gui.tcl b/ps3mfw_gui.tcl index 6ebaff5..246e3f0 100644 --- a/ps3mfw_gui.tcl +++ b/ps3mfw_gui.tcl @@ -67,19 +67,19 @@ namespace eval ::gui { variable padx 2 variable pady 1 variable theme [set ::ttk::currentTheme] - + proc create_gui {arguments selected_tasks} { variable tasks - - + + set ::settings [file join $::PS3MFW_DIR Settings.xml] set ::xmlang [::xml::LoadFile $::settings] set ::language [::xml::GetData ${::xmlang} "Settings:language" 0] if { ${::language} == "" } { set ::language "English" } - set re [open [file join $::PS3MFW_DIR language ${::language}.xml] r] - # taken from Unicode and UTF-8 article (wiki.tcl.tk/515) + set re [open [file join $::PS3MFW_DIR language ${::language}.xml] r] + # taken from Unicode and UTF-8 article (wiki.tcl.tk/515) fconfigure $re -encoding binary set InBuffer "" set enc_xmllang "" @@ -87,9 +87,9 @@ namespace eval ::gui { append InBuffer [read $re 100] append enc_xmllang [UTF8FullCodes InBuffer] } - close $re + close $re set ::xmllang [::xml::Load $enc_xmllang] - + wm title . "PS3MFW Builder v${::PS3MFW_VERSION}" create_menu @@ -99,9 +99,9 @@ namespace eval ::gui { bind . "console show" } - bind . {exec [info nameofexecutable] & + bind . {exec [info nameofexecutable] & exit} - + hijack_logs if {[llength $arguments] > 2} { @@ -276,9 +276,9 @@ namespace eval ::gui { incr middle_y -[expr {int($h / 2)}] wm geometry .about ${w}x${h}+${middle_x}+${middle_y} } - + proc add_settings { settings } { - + set icon128 [image create photo -file [file join ${::PS3MFW_DIR} images ps3mfw-icon-128.gif]] pack [::ttk::label $settings.img -image $icon128 -anchor center] -expand false -fill both set files [glob -directory [file join $::PS3MFW_DIR language] *] @@ -295,7 +295,7 @@ namespace eval ::gui { set temp_label [::ttk::label $settings.temp.1 -text "Temp Files:"] set ::temp_entry [::ttk::entry $settings.temp.2 -textvariable ::temp_dir] set ::temp_dir [file nativename ${::BUILD_DIR}] - set temp_button [::ttk::button $settings.temp.3 -text "[::xml::GetData ${::xmllang} "Lang:Browse" 0]" -command [list ::gui::browse_directory ${::temp_entry} "Select Temp directory:"]] + set temp_button [::ttk::button $settings.temp.3 -text "[::xml::GetData ${::xmllang} "Lang:Browse" 0]" -command [list ::gui::browse_directory ${::temp_entry} "Select Temp directory:"]] pack $temp_label $::temp_entry $temp_button -side left -expand true set ps3_keys_label [::ttk::label $settings.ps3_keys.1 -text "PS3_KEYS:"] set ::ps3_keys_entry [::ttk::entry $settings.ps3_keys.2 -textvariable ::ps3_keys_dir] @@ -304,11 +304,11 @@ namespace eval ::gui { pack $ps3_keys_label $::ps3_keys_entry $ps3_keys_button -side left -expand true set ssettings [::ttk::button $settings.7 -text "[::xml::GetData ${::xmllang} "Lang:Save_settings" 0]" -command ::gui::save_settings] set csettings [::ttk::button $settings.8 -text "[::xml::GetData ${::xmllang} "Lang:Default_settings" 0]" -command ::gui::default_settings] - pack $ssettings $csettings -side left -expand true -fill none + pack $ssettings $csettings -side left -expand true -fill none } proc settings { } { - + destroy .settings toplevel .settings wm title .settings "[::xml::GetData ${::xmllang} "Lang:PS3MFW_Builder_Settings" 0]" @@ -326,7 +326,7 @@ namespace eval ::gui { incr middle_y -[expr {int($h / 2)}] wm geometry .settings ${w}x${h}+${middle_x}+${middle_y} } - + proc populate_themes {themes} { array set THEMES { @@ -447,7 +447,7 @@ namespace eval ::gui { set button [::ttk::button $w.$name.button -text "[::xml::GetData ${::xmllang} "Lang:Browse" 0]" \ -command [list ::gui::browse_directory $entry $title]] pack $label $entry $button -side left -expand true -fill x -anchor nw -padx $::gui::padx -pady $::gui::pady - } + } textarea { set widget [::ttk::frame $w.$name] set label [::ttk::label $w.$name.label -text "$description :"] @@ -457,7 +457,7 @@ namespace eval ::gui { -xscrollcommand [list ::gui::set_scroll $frame.sx]]; set sy [::ttk::scrollbar $frame.sy -orient vertical -command [list $text yview]] set sx [::ttk::scrollbar $frame.sx -orient horizontal -command [list $text xview]] - + grid $text -row 0 -column 0 -sticky nsew -padx $::gui::padx -pady $::gui::pady grid $sy -row 0 -column 1 -sticky ns -padx $::gui::padx -pady $::gui::pady grid $sx -row 1 -column 0 -sticky ew -padx $::gui::padx -pady $::gui::pady @@ -482,7 +482,7 @@ namespace eval ::gui { -xscrollcommand [list ::gui::set_scroll $frame.sx]]; set sy [::ttk::scrollbar $frame.sy -orient vertical -command [list $text yview]] set sx [::ttk::scrollbar $frame.sx -orient horizontal -command [list $text xview]] - + grid $text -row 0 -column 0 -sticky nsew -padx $::gui::padx -pady $::gui::pady grid $sy -row 0 -column 1 -sticky ns -padx $::gui::padx -pady $::gui::pady grid $sx -row 1 -column 0 -sticky ew -padx $::gui::padx -pady $::gui::pady @@ -612,7 +612,7 @@ namespace eval ::gui { $path insert 0 $file } } - + proc browse_directory { path title } { set file [tk_chooseDirectory -parent $path -title $title] if {$file != ""} { @@ -747,9 +747,9 @@ namespace eval ::gui { set Buffer [string range $Buffer $Pos end] return $Res } - + proc load_settings { } { - + set ::IN_FILE [::xml::GetData ${::xmlang} "Settings:IN_FILE" 0] set ::OUT_FILE [::xml::GetData ${::xmlang} "Settings:OUT_FILE" 0] @@ -761,9 +761,9 @@ namespace eval ::gui { lappend selected_tasks $task } } - + set data [::xml::GetData ${::xmlang} "Settings:tasks" 0] - + foreach task $selected_tasks { set ::gui::tasks($task) false } @@ -771,24 +771,24 @@ namespace eval ::gui { foreach task $data { set ::gui::tasks($task) true } - - if { [::xml::GetData ${::xmlang} "Settings:Theme" 0] != "" } { + + if { [::xml::GetData ${::xmlang} "Settings:Theme" 0] != "" } { ::ttk::setTheme [::xml::GetData ${::xmlang} "Settings:Theme" 0] variable theme [set ::ttk::currentTheme] } } - + proc save_settings { } { - + set fs $::settings set ::xmlang [::xml::LoadFile $fs] - + sed_in_place $fs "[::xml::GetData ${::xmlang} "Settings:IN_FILE" 0]" "${::IN_FILE}" sed_in_place $fs "[::xml::GetData ${::xmlang} "Settings:OUT_FILE" 0]" "${::OUT_FILE}" - + variable theme sed_in_place $fs "[::xml::GetData ${::xmlang} "Settings:Theme" 0]" "${theme}" - + variable tasks set selected_tasks [list] foreach task [array names tasks] { @@ -804,25 +804,25 @@ namespace eval ::gui { } sed_in_place $fs "[::xml::GetData ${::xmlang} "Settings:tasks" 0]" "${taskslist}" - + if {${::selected_lang} != [::xml::GetData ${::xmlang} "Settings:language" 0] & ${::selected_lang} != "" | [string trim ${::ps3_keys_dir}] != [::xml::GetData ${::xmlang} "Settings:PS3_KEYS" 0] | ${::temp_dir} != [file join /tmp PS3MFW] & ${::temp_dir} != [::xml::GetData ${::xmlang} "Settings:BUILD_DIR" 0]} { - sed_in_place $fs "[::xml::GetData ${::xmlang} "Settings:language" 0]" "[string trim ${::selected_lang}]" + sed_in_place $fs "[::xml::GetData ${::xmlang} "Settings:language" 0]" "[string trim ${::selected_lang}]" if {[file exists ${::temp_dir}]} { sed_in_place $fs "[::xml::GetData ${::xmlang} "Settings:BUILD_DIR" 0]" "${::temp_dir}" } else { sed_in_place $fs "[::xml::GetData ${::xmlang} "Settings:BUILD_DIR" 0]" "" } - + if {[file exists ${::ps3_keys_dir}]} { sed_in_place $fs "[::xml::GetData ${::xmlang} "Settings:PS3_KEYS" 0]" "${::ps3_keys_dir}" } else { sed_in_place $fs "[::xml::GetData ${::xmlang} "Settings:PS3_KEYS" 0]" "" } - + exec [info nameofexecutable] & exit - } + } } proc default_settings { } { @@ -830,7 +830,7 @@ namespace eval ::gui { set ::ps3_keys_dir "" set ::IN_FILE "" set ::OUT_FILE "" - + variable tasks set selected_tasks [list] foreach task [array names tasks] { @@ -838,8 +838,8 @@ namespace eval ::gui { if {$tasks($task)} { lappend selected_tasks $task } - } - + } + foreach task $selected_tasks { set ::gui::tasks($task) false } @@ -847,7 +847,7 @@ namespace eval ::gui { foreach task [list add_license_msg change_version patch_category_game] { set ::gui::tasks($task) true } - + set ::selected_lang "English" if { $::tcl_platform(os) == "Linux" } { @@ -858,10 +858,10 @@ namespace eval ::gui { ::ttk::setTheme aqua } variable theme [set ::ttk::currentTheme] - + ::gui::save_settings - } - + } + proc print_log {msg {tag {}}} { if {[winfo exists .middle.log]} { .middle.log configure -state normal diff --git a/tar.tcl b/tar.tcl index 3f19bb6..fe5ee54 100644 --- a/tar.tcl +++ b/tar.tcl @@ -6,7 +6,7 @@ # # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. -# +# # RCS: @(#) $Id: tar.tcl,v 1.11 2007/02/09 06:03:56 afaupell Exp $ package provide tar 0.4 @@ -16,7 +16,7 @@ namespace eval ::tar {} proc ::tar::parseOpts {acc opts} { array set flags $acc foreach {x y} $acc {upvar $x $x} - + set len [llength $opts] set i 0 while {$i < $len} { @@ -45,7 +45,7 @@ proc ::tar::readHeader {data} { binary scan $data a100a8a8a8a12a12a8a1a100a6a2a32a32a8a8a155 \ name mode uid gid size mtime cksum type \ linkname magic version uname gname devmajor devminor prefix - + foreach x {name mode type linkname magic uname gname prefix mode uid gid size mtime cksum version devmajor devminor} { set $x [string trim [set $x] "\x00"] } @@ -175,18 +175,18 @@ proc ::tar::untar {tar args} { proc ::tar::createHeader {name followlinks} { foreach x {linkname prefix devmajor devminor} {set $x ""} - + if {$followlinks} { file stat $name stat } else { file lstat $name stat } - + set type [string map {file 0 directory 5 characterSpecial 3 blockSpecial 4 fifo 6 link 2 socket A} $stat(type)] set gid "0001274" set uid "0001752" set mtime [format %.11o $stat(mtime)] - + set uname "pup_tool" set gname "psnes" if {$::tcl_platform(platform) == "unix"} { @@ -196,12 +196,12 @@ proc ::tar::createHeader {name followlinks} { set mode 0000644 if {$stat(type) == "directory"} {set mode 0000755} } - + set size 0 if {$stat(type) == "file"} { set size [format %.11o $stat(size)] } - + set name [string trimleft $name /] if {[string length $name] > 255} { return -code error "path name over 255 chars" @@ -249,7 +249,7 @@ proc ::tar::writefile {in out followlinks} { proc ::tar::create {tar files args} { set dereference 0 parseOpts {dereference 0} $args - + set fh [::open $tar w+] fconfigure $fh -encoding binary -translation lf -eofchar {} foreach x [recurseDirs $files $dereference] { @@ -264,7 +264,7 @@ proc ::tar::create {tar files args} { proc ::tar::add {tar files args} { set dereference 0 parseOpts {dereference 0} $args - + set fh [::open $tar r+] fconfigure $fh -encoding binary -translation lf -eofchar {} seek $fh -1024 end diff --git a/tasks/README b/tasks/README index 04c5560..7b03b9b 100644 --- a/tasks/README +++ b/tasks/README @@ -2,9 +2,9 @@ ============================================================== .------. .-------. .-----. .. .-. .--------. .--. /_____ \/ _____//_____ \ / \/ \ /_ _____/\ / / - / ____/\____ \ __(__ < / \ / __)\ \/\/ / - / / / \/ \ /\/\ Y / \ / -/___/ /________/_________/__/ \___|__/ \__/\__/ + / ____/\____ \ __(__ < / \ / __)\ \/\/ / + / / / \/ \ /\/\ Y / \ / +/___/ /________/_________/__/ \___|__/ \__/\__/ PS3MFW tasks v0.2 ============================================================== @@ -38,7 +38,7 @@ BREAKDOWN OF ALL NEW TASKS 0.1 Tasks --------- -tasks/patch_category_game.tcl +tasks/patch_category_game.tcl Add new icons to the XMB Game category Modifies dev_flash/vsh/resource/explore/xmb/category_game.xml file diff --git a/tasks/broken_bluray.tcl b/tasks/broken_bluray.tcl index 946f0f8..769938b 100644 --- a/tasks/broken_bluray.tcl +++ b/tasks/broken_bluray.tcl @@ -7,10 +7,10 @@ # This software is distributed under the terms of the GNU General Public # License ("GPL") version 3, as published by the Free Software Foundation. # - + # Priority: 2100 # Description: Allow firmware update of console with broken blu-ray drive - + # Option --remove-bd-revoke: remove BdpRevoke (ENABLING THIS WILL REMOVE BLU-RAY DRIVE FIRMWARE) # Option --remove-bd-firmware: remove BD firmware (ENABLING THIS WILL REMOVE BLU-RAY DRIVE FIRMWARE) @@ -23,14 +23,14 @@ namespace eval ::broken_bluray { --remove-bd-revoke false --remove-bd-firmware false } - + proc main {} { ::modify_upl_file ::broken_bluray::callback } - + proc callback { file } { log "Modifying XML file [file tail ${file}]" - + if {[package provide Tk] != "" } { tk_messageBox -default ok -message "Removing blu-ray drive firmware packages press ok to continue" -icon warning } @@ -44,7 +44,7 @@ namespace eval ::broken_bluray { if {$::broken_bluray::options(--remove-bd-firmware)} { set xml [::remove_pkgs_from_upl_xml $xml "BD" "blu-ray drive firmware"] } - + ::xml::SaveToFile $xml $file } } diff --git a/tasks/change_devflash_files.tcl b/tasks/change_devflash_files.tcl index e59c166..ae9c1c2 100644 --- a/tasks/change_devflash_files.tcl +++ b/tasks/change_devflash_files.tcl @@ -7,7 +7,7 @@ # This software is distributed under the terms of the GNU General Public # License ("GPL") version 3, as published by the Free Software Foundation. # - + # Priority: 2900 # Description: Change a specific file in devflash manually diff --git a/tasks/change_version.tcl b/tasks/change_version.tcl index 4c75346..e9f5be9 100644 --- a/tasks/change_version.tcl +++ b/tasks/change_version.tcl @@ -7,7 +7,7 @@ # This software is distributed under the terms of the GNU General Public # License ("GPL") version 3, as published by the Free Software Foundation. # - + # Priority: 100 # Description: Change PUP build / version @@ -20,7 +20,7 @@ # Type --version-string: string # Type --version-prefix: string # Type --version-suffix: string - + namespace eval ::change_version { array set ::change_version::options { diff --git a/tasks/clean_game.tcl b/tasks/clean_game.tcl index 35a2390..24116f8 100644 --- a/tasks/clean_game.tcl +++ b/tasks/clean_game.tcl @@ -7,11 +7,11 @@ # This software is distributed under the terms of the GNU General Public # License ("GPL") version 3, as published by the Free Software Foundation. # - + # Priority: 1600 # Category: Game # Description: Clean unwanted icons from the XMB Game Category - + # Option --clean-game-gamedata: Remove "Game Data" icon from the XMB Game Category # Option --clean-game-mcutility: Remove "Memory Card Utility (PS/PS2)" icon from the XMB Game Category # Option --clean-game-minis-manual: Remove "Minis Manual" icon from the XMB Game Category @@ -39,15 +39,15 @@ namespace eval ::clean_game { --clean-game-sdpsp false --clean-game-trophy false } - + proc main {} { set CATEGORY_GAME_XML [file join dev_flash vsh resource explore xmb category_game.xml] ::modify_devflash_file ${CATEGORY_GAME_XML} ::clean_game::callback } - + proc callback { file } { log "Modifying XML file [file tail ${file}]" - + set xml [::xml::LoadFile $file] if {$::clean_game::options(--clean-game-gamedata)} { set xml [::remove_node_from_xmb_xml $xml "seg_gamedata" "Game Data"] @@ -70,7 +70,7 @@ namespace eval ::clean_game { if {$::clean_game::options(--clean-game-trophy)} { set xml [::remove_node_from_xmb_xml $xml "seg_trophy" "Trophy Collection"] } - + ::xml::SaveToFile $xml $file } } diff --git a/tasks/clean_music.tcl b/tasks/clean_music.tcl index b1b3778..01b6aaf 100644 --- a/tasks/clean_music.tcl +++ b/tasks/clean_music.tcl @@ -7,11 +7,11 @@ # This software is distributed under the terms of the GNU General Public # License ("GPL") version 3, as published by the Free Software Foundation. # - + # Priority: 1300 # Category: Music # Description: Clean unwanted icons from the XMB Music Category - + # Option --clean-music-dlna-scan: Remove "Search for Media Servers" icon from the XMB Music Category # Option --clean-music-dlna-device: Remove "Network Media Servers" icon from the XMB Music Category # Option --clean-music-playlists: Remove "Playlists" icon from the XMB Music Category @@ -30,15 +30,15 @@ namespace eval ::clean_music { --clean-music-playlists false --clean-music-welcome true } - + proc main {} { set CATEGORY_MUSIC_XML [file join dev_flash vsh resource explore xmb category_music.xml] ::modify_devflash_file ${CATEGORY_MUSIC_XML} ::clean_music::callback } - + proc callback { file } { log "Modifying XML file [file tail ${file}]" - + set xml [::xml::LoadFile $file] if {$::clean_music::options(--clean-music-dlna-scan)} { set xml [::remove_node_from_xmb_xml $xml "seg_dlna_scan" "Search for Media Servers"] @@ -52,7 +52,7 @@ namespace eval ::clean_music { if {$::clean_music::options(--clean-music-welcome)} { set xml [::remove_node_from_xmb_xml $xml "seg_welcome" "PlayStation Store"] } - + ::xml::SaveToFile $xml $file } } diff --git a/tasks/clean_network.tcl b/tasks/clean_network.tcl index a91cf0d..a5d7a6a 100644 --- a/tasks/clean_network.tcl +++ b/tasks/clean_network.tcl @@ -7,11 +7,11 @@ # This software is distributed under the terms of the GNU General Public # License ("GPL") version 3, as published by the Free Software Foundation. # - + # Priority: 1700 # Category: Network # Description: Clean unwanted icons from the XMB Network Category - + # Option --clean-network-browser: Remove "Internet Browser" icon from the XMB Network Category # Option --clean-network-folding-at-home: Remove "Life with PlayStation" icon from the XMB Network Category # Option --clean-network-kensaku: Remove "Internet Search" icon from the XMB Network Category @@ -33,25 +33,25 @@ namespace eval ::clean_network { --clean-network-manual true --clean-network-premo true } - + proc main {} { set CATEGORY_NETWORK_XML [file join dev_flash vsh resource explore xmb category_network.xml] ::modify_devflash_file ${CATEGORY_NETWORK_XML} ::clean_network::callback } - + proc callback { file } { log "Modifying XML file [file tail ${file}]" - + # hack to get around upstream category_network.xml errant /> - set fd [open $file r] - set data [read $fd] + set fd [open $file r] + set data [read $fd] regsub {\s*/>(\s*/>\s*)} $data {\1} data close $fd set xml [::xml::Load $data] - + # this should work but upstream category_network.xml has an errant /> # set xml [::xml::LoadFile $file] - + if {$::clean_network::options(--clean-network-browser)} { set xml [::remove_node_from_xmb_xml $xml "seg_browser" "Internet Browser"] } @@ -67,7 +67,7 @@ namespace eval ::clean_network { if {$::clean_network::options(--clean-network-premo)} { set xml [::remove_node_from_xmb_xml $xml "seg_premo" "Remote Play"] } - + ::xml::SaveToFile $xml $file } } diff --git a/tasks/clean_photo.tcl b/tasks/clean_photo.tcl index 6dc2d90..a2b7bc5 100644 --- a/tasks/clean_photo.tcl +++ b/tasks/clean_photo.tcl @@ -7,11 +7,11 @@ # This software is distributed under the terms of the GNU General Public # License ("GPL") version 3, as published by the Free Software Foundation. # - + # Priority: 1200 # Category: Photo # Description: Clean unwanted icons from the XMB Photo Category - + # Option --clean-photo-dlna-scan: Remove "Search for Media Servers" icon from the XMB Photo Category # Option --clean-photo-dlna-device: Remove "Network Media Servers" icon from the XMB Photo Category # Option --clean-photo-hakoniwa: Remove "Photo Gallery" icon from the XMB Photo Category @@ -33,15 +33,15 @@ namespace eval ::clean_photo { --clean-photo-playlists false --clean-photo-screenshot true } - + proc main {} { set CATEGORY_PHOTO_XML [file join dev_flash vsh resource explore xmb category_photo.xml] ::modify_devflash_file ${CATEGORY_PHOTO_XML} ::clean_photo::callback } - + proc callback { file } { log "Modifying XML file [file tail ${file}]" - + set xml [::xml::LoadFile $file] if {$::clean_photo::options(--clean-photo-dlna-scan)} { set xml [::remove_node_from_xmb_xml $xml "seg_dlna_scan" "Search for Media Servers"] @@ -58,7 +58,7 @@ namespace eval ::clean_photo { if {$::clean_photo::options(--clean-photo-screenshot)} { set xml [::remove_node_from_xmb_xml $xml "seg_screenshot" "Screenshot"] } - + ::xml::SaveToFile $xml $file } } diff --git a/tasks/clean_psn.tcl b/tasks/clean_psn.tcl index 9de1bdf..efeba9e 100644 --- a/tasks/clean_psn.tcl +++ b/tasks/clean_psn.tcl @@ -7,11 +7,11 @@ # This software is distributed under the terms of the GNU General Public # License ("GPL") version 3, as published by the Free Software Foundation. # - + # Priority: 1800 # Category: PlayStation Network # Description: Clean unwanted icons from the XMB PlayStation Network Category - + # Option --clean-psn-commerce-new: Remove "What's New" icon from the XMB PlayStation Network Category # Option --clean-psn-home: Remove "PlayStation Home" icon from the XMB PlayStation Network Category # Option --clean-psn-regist: Remove "Sign In" icon from the XMB PlayStation Network Category @@ -30,15 +30,15 @@ namespace eval ::clean_psn { --clean-psn-regist true --clean-psn-welcome true } - + proc main {} { set CATEGORY_PSN_XML [file join dev_flash vsh resource explore xmb category_psn.xml] ::modify_devflash_file ${CATEGORY_PSN_XML} ::clean_psn::callback } - + proc callback { file } { log "Modifying XML file [file tail ${file}]" - + set xml [::xml::LoadFile $file] if {$::clean_psn::options(--clean-psn-commerce-new)} { set xml [::remove_node_from_xmb_xml $xml "seg_commerce_new" "What's New"] @@ -52,7 +52,7 @@ namespace eval ::clean_psn { if {$::clean_psn::options(--clean-psn-welcome)} { set xml [::remove_node_from_xmb_xml $xml "seg_welcome" "PlayStation Store"] } - + ::xml::SaveToFile $xml $file } } diff --git a/tasks/clean_video.tcl b/tasks/clean_video.tcl index 8220bd3..031f786 100644 --- a/tasks/clean_video.tcl +++ b/tasks/clean_video.tcl @@ -7,11 +7,11 @@ # This software is distributed under the terms of the GNU General Public # License ("GPL") version 3, as published by the Free Software Foundation. # - + # Priority: 1400 # Category: Video # Description: Clean unwanted icons from the XMB Video Category - + # Option --clean-video-bddata-mgmt: Remove "BD Data Utility" icon from the XMB Video Category # Option --clean-video-dlna-scan: Remove "Search for Media Servers" icon from the XMB Video Category # Option --clean-video-dlna-device: Remove "Network Media Servers" icon from the XMB Video Category @@ -36,15 +36,15 @@ namespace eval ::clean_video { --clean-video-netflix true --clean-video-welcome true } - + proc main {} { set CATEGORY_VIDEO_XML [file join dev_flash vsh resource explore xmb category_video.xml] ::modify_devflash_file ${CATEGORY_VIDEO_XML} ::clean_video::callback } - + proc callback { file } { log "Modifying XML file [file tail ${file}]" - + set xml [::xml::LoadFile $file] if {$::clean_video::options(--clean-video-bddata-mgmt)} { set xml [::remove_node_from_xmb_xml $xml "seg_bddata_mgmt" "BD Data Utility"] @@ -64,7 +64,7 @@ namespace eval ::clean_video { if {$::clean_video::options(--clean-video-welcome)} { set xml [::remove_node_from_xmb_xml $xml "seg_welcome" "PlayStation Store"] } - + ::xml::SaveToFile $xml $file } } diff --git a/tasks/homebrew_category.tcl b/tasks/homebrew_category.tcl index 1c38e35..7a68e85 100644 --- a/tasks/homebrew_category.tcl +++ b/tasks/homebrew_category.tcl @@ -12,7 +12,7 @@ # Description: Add "Homebrew" category to the XMB # Option --homebrew-cat: Category to replace - + # Type --homebrew-cat: combobox {{Users} {Photo} {Music} {Video} {TV} {Game} {Network} {PlayStation® Network} {Friends}} @@ -27,11 +27,11 @@ namespace eval ::homebrew_category { set CATEGORY_GAME_TOOL2_XML [file join dev_flash vsh resource explore xmb category_game_tool2.xml] set EXPLORE_PLUGIN_FULL_RCO [file join dev_flash vsh resource explore_plugin_full.rco] set XMB_INGAME_RCO [file join dev_flash vsh resource xmb_ingame.rco] - + if {$::homebrew_category::options(--homebrew-cat) == "Users"} { set CATEGORY_XML [file join dev_flash vsh resource explore xmb category_user.xml] } - + if {$::homebrew_category::options(--homebrew-cat) == "Photo"} { set CATEGORY_XML [file join dev_flash vsh resource explore xmb category_photo.xml] } @@ -39,40 +39,40 @@ namespace eval ::homebrew_category { if {$::homebrew_category::options(--homebrew-cat) == "Music"} { set CATEGORY_XML [file join dev_flash vsh resource explore xmb category_music.xml] } - + if {$::homebrew_category::options(--homebrew-cat) == "Video"} { set CATEGORY_XML [file join dev_flash vsh resource explore xmb category_video.xml] } - + if {$::homebrew_category::options(--homebrew-cat) == "TV"} { set CATEGORY_XML [file join dev_flash vsh resource explore xmb category_tv.xml] set XMB_PLUGIN [file join dev_flash vsh module xmb_plugin.sprx] modify_devflash_file $XMB_PLUGIN ::homebrew_category::patch_self } - + if {$::homebrew_category::options(--homebrew-cat) == "Game"} { set CATEGORY_XML [file join dev_flash vsh resource explore xmb category_game.xml] } - + if {$::homebrew_category::options(--homebrew-cat) == "Network"} { set CATEGORY_XML [file join dev_flash vsh resource explore xmb category_network.xml] } - + if {$::homebrew_category::options(--homebrew-cat) == "PlayStation® Network"} { set CATEGORY_XML [file join dev_flash vsh resource explore xmb category_psn.xml] } - + if {$::homebrew_category::options(--homebrew-cat) == "Friends"} { set CATEGORY_XML [file join dev_flash vsh resource explore xmb category_friend.xml] } - + modify_devflash_file $CATEGORY_TV_XML ::homebrew_category::find_nodes modify_devflash_file $CATEGORY_GAME_TOOL2_XML ::homebrew_category::find_nodes_2 modify_devflash_file $CATEGORY_XML ::homebrew_category::inject_nodes modify_rco_file $EXPLORE_PLUGIN_FULL_RCO ::homebrew_category::callback_homebrew modify_rco_file $XMB_INGAME_RCO ::homebrew_category::callback_homebrew } - + proc patch_self {self} { log "Patching [file tail $self]" ::modify_self_file $self ::homebrew_category::patch_elf @@ -87,18 +87,18 @@ namespace eval ::homebrew_category { catch_die {::patch_elf $elf $search 0 $replace} \ "Unable to patch self [file tail $elf]" } - + proc find_nodes { file } { log "Parsing XML: [file tail $file]" set xml [::xml::LoadFile $file] set ::XMBML [::xml::GetNodeByAttribute $xml "XMBML" version "1.0"] - + if {$::XMBML == ""} { die "Could not parse $file" } } - + proc find_nodes_2 { file } { log "Parsing XML: [file tail $file]" set xml [::xml::LoadFile $file] @@ -106,30 +106,30 @@ namespace eval ::homebrew_category { set ::query_package_files [::xml::GetNodeByAttribute $xml "XMBML:View:Items:Query" key "seg_package_files"] set ::view_package_files [::xml::GetNodeByAttribute $xml "XMBML:View" id "seg_package_files"] set ::view_packages [::xml::GetNodeByAttribute $xml "XMBML:View" id "seg_packages"] - + if {$::query_package_files == "" || $::view_package_files == "" || $::view_packages == "" } { die "Could not parse $file" } set ::query_gamedebug [::xml::GetNodeByAttribute $xml "XMBML:View:Items:Query" key "seg_gamedebug"] set ::view_gamedebug [::xml::GetNodeByAttribute $xml "XMBML:View" id "seg_gamedebug"] - + if {$::query_gamedebug == "" || $::view_gamedebug== "" } { die "Could not parse $file" } } - + proc inject_nodes { file } { log "Modifying XML: [file tail $file]" set xml [::xml::LoadFile $file] - + set xml [::xml::ReplaceNode $xml [::xml::GetNodeIndicesByAttribute $xml "XMBML" version "1.0"] $::XMBML] set xml [::xml::InsertNode $xml [::xml::GetNodeIndicesByAttribute $xml "XMBML:View:Items:Query" key "seg_gameexit"] $::query_package_files] set xml [::xml::InsertNode $xml {2 end 0} $::view_package_files] set xml [::xml::InsertNode $xml {2 end 0} $::view_packages] set xml [::xml::InsertNode $xml [::xml::GetNodeIndicesByAttribute $xml "XMBML:View:Items:Query" key "seg_gameexit"] $::query_gamedebug] set xml [::xml::InsertNode $xml {2 end 0} $::view_gamedebug] - + unset ::query_package_files unset ::view_package_files unset ::view_packages @@ -137,9 +137,9 @@ namespace eval ::homebrew_category { unset ::view_gamedebug ::xml::SaveToFile $xml $file } - - proc callback_homebrew {path args} { + + proc callback_homebrew {path args} { log "Patching English.xml into [file tail $path]" - sed_in_place [file join $path English.xml] $::homebrew_category::options(--homebrew-cat) Homebrew + sed_in_place [file join $path English.xml] $::homebrew_category::options(--homebrew-cat) Homebrew } } \ No newline at end of file diff --git a/tasks/language_pack.tcl b/tasks/language_pack.tcl index c85559a..b6a9086 100644 --- a/tasks/language_pack.tcl +++ b/tasks/language_pack.tcl @@ -27,7 +27,7 @@ namespace eval ::language_pack { --language-replace "" --language-font true } - + proc main {} { variable options set fontPrefix "SCE-PS3-" @@ -45,13 +45,13 @@ namespace eval ::language_pack { ::modify_devflash_file ${devflashFontFile} ::language_pack::callback_font ${langpackFontFile} } } - } + } set rcoFiles {{ap_plugin} {audioplayer_plugin} {audioplayer_plugin_dummy} {audioplayer_plugin_mini} {audioplayer_plugin_util} {auth_plugin} {autodownload_plugin} {avc_game_plugin} {avc_plugin} {avc2_game_plugin} {avc2_game_video_plugin} {avc2_text_plugin} {bdp_disccheck_plugin} {bdp_plugin} {bdp_storage_plugin} {category_setting_plugin} {checker_plugin} {custom_render_plugin} {data_copy_plugin} {deviceconf_plugin} {dlna_plugin} {download_plugin} {edy_plugin} {eula_cddb_plugin} {eula_hcopy_plugin} {eula_net_plugin} {explore_category_friend} {explore_category_game} {explore_category_music} {explore_category_network} {explore_category_photo} {explore_category_psn} {explore_category_sysconf} {explore_category_tv} {explore_category_user} {explore_category_video} {explore_plugin_ft} {explore_plugin_full} {explore_plugin_game} {explore_plugin_np} {filecopy_plugin} {friendim_plugin} {friendim_plugin_game} {friendml_plugin} {friendml_plugin_game} {friendtrophy_plugin} {friendtrophy_plugin_game} {game_ext_plugin} {game_indicator_plugin} {game_plugin} {gamedata_plugin} {gamelib_plugin} {gameupdate_plugin} {hknw_plugin} {idle_plugin} {impose_plugin} {kensaku_plugin} {msgdialog_plugin} {musicbrowser_plugin} {nas_plugin} {netconf_plugin} {newstore_effect} {newstore_plugin} {np_eula_plugin} {np_matching_plugin} {np_multisignin_plugin} {np_trophy_ingame} {np_trophy_plugin} {npsignin_plugin} {osk_plugin} {oskfullkeypanel_plugin} {oskpanel_plugin} {pesm_plugin} {photo_network_sharing_plugin} {photolist_plugin} {photoupload_plugin} {photoviewer_plugin} {playlist_plugin} {poweroff_plugin} {premo_plugin} {print_plugin} {profile_plugin} {profile_plugin_mini} {ps3_savedata_plugin} {rec_plugin} {regcam_plugin} {sacd_plugin} {scenefolder_plugin} {screenshot_plugin} {search_service} {software_update_plugin} {soundvisualizer_plugin} {strviewer_plugin} {subdisplay_plugin} {sv_pseudoaudioplayer_plugin} {sysconf_plugin} {system_plugin} {thumthum_plugin} {upload_util} {user_info_plugin} {user_plugin} {videodownloader_plugin} {videoeditor_plugin} {videoplayer_plugin} {videoplayer_util} {vmc_savedata_plugin} {wboard_plugin} {webbrowser_plugin} {webrender_plugin} {xmb_ingame} {xmb_plugin_normal} {ycon_manual_plugin}} foreach rcoFile $rcoFiles { set devflashRcoFile [file join dev_flash vsh resource ${rcoFile}.rco] - + if {$options(--language-replace) == ""} { } else { if {[file isdirectory [file join ${langpackDir} replace]]} { @@ -60,9 +60,9 @@ namespace eval ::language_pack { set mode "0" ::modify_rco_file ${devflashRcoFile} ::language_pack::callback_rco ${replacelangpackRcoFile} ${mode} {empty} } - } + } } - + if {[file isdirectory [file join ${langpackDir} edit]]} { set langs {{English} {French} {German} {Italian} {Finnish} {Dutch} {Danish} {Swedish} {Spanish} {Russian} {Portugese} {Norwegian} {Korean} {ChineseTrad} {ChineseSimpl} {Japanese}} foreach lang $langs { @@ -73,7 +73,7 @@ namespace eval ::language_pack { } } } - + if {[file exists [file join ${langpackDir} format.txt]]} { set formatlangpackRcoFile [file join ${langpackDir} format.txt] if {[file exists $formatlangpackRcoFile]} { @@ -82,7 +82,7 @@ namespace eval ::language_pack { } } } - } + } proc callback_font { dst src } { if {[file exists ${src}]} { @@ -103,31 +103,31 @@ namespace eval ::language_pack { if {${mode} == "0" } { set dst [file join ${path} $options(--language-replace).xml] } - + if {${mode} == "1" } { set dst [file join ${path} ${name}.xml] } - + if {${mode} == "2" } { set dst [file join ${::CUSTOM_PUP_DIR} "update_files" "dev_flash" "dev_flash" "vsh" "resource" ${name}.rco.xml] } - - if {[file exists ${src}]} { - if {[file exists ${dst}]} { - if {${mode} != "2" } { + + if {[file exists ${src}]} { + if {[file exists ${dst}]} { + if {${mode} != "2" } { log "Replacing ${dst}" copy_file -force ${src} ${dst} - } else { + } else { log "Patching format" set re [open ${src} r] set format [read $re] set read [read [open ${dst} r]] sed_in_place ${read} utf16 ${format} - close $re + close $re } } else { die "${dst} does not exist" - } + } } else { die "${src} does not exist" } diff --git a/tasks/patch_category_game.tcl b/tasks/patch_category_game.tcl index e739ba5..42738fe 100644 --- a/tasks/patch_category_game.tcl +++ b/tasks/patch_category_game.tcl @@ -7,23 +7,23 @@ # This software is distributed under the terms of the GNU General Public # License ("GPL") version 3, as published by the Free Software Foundation. # - + # Priority: 1000 # Description: Add new icons to the XMB Game category - + # Option --patch-package-files: Add "Install Package Files" icon to the XMB Game Category # Option --patch-app-home: Add "/app_home" icon to the XMB Game Category - + # Type --patch-package-files: boolean # Type --patch-app-home: boolean namespace eval ::patch_category_game { - + array set ::patch_category_game::options { --patch-package-files true --patch-app-home true } - + proc main {} { set CATEGORY_GAME_TOOL2_XML [file join dev_flash vsh resource explore xmb category_game_tool2.xml] set CATEGORY_GAME_XML [file join dev_flash vsh resource explore xmb category_game.xml] @@ -31,7 +31,7 @@ namespace eval ::patch_category_game { ::modify_devflash_file $CATEGORY_GAME_TOOL2_XML ::patch_category_game::find_nodes ::modify_devflash_file $CATEGORY_GAME_XML ::patch_category_game::inject_nodes } - + proc find_nodes { file } { log "Parsing XML: [file tail $file]" set xml [::xml::LoadFile $file] @@ -40,7 +40,7 @@ namespace eval ::patch_category_game { set ::query_package_files [::xml::GetNodeByAttribute $xml "XMBML:View:Items:Query" key "seg_package_files"] set ::view_package_files [::xml::GetNodeByAttribute $xml "XMBML:View" id "seg_package_files"] set ::view_packages [::xml::GetNodeByAttribute $xml "XMBML:View" id "seg_packages"] - + if {$::query_package_files == "" || $::view_package_files == "" || $::view_packages == "" } { die "Could not parse $file" } @@ -49,13 +49,13 @@ namespace eval ::patch_category_game { if {$::patch_category_game::options(--patch-app-home)} { set ::query_gamedebug [::xml::GetNodeByAttribute $xml "XMBML:View:Items:Query" key "seg_gamedebug"] set ::view_gamedebug [::xml::GetNodeByAttribute $xml "XMBML:View" id "seg_gamedebug"] - + if {$::query_gamedebug == "" || $::view_gamedebug== "" } { die "Could not parse $file" } } } - + proc inject_nodes { file } { log "Modifying XML: [file tail $file]" set xml [::xml::LoadFile $file] @@ -64,7 +64,7 @@ namespace eval ::patch_category_game { set xml [::xml::InsertNode $xml [::xml::GetNodeIndicesByAttribute $xml "XMBML:View:Items:Query" key "seg_gameexit"] $::query_package_files] set xml [::xml::InsertNode $xml {2 end 0} $::view_package_files] set xml [::xml::InsertNode $xml {2 end 0} $::view_packages] - + unset ::query_package_files unset ::view_package_files unset ::view_packages diff --git a/tasks/patch_lv2.tcl b/tasks/patch_lv2.tcl index 14e368e..735375a 100644 --- a/tasks/patch_lv2.tcl +++ b/tasks/patch_lv2.tcl @@ -7,10 +7,10 @@ # This software is distributed under the terms of the GNU General Public # License ("GPL") version 3, as published by the Free Software Foundation. # - + # Priority: 400 # Description: Patch LV2 kernel - + # Option --patch-lv2-peek-poke: Patch to add Peek&Poke system calls to LV2 # Type --patch-lv2-peek-poke: boolean diff --git a/tasks/patch_shop.tcl b/tasks/patch_shop.tcl index 50168e7..b7ac1a7 100644 --- a/tasks/patch_shop.tcl +++ b/tasks/patch_shop.tcl @@ -7,7 +7,7 @@ # This software is distributed under the terms of the GNU General Public # License ("GPL") version 3, as published by the Free Software Foundation. # - + # Priority: 2300 # Description: Patch firmware for installation shop/promo unit @@ -17,8 +17,8 @@ # Type --patch-promo-flags: boolean # Type --patch-update-flags: boolean -# Type --patch-version: string - +# Type --patch-version: string + namespace eval ::patch_shop { array set ::patch_shop::options { diff --git a/tasks/patch_xmb_plugin.tcl b/tasks/patch_xmb_plugin.tcl index ec04423..8b8b694 100644 --- a/tasks/patch_xmb_plugin.tcl +++ b/tasks/patch_xmb_plugin.tcl @@ -7,7 +7,7 @@ # This software is distributed under the terms of the GNU General Public # License ("GPL") version 3, as published by the Free Software Foundation. # - + # Priority: 2500 # Description: Remove unwanted icons from the XMB @@ -53,7 +53,7 @@ namespace eval ::patch_xmb_plugin { --remove-psn false --remove-friends false } - + proc main {} { if {$::patch_xmb_plugin::options(--patch-xmb-plugin)} { set XMB_SPRX [file join dev_flash vsh module xmb_plugin.sprx] @@ -64,7 +64,7 @@ namespace eval ::patch_xmb_plugin { ::modify_devflash_file ${XMB_SPRX} ::patch_xmb_plugin::patch_self } } - + proc patch_self {self} { log "Patching [file tail $self]" ::modify_self_file $self ::patch_xmb_plugin::patch_elf diff --git a/tasks/spoof_version.tcl b/tasks/spoof_version.tcl index 0b7ee3a..466a79c 100644 --- a/tasks/spoof_version.tcl +++ b/tasks/spoof_version.tcl @@ -7,13 +7,13 @@ # This software is distributed under the terms of the GNU General Public # License ("GPL") version 3, as published by the Free Software Foundation. # - + # Priority: 2600 # Description: Spoof firmware build / version # Option --spoof: Select firmware version to spoof # Type --spoof: combobox { {3.15 38031 001:CEX-ww} {3.41 45039 001:CEX-ww} {3.55 47516 001:CEX-ww} {3.56 48246 001:CEX-ww} {3.60 48686 001:CEX-ww} } - + namespace eval ::spoof_version { array set ::spoof_version::options { @@ -66,7 +66,7 @@ namespace eval ::spoof_version { debug "replace: $replace" catch_die {::patch_elf $elf $search 0 $replace} "Unable to patch self [file tail $elf] with [::hexify $replace]" -# debug "Patching 0x31a7c0" +# debug "Patching 0x31a7c0" # set search "\x48\x00\x00\x38\xa0\x7f\x00\x04\x39\x60\x00\x01" # set replace "\x38\x60\x00\x82" # catch_die {::patch_elf $elf $search 4 $replace} "Unable to patch self [file tail $elf]" diff --git a/tasks/tv_category.tcl b/tasks/tv_category.tcl index 13b41ba..f07b3d9 100644 --- a/tasks/tv_category.tcl +++ b/tasks/tv_category.tcl @@ -12,7 +12,7 @@ # Description: Add "TV" category to the XMB # Option --tv-cat: Show TV category in xmb no matter if your country support it. - + # Type --tv-cat: boolean @@ -22,14 +22,14 @@ namespace eval ::tv_category { --tv-cat true } - proc main {} { + proc main {} { if {$::tv_category::options(--tv-cat)} { set CATEGORY_XML [file join dev_flash vsh resource explore xmb category_tv.xml] set XMB_PLUGIN [file join dev_flash vsh module xmb_plugin.sprx] modify_devflash_file $XMB_PLUGIN ::tv_category::patch_self } } - + proc patch_self {self} { log "Patching [file tail $self]" ::modify_self_file $self ::tv_category::patch_elf diff --git a/xml.tcl b/xml.tcl index 8cc968f..3f25300 100644 --- a/xml.tcl +++ b/xml.tcl @@ -23,18 +23,18 @@ namespace eval ::xml { regsub {>[^>]*?$} $xml {>} xml if { $xml == "" } { return "" } # Remove xml file header and comments - # Here the ".*?" in the regexp means a non greedy matching, + # Here the ".*?" in the regexp means a non greedy matching, # which means match as little characters as possible.. the reason, here's an example : # - # the regsub {} would remove from the first - # which means we end up with and we loose .. + # the regsub {} would remove from the first + # which means we end up with and we loose .. # if it's greedy, it will match all possible chars, with non-greedy, - # it will match only the smallest number: only the comment... + # it will match only the smallest number: only the comment... regsub -all {<\?xml.*?\?>} $xml "" xml regsub -all {} $xml "" xml # Avoid unmatched braces in list, in case we have a left or right accolade in the xml data set xml [string map {"\{" "&right_accolade;" "\}" "&left_accolade;" "\\" "&escape_char;"} $xml] - + regsub -all {>\s*<} [string trim $xml " \r\n\t<>"] "\} \{" xml set xml [string map {> "\} \{#text \{" < "\}\} \{" } $xml] @@ -70,7 +70,7 @@ namespace eval ::xml { if {[llength $rest]%2} {error "att's not paired: $rest"} } if [llength $stack] {error "unresolved: $stack"} - + # Unescape chars and accolades string map {"\} \}" "\}\}" "&right_accolade;" "\\\{" "&left_accolade;" "\\\}" "&escape_char;" "\\\\"} [xmldecode [lindex $res 0] 1] } @@ -125,7 +125,7 @@ namespace eval ::xml { } return $res } - + proc xmlencode {string} { return [string map { "<" "<" @@ -181,7 +181,7 @@ namespace eval ::xml { puts $fd $xml close $fd } - + proc GetNodeIndices {list find {no 0} {stack ""}} { variable xmlTag_occurences @@ -206,7 +206,7 @@ namespace eval ::xml { [string first $current_stack ":$find"] == -1 } { #status_log "$find not in $current_stack" red continue - } else { + } else { set index 2 set subindex 0 #status_log "$find is in a subkey of $current_stack\n" red @@ -219,7 +219,7 @@ namespace eval ::xml { incr subindex } } - } + } } return "" @@ -253,8 +253,8 @@ namespace eval ::xml { } return "" } - - proc GetAttribute { list find attribute_name {no 0}} { + + proc GetAttribute { list find attribute_name {no 0}} { set node [GetNode $list $find $no] if {$node != ""} { foreach { tag attributes children} $node break @@ -262,11 +262,11 @@ namespace eval ::xml { if { [info exists attributes_arr($attribute_name)] } { return [string map {"\\\\" "\\" "\\\{" "\{" "\\\}" "\}" } [set attributes_arr($attribute_name)]] } - } + } return "" } - - proc ListChildren {list find {no 0}} { + + proc ListChildren {list find {no 0}} { set node [GetNode $list $find $no] if {$node != ""} { foreach { tag attributes children} $node break @@ -281,7 +281,7 @@ namespace eval ::xml { return "" } - proc GetAttributes { list find {no 0}} { + proc GetAttributes { list find {no 0}} { set node [GetNode $list $find $no] if {$node != ""} { foreach { tag attributes children} $node break @@ -289,8 +289,8 @@ namespace eval ::xml { } return "" } - - proc ListAttributes { list find {no 0}} { + + proc ListAttributes { list find {no 0}} { array set attributes [GetAttributes $list $find $no] return [array names attributes] } @@ -301,11 +301,11 @@ namespace eval ::xml { proc InsertNode {list indices node} { return [__modifyNode $list $indices $node "insert"] - } + } proc RemoveNode {list indices} { return [__modifyNode $list $indices {} "remove"] - } + } proc GetNodeIndicesByAttribute {list find attribute value {no 0}} { regsub {:$} $find {} find