Update of /cvsroot/pure-data/externals/miXed/shared/hammer In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1117/shared/hammer
Modified Files: file.c Log Message: cyclone alpha54 and toxy alpha16 (see notes.txt for cyclone, toxy and shared)
Index: file.c =================================================================== RCS file: /cvsroot/pure-data/externals/miXed/shared/hammer/file.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** file.c 28 Feb 2005 13:10:40 -0000 1.5 --- file.c 12 Mar 2005 00:19:10 -0000 1.6 *************** *** 83,87 ****
sys_gui("proc hammereditor_dodirty {name} {\n"); ! sys_gui(" if {[catch {$name.text edit modified} dirty]} {set dirty 0}\n"); sys_gui(" set title [wm title $name]\n"); sys_gui(" set dt [string equal -length 1 $title "*"]\n"); --- 83,87 ----
sys_gui("proc hammereditor_dodirty {name} {\n"); ! sys_gui(" if {[catch {$name.text edit modified} dirty]} {set dirty 1}\n"); sys_gui(" set title [wm title $name]\n"); sys_gui(" set dt [string equal -length 1 $title "*"]\n"); *************** *** 130,134 **** sys_gui("proc hammereditor_close {name ask} {\n"); sys_gui(" if {[winfo exists $name]} {\n"); ! sys_gui(" if {[catch {$name.text edit modified} dirty]} {set dirty 0}\n"); sys_gui(" if {$ask && $dirty} {\n"); sys_gui(" set title [wm title $name]\n"); --- 130,134 ---- sys_gui("proc hammereditor_close {name ask} {\n"); sys_gui(" if {[winfo exists $name]} {\n"); ! sys_gui(" if {[catch {$name.text edit modified} dirty]} {set dirty 1}\n"); sys_gui(" if {$ask && $dirty} {\n"); sys_gui(" set title [wm title $name]\n"); *************** *** 138,142 **** sys_gui(" set answer [tk_messageBox \-type yesnocancel \\n"); sys_gui(" \-icon question \\n"); ! sys_gui(" \-message [concat Save changes to $title?]]\n"); sys_gui(" if {$answer == "yes"} {hammereditor_send $name}\n"); sys_gui(" if {$answer != "cancel"} {hammereditor_doclose $name}\n"); --- 138,142 ---- sys_gui(" set answer [tk_messageBox \-type yesnocancel \\n"); sys_gui(" \-icon question \\n"); ! sys_gui(" \-message [concat Save changes to \"$title\"?]]\n"); sys_gui(" if {$answer == "yes"} {hammereditor_send $name}\n"); sys_gui(" if {$answer != "cancel"} {hammereditor_doclose $name}\n"); *************** *** 184,189 **** void hammereditor_append(t_hammerfile *f, char *contents) { ! if (!contents) contents = ""; ! sys_vgui("hammereditor_append .%x {%s}\n", (int)f, contents); }
--- 184,205 ---- void hammereditor_append(t_hammerfile *f, char *contents) { ! if (contents) ! { ! char *ptr; ! for (ptr = contents; *ptr; ptr++) ! { ! if (*ptr == '{' || *ptr == '}') ! { ! char c = *ptr; ! *ptr = 0; ! sys_vgui("hammereditor_append .%x {%s}\n", (int)f, contents); ! sys_vgui("hammereditor_append .%x "%c"\n", (int)f, c); ! *ptr = c; ! contents = ptr + 1; ! } ! } ! if (*contents) ! sys_vgui("hammereditor_append .%x {%s}\n", (int)f, contents); ! } }