diff options
author | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2009-02-11 06:48:39 +0000 |
---|---|---|
committer | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2009-02-11 06:48:39 +0000 |
commit | 5dc4e53b8ff95791503a4c6dc16c41aa41cae453 (patch) | |
tree | 7a4000185586409dd57272fc35649f37bc5a4a5d /packages | |
parent | 86df838b5cd57f28cb03e3ad2e924fe4232363d0 (diff) |
checked in patch to pd-extended 0.41.4 and submitted it to the patch tracker for Miller
svn path=/trunk/; revision=10758
Diffstat (limited to 'packages')
-rw-r--r-- | packages/patches/fix_max.pat_exporting-0.41.4.patch | 117 |
1 files changed, 117 insertions, 0 deletions
diff --git a/packages/patches/fix_max.pat_exporting-0.41.4.patch b/packages/patches/fix_max.pat_exporting-0.41.4.patch new file mode 100644 index 00000000..16b8c0b2 --- /dev/null +++ b/packages/patches/fix_max.pat_exporting-0.41.4.patch @@ -0,0 +1,117 @@ +--- branches/pd-extended/0.41/pd/src/m_binbuf.c 2009/02/11 01:28:08 10756 ++++ branches/pd-extended/0.41/pd/src/m_binbuf.c 2009/02/11 06:44:40 10757 +@@ -952,8 +952,9 @@ + t_binbuf *newb = binbuf_new(); + t_atom *vec = oldb->b_vec; + t_int n = oldb->b_n, nextindex, stackdepth = 0, stack[MAXSTACK], +- nobj = 0, i; ++ nobj = 0, i, gotfontsize = 0; + t_atom outmess[MAXSTACK], *nextmess; ++ t_float fontsize = 10; + if (!maxtopd) + binbuf_addv(newb, "ss;", gensym("max"), gensym("v2")); + for (nextindex = 0; nextindex < n; ) +@@ -1179,12 +1180,17 @@ + stack[stackdepth] = nobj; + stackdepth++; + nobj = 0; ++ if(!gotfontsize) { /* only the first canvas sets the font size */ ++ fontsize = atom_getfloatarg(6, natom, nextmess); ++ gotfontsize = 1; ++ } ++ t_float x = atom_getfloatarg(2, natom, nextmess); ++ t_float y = atom_getfloatarg(3, natom, nextmess); + binbuf_addv(newb, "ssffff;", + gensym("#N"), gensym("vpatcher"), +- atom_getfloatarg(2, natom, nextmess), +- atom_getfloatarg(3, natom, nextmess), +- atom_getfloatarg(4, natom, nextmess), +- atom_getfloatarg(5, natom, nextmess)); ++ x, y, ++ atom_getfloatarg(4, natom, nextmess) + x, ++ atom_getfloatarg(5, natom, nextmess) + y); + } + } + if (!strcmp(first, "#X")) +@@ -1193,12 +1199,17 @@ + && (ISSYMBOL (&nextmess[4], "pd"))) + { + binbuf_addv(newb, "ss;", gensym("#P"), gensym("pop")); +- binbuf_addv(newb, "ssffffss;", +- gensym("#P"), gensym("newobj"), +- atom_getfloatarg(2, natom, nextmess), +- atom_getfloatarg(3, natom, nextmess), 50., 1., +- gensym("patcher"), +- atom_getsymbolarg(5, natom, nextmess)); ++ SETSYMBOL(outmess, gensym("#P")); ++ SETSYMBOL(outmess + 1, gensym("newobj")); ++ outmess[2] = nextmess[2]; ++ outmess[3] = nextmess[3]; ++ SETFLOAT(outmess + 4, 40.*(natom-5)); ++ SETFLOAT(outmess + 5, fontsize); ++ SETSYMBOL(outmess + 6, gensym("p")); ++ for (i = 5; i < natom; i++) ++ outmess[i+2] = nextmess[i]; ++ SETSEMI(outmess + natom + 2); ++ binbuf_add(newb, natom + 3, outmess); + if (stackdepth) stackdepth--; + nobj = stack[stackdepth]; + nobj++; +@@ -1212,25 +1223,25 @@ + gensym("inlet"), + atom_getfloatarg(2, natom, nextmess), + atom_getfloatarg(3, natom, nextmess), +- 15.); ++ 10. + fontsize); + else if (classname == gensym("inlet~")) + binbuf_addv(newb, "ssffff;", gensym("#P"), + gensym("inlet"), + atom_getfloatarg(2, natom, nextmess), + atom_getfloatarg(3, natom, nextmess), +- 15., 1.); ++ 10. + fontsize, 1.); + else if (classname == gensym("outlet")) + binbuf_addv(newb, "ssfff;", gensym("#P"), + gensym("outlet"), + atom_getfloatarg(2, natom, nextmess), + atom_getfloatarg(3, natom, nextmess), +- 15.); ++ 10. + fontsize); + else if (classname == gensym("outlet~")) + binbuf_addv(newb, "ssffff;", gensym("#P"), + gensym("outlet"), + atom_getfloatarg(2, natom, nextmess), + atom_getfloatarg(3, natom, nextmess), +- 15., 1.); ++ 10. + fontsize, 1.); + else if (classname == gensym("bng")) + binbuf_addv(newb, "ssffff;", gensym("#P"), + gensym("button"), +@@ -1261,10 +1272,14 @@ + SETSYMBOL(outmess + 1, gensym("newex")); + outmess[2] = nextmess[2]; + outmess[3] = nextmess[3]; +- SETFLOAT(outmess + 4, 50); +- SETFLOAT(outmess + 5, 1); ++ SETFLOAT(outmess + 4, 40.*(natom-4)); ++ SETFLOAT(outmess + 5, fontsize); + for (i = 4; i < natom; i++) + outmess[i+2] = nextmess[i]; ++ if (classname == gensym("hsl")) ++ SETSYMBOL(outmess + 6, gensym("hslider")); ++ if (classname == gensym("osc~")) ++ SETSYMBOL(outmess + 6, gensym("cycle~")); + SETSEMI(outmess + natom + 2); + binbuf_add(newb, natom + 3, outmess); + } +@@ -1279,8 +1294,8 @@ + (strcmp(second, "msg") ? "comment" : "message"))); + outmess[2] = nextmess[2]; + outmess[3] = nextmess[3]; +- SETFLOAT(outmess + 4, 50); +- SETFLOAT(outmess + 5, 1); ++ SETFLOAT(outmess + 4, 40.*(natom-4)); ++ SETFLOAT(outmess + 5, fontsize); + for (i = 4; i < natom; i++) + outmess[i+2] = nextmess[i]; + SETSEMI(outmess + natom + 2); |