[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[mgp-users-jp 00948] [PATCH] mgp2html.pl.in (Debian Bug#150624, Bug#150630)
- To: mgp-users-jp@mew.org
- Subject: [mgp-users-jp 00948] [PATCH] mgp2html.pl.in (Debian Bug#150624, Bug#150630)
- From: Fumitoshi UKAI <ukai@debian.or.jp>
- Date: Sun, 23 Jun 2002 23:07:16 +0900
- Delivered-to: mailing list mgp-users-jp@mew.org
- Mailing-list: contact mgp-users-jp-help@mew.org; run by ezmlm
- Organization: Debian JP Project
- User-agent: Wanderlust/2.8.1 (Something) SEMI/1.14.3 (Ushinoya) FLIM/1.14.3 (Unebigoryōmae) APEL/10.3 Emacs/21.2 (i386-debian-linux-gnu) MULE/5.0 (SAKAKI)
contrib/mgp2html.pl.in に対するパッチです。
* \ による継続行の処理 (Bug#150624 http://bugs.debian.org/150624 )
* cont, imageあたりの処理 (Bug#150630 http://bugs.debian.org/150630 )
これでいいでしょうか?
--- ../../cvs/kit/contrib/mgp2html.pl.in Mon Aug 30 17:20:15 1999
+++ mgp2html.pl.in Sun Jun 23 23:04:50 2002
@@ -79,10 +79,17 @@
&prologue;
while (<>) {
- s/\n$//;
+ s/[\n\r]*$//; # trim CR and LF
$_ = '' if (/^#/o);
+ # multiline processing (lines ending with '\')
+ while ((/\\$/) && (not eof())) {
+ $_=substr($_,0,-1); # cuts last char (should be '\')
+ $_=$_.<>; # concatenate next line
+ s/[\n\r]*$//; # trim CR and LF
+ }
+
if ($_ eq '' || $_ =~ /^[^%]/) {
$line++;
$cont = 0 if ($cont == 2);
@@ -103,6 +110,8 @@
next;
}
+ $cont = 0 if ($cont == 2);
+ $cont = 2 if ($cont == 1);
&cmds($_);
}
&pageepilogue;
@@ -152,14 +161,15 @@
if (!$doimage) {
# don't use images
} elsif (scalar(@dir) == 2 || scalar(@dir) == 3) {
- print "<IMG SRC=\"$dir[1]\" ALT=\"$dir[1]\">\n";
+ &output("<IMG SRC=\"$dir[1]\" ALT=\"$dir[1]\">\n");
} elsif (scalar(@dir) == 4) {
# interpretation wrong
- print "<IMG SRC=\"$dir[1]\" WIDTH=$dir[3]% HEIGHT=$dir[3]% ALT=\"$dir[1]\">\n";
+ &output("<IMG SRC=\"$dir[1]\" WIDTH=$dir[3]% HEIGHT=$dir[3]% ALT=\"$dir[1]\">\n");
} elsif (scalar(@dir) >= 5) {
# interpretation wrong
- print "<IMG SRC=\"$dir[1]\" WIDTH=$dir[3]% HEIGHT=$dir[4]% ALT=\"$dir[1]\">\n";
+ &output("<IMG SRC=\"$dir[1]\" WIDTH=$dir[3]% HEIGHT=$dir[4]% ALT=\"$dir[1]\">\n");
}
+ $endline = "<BR>\n";
} elsif ($dir[0] eq 'nodefault') {
$nodefault++;
} elsif ($dir[0] =~ /^(left|leftfill|right|center)$/) {
--
鵜飼文敏