[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[mgp-users-jp 00949] [PATCH] mgpembed: %newimage (Debian Bug#149670)



newimageをつかってる mgp を mgpembed で処理できません。
Bug#149670 http://bugs.debian.org/146970


%include "/etc/mgp/default.mgp"
%page

Foo

%center, newimage -xscrzoom 95 "/usr/share/doc/mgp/examples/dad.eps"

$ LANG=C mgpembed bug2.mgp > a
/bin/cat: invalid option -- x
Try `/bin/cat --help' for more information.
/usr/bin/uuencode: invalid option -- x
Try `/usr/bin/uuencode --help' for more information.

このパッチで大丈夫でしょうか?

--- ../cvs/kit/mgpembed.pl.in	Tue Jan  5 12:44:00 1999
+++ mgpembed.pl.in	Sun Jun 23 23:27:36 2002
@@ -85,8 +85,17 @@
 			print OUT;
 			next;
 		}
-		if (/^%(.*)image\s+([^,\s]+)/i) {
+		if (/^%(.*)image\s+([^,]+)/i) {
 			$a = $1; $fname0 = $fname = $2; $b = $';
+			if ($a =~ /new$/) {
+			    if ($fname =~ /\"([^"]*)\"$/) {
+				$fname = $1;
+			    }
+			} else {
+			    if ($fname =~ /\s.*/) {
+				$b = $' . $b;
+			    }
+			}
 			if ($fname =~ /^\"([^"]*)\"/) {
 				$fname = $1;
 			} elsif ($fname =~ /^(\S+)/) {

-- 
鵜飼文敏