From feda8a7db8d1d7c5439aa8f8feef7cc0dd2b59a0 Mon Sep 17 00:00:00 2001 From: Unit 193 Date: Fri, 27 Jul 2018 23:51:12 -0400 Subject: New upstream version 3.2.1+dfsg1 --- Plugins/DbSqliteWx/add_prefix.tcl | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Plugins/DbSqliteWx/add_prefix.tcl (limited to 'Plugins/DbSqliteWx/add_prefix.tcl') diff --git a/Plugins/DbSqliteWx/add_prefix.tcl b/Plugins/DbSqliteWx/add_prefix.tcl new file mode 100644 index 0000000..74e3e9f --- /dev/null +++ b/Plugins/DbSqliteWx/add_prefix.tcl @@ -0,0 +1,29 @@ +#!/usr/bin/env tclsh + +proc process {f} { + set fd [open $f r] + set data [read $fd] + close $fd + + set data [string map [list sqlite3 wx_sqlite3] $data] + set data [string map [list wx_sqlite3.c wxsqlite3.c] $data] + set data [string map [list wx_sqlite3.h wxsqlite3.h] $data] + + set fd [open $f w] + puts $fd $data + close $fd +} + +if {[file exists sqlite3.c]} { + file rename -force sqlite3.c wxsqlite3.c +} + +if {[file exists sqlite3.h]} { + file rename -force sqlite3.h wxsqlite3.h + file copy -force wxsqlite3.h wxsqlite3_unmodified.h +} + +foreach f [concat [glob -nocomplain *.c] [glob -nocomplain *.h]] { + if {[string match -nocase "dbsqlitewx*" $f]} continue + process $f +} -- cgit v1.2.3