summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoragc <agc>2004-01-20 10:18:25 +0000
committeragc <agc>2004-01-20 10:18:25 +0000
commit041b2aec9da615a2e29919300dd35e2d0f852dab (patch)
treecc173108c9d731ad5783fc0f9558b67c47ed1b5b
parent4f6aa5bd2323818eb7349615af2cf4175751f6ba (diff)
downloadpkgsrc-041b2aec9da615a2e29919300dd35e2d0f852dab.tar.gz
Get rid of multi-line string constants for gcc3
-rw-r--r--graphics/plplot/distinfo3
-rw-r--r--graphics/plplot/patches/patch-ag213
2 files changed, 215 insertions, 1 deletions
diff --git a/graphics/plplot/distinfo b/graphics/plplot/distinfo
index b5e58bb379c..8a62f3b9530 100644
--- a/graphics/plplot/distinfo
+++ b/graphics/plplot/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.4 2003/07/10 08:55:04 jtb Exp $
+$NetBSD: distinfo,v 1.5 2004/01/20 10:18:25 agc Exp $
SHA1 (plplot-5.2.1.tar.gz) = e69c4e2a22409f23e0c9f40f7d5cac7dda5d4ec2
Size (plplot-5.2.1.tar.gz) = 4625477 bytes
@@ -8,3 +8,4 @@ SHA1 (patch-ac) = 718ed2e4e2f2e7de7b512b416f125ee77222f4dc
SHA1 (patch-ad) = 2b2ab27e59c0ab884e055edbfa778acecb3b9f41
SHA1 (patch-ae) = 19d970e496817ae909cbc1be241373e41aa1a3c9
SHA1 (patch-af) = 84c799efdabf5a1ba2e92f4089635c966a3e7006
+SHA1 (patch-ag) = e96031041a2b2058ea53dbe7e3a0d00ca1e10634
diff --git a/graphics/plplot/patches/patch-ag b/graphics/plplot/patches/patch-ag
new file mode 100644
index 00000000000..d9df44e4985
--- /dev/null
+++ b/graphics/plplot/patches/patch-ag
@@ -0,0 +1,213 @@
+$NetBSD: patch-ag,v 1.5 2004/01/20 10:18:25 agc Exp $
+
+--- drivers/ntk.c 2004/01/20 09:40:12 1.1
++++ drivers/ntk.c 2004/01/20 09:43:23
+@@ -105,18 +105,18 @@
+ tk_cmd(cmd);
+
+ /* add new canvas to option menu */
+- sprintf(cmd, "$plf.f1.mb.menu add command -label \"Page $ccanv\" -command {
+-set w $plf.f2.c%d;
+-$hs configure -command \"$w xview\";
+-$vs configure -command \"$w yview\";
+-set dname \"Page %d\";
+-pack forget $ocanvas;
+-set ocanvas $plf.f2.c%d;
+-pack $ocanvas -fill both -expand 1;
+-scan [$w xview] \"%%f %%f\" i j;
+-$hs set $i $j;
+-scan [$w yview] \"%%f %%f\" i j;
+-$vs set $i $j;}",
++ sprintf(cmd, "$plf.f1.mb.menu add command -label \"Page $ccanv\" -command {\n"
++"set w $plf.f2.c%d;\n"
++"$hs configure -command \"$w xview\";\n"
++"$vs configure -command \"$w yview\";\n"
++"set dname \"Page %d\";\n"
++"pack forget $ocanvas;\n"
++"set ocanvas $plf.f2.c%d;\n"
++"pack $ocanvas -fill both -expand 1;\n"
++"scan [$w xview] \"%%f %%f\" i j;\n"
++"$hs set $i $j;\n"
++"scan [$w yview] \"%%f %%f\" i j;\n"
++"$vs set $i $j;}",
+ ccanv, ccanv, ccanv);
+ tk_cmd(cmd);
+
+@@ -126,47 +126,47 @@
+ /* Shif-B1, zooms in */
+ /* FIXME inform the core lib of the zoom, see plframe.c around line 2818 */
+
+- sprintf(cmd, "bind $plf.f2.c$ccanv <Shift-Button-1> {
+-set cc %d;
+-incr item($cc); set tt $item($cc);
+-if {$tt == 1} {
+-incr scroll_use;
+-pack $hs -side bottom -fill x;
+-pack $vs -side right -fill y;
+-pack forget %%W; pack %%W -fill both -expand 1}
+-set zx($cc,$tt) %%x;
+-set zy($cc,$tt) %%y;
+-%%W scale all %%x %%y 1.6 1.6;
+-%%W configure -scrollregion [%%W bbox all];
+-}", ccanv);
++ sprintf(cmd, "bind $plf.f2.c$ccanv <Shift-Button-1> {\n"
++"set cc %d;\n"
++"incr item($cc); set tt $item($cc);\n"
++"if {$tt == 1} {\n"
++"incr scroll_use;\n"
++"pack $hs -side bottom -fill x;\n"
++"pack $vs -side right -fill y;\n"
++"pack forget %%W; pack %%W -fill both -expand 1}\n"
++"set zx($cc,$tt) %%x;\n"
++"set zy($cc,$tt) %%y;\n"
++"%%W scale all %%x %%y 1.6 1.6;\n"
++"%%W configure -scrollregion [%%W bbox all];\n"
++"}", ccanv);
+
+ tk_cmd(cmd);
+
+ /* Shif-B3, zooms out */
+- sprintf(cmd,"bind $plf.f2.c$ccanv <Shift-Button-3> {
+-set cc %d; set tt $item($cc);
+-if {$tt != 0} {
+-%%W scale all $zx($cc,$tt) $zy($cc,$tt) 0.625 0.625
+-%%W configure -scrollregion [%%W bbox all];
+-set item($cc) [expr $tt - 1]}
+-if { $item($cc) == 0} {
+-set scroll_use [expr $scroll_use - 1];
+-if {$scroll_use == 0} {
+-pack forget $plf.f2.hscroll $plf.f2.vscroll}
+-%%W configure -scrollregion \"0 0 $xmax $ymax\"}}", ccanv);
++ sprintf(cmd,"bind $plf.f2.c$ccanv <Shift-Button-3> {\n"
++"set cc %d; set tt $item($cc);\n"
++"if {$tt != 0} {\n"
++"%%W scale all $zx($cc,$tt) $zy($cc,$tt) 0.625 0.625\n"
++"%%W configure -scrollregion [%%W bbox all];\n"
++"set item($cc) [expr $tt - 1]}\n"
++"if { $item($cc) == 0} {\n"
++"set scroll_use [expr $scroll_use - 1];\n"
++"if {$scroll_use == 0} {\n"
++"pack forget $plf.f2.hscroll $plf.f2.vscroll}\n"
++"%%W configure -scrollregion \"0 0 $xmax $ymax\"}}", ccanv);
+ tk_cmd(cmd);
+
+ /* Shift-B2, resets */
+- sprintf(cmd,"bind $plf.f2.c$ccanv <Shift-Button-2> {
+-set cc %d; set tt $item($cc);
+-while {$tt != 0} {
+-%%W scale all $zx($cc,$tt) $zy($cc,$tt) 0.625 0.625
+-set tt [expr $tt - 1]};
+-set item($cc) 0;
+-%%W configure -scrollregion \"0 0 $xmax $ymax\";
+-set scroll_use [expr $scroll_use - 1];
+-if {$scroll_use == 0} {
+-pack forget $plf.f2.hscroll $plf.f2.vscroll}}", ccanv);
++ sprintf(cmd,"bind $plf.f2.c$ccanv <Shift-Button-2> {\n"
++"set cc %d; set tt $item($cc); \n"
++"while {$tt != 0} {\n"
++"%%W scale all $zx($cc,$tt) $zy($cc,$tt) 0.625 0.625\n"
++"set tt [expr $tt - 1]};\n"
++"set item($cc) 0;\n"
++"%%W configure -scrollregion \"0 0 $xmax $ymax\";\n"
++"set scroll_use [expr $scroll_use - 1];\n"
++"if {$scroll_use == 0} {\n"
++"pack forget $plf.f2.hscroll $plf.f2.vscroll}}", ccanv);
+ tk_cmd(cmd);
+
+ /* Control-B1-Motion, pan */
+@@ -177,12 +177,12 @@
+ tk_cmd(cmd);
+
+ /* Control-B2, identify and (in the far future) edit object */
+- tk_cmd("bind $plf.f2.c$ccanv <Control-Button-2> {
+-set xx [ expr [winfo pointerx .] - [winfo rootx %W]];
+-set yy [ expr [winfo pointery .] - [winfo rooty %W]];
+-set near [%W find closest $xx $yy];
+-%W move $near 20 20;
+-after 500 \"%W move $near -20 -20\"}");
++ tk_cmd("bind $plf.f2.c$ccanv <Control-Button-2> {\n"
++"set xx [ expr [winfo pointerx .] - [winfo rootx %W]];\n"
++"set yy [ expr [winfo pointery .] - [winfo rooty %W]];\n"
++"set near [%W find closest $xx $yy];\n"
++"%W move $near 20 20;\n"
++"after 500 \"%W move $near -20 -20\"}");
+
+ /* change view to the new canvas by invoking the menu buttom */
+ sprintf(cmd, "$plf.f1.mb.menu invoke %d", ccanv-1);
+@@ -247,27 +247,27 @@
+
+ tk_cmd("catch \"frame $plf\"; pack $plf -fill both -expand 1");
+
+- sprintf(cmd, "frame $plf.f1;
+-frame $plf.f2 -width %d -height %d;
+-pack $plf.f1 -fill x;
+-pack $plf.f2 -fill both -expand 1", xmax, ymax);
++ sprintf(cmd, "frame $plf.f1;\n"
++"frame $plf.f2 -width %d -height %d;\n"
++"pack $plf.f1 -fill x;\n"
++"pack $plf.f2 -fill both -expand 1", xmax, ymax);
+ tk_cmd(cmd);
+
+- tk_cmd("scrollbar $plf.f2.hscroll -orient horiz;
+-scrollbar $plf.f2.vscroll");
++ tk_cmd("scrollbar $plf.f2.hscroll -orient horiz;\n"
++"scrollbar $plf.f2.vscroll");
+
+- tk_cmd("menubutton $plf.f1.mb -text \"Page 1\" -textvariable dname -relief raised -indicatoron 1 -menu $plf.f1.mb.menu;
+-menu $plf.f1.mb.menu -tearoff 0;
+-pack $plf.f1.mb -side left");
++ tk_cmd("menubutton $plf.f1.mb -text \"Page 1\" -textvariable dname -relief raised -indicatoron 1 -menu $plf.f1.mb.menu;\n"
++"menu $plf.f1.mb.menu -tearoff 0;\n"
++"pack $plf.f1.mb -side left");
+
+ if (local)
+- tk_cmd("button $plf.f1.quit -text Quit -command exit;
+-pack $plf.f1.quit -side right");
++ tk_cmd("button $plf.f1.quit -text Quit -command exit;\n"
++"pack $plf.f1.quit -side right");
+ else
+- tk_cmd("button $plf.f1.quit -text Quit -command {send -async $client exit;
+-destroy $plf;
+-wm withdraw .};
+-pack $plf.f1.quit -side right");
++ tk_cmd("button $plf.f1.quit -text Quit -command {send -async $client exit;\n"
++"destroy $plf;\n"
++"wm withdraw .};\n"
++"pack $plf.f1.quit -side right");
+
+ /* FIXME: I just discovered that Tcl_Eval is slower than Tcl_EvalObj. Fix it global-wide, `man Tcl_Eval' */
+
+@@ -403,11 +403,11 @@
+ tk_cmd("set ocursor [lindex [$plf.f2.c$ccanv configure -cursor] 4]");
+ }
+
+- tk_cmd("$plf.f2.c$ccanv configure -cursor cross;
+-bind $plf.f2.c$ccanv <Button> {set xloc %x; set yloc %y; set bloc %b; set sloc %s};
+-bind $plf.f2.c$ccanv <B1-Motion> {set xloc %x; set yloc %y; set bloc %b; set sloc %s};
+-bind $plf.f2.c$ccanv <B2-Motion> {set xloc %x; set yloc %y; set bloc %b; set sloc %s};
+-bind $plf.f2.c$ccanv <B3-Motion> {set xloc %x; set yloc %y; set bloc %b; set sloc %s};");
++ tk_cmd("$plf.f2.c$ccanv configure -cursor cross;\n"
++"bind $plf.f2.c$ccanv <Button> {set xloc %x; set yloc %y; set bloc %b; set sloc %s};\n"
++"bind $plf.f2.c$ccanv <B1-Motion> {set xloc %x; set yloc %y; set bloc %b; set sloc %s};\n"
++"bind $plf.f2.c$ccanv <B2-Motion> {set xloc %x; set yloc %y; set bloc %b; set sloc %s};\n"
++"bind $plf.f2.c$ccanv <B3-Motion> {set xloc %x; set yloc %y; set bloc %b; set sloc %s};");
+
+ while (st != 1) {
+ tk_cmd("update");
+@@ -426,11 +426,11 @@
+ gin.dX = (PLFLT) gin.pX/xmax;
+ gin.dY = 1. - (PLFLT) gin.pY/ymax;
+
+- tk_cmd("bind $plf.f2.c$ccanv <ButtonPress> {};
+-bind $plf.f2.c$ccanv <ButtonMotion> {};
+-bind $plf.f2.c$ccanv <B2-Motion> {};
+-bind $plf.f2.c$ccanv <B3-Motion> {};
+-unset xloc");
++ tk_cmd("bind $plf.f2.c$ccanv <ButtonPress> {};\n"
++"bind $plf.f2.c$ccanv <ButtonMotion> {};\n"
++"bind $plf.f2.c$ccanv <B2-Motion> {};\n"
++"bind $plf.f2.c$ccanv <B3-Motion> {};\n"
++"unset xloc");
+
+ /* seg fault, see above. tk_cmd("$plf.f2.c$ccanv configure -cursor $ocursor"); */
+ tk_cmd("$plf.f2.c$ccanv configure -cursor {}");