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

Re: BUG REPORT: Website META Language 1.7.2 (28-06-1999)



  Hi,
I'll write detail about my own bug report.

  I am trying WML. I found it very useful.
It'll help me a lot. Thank you very much.

  Then, I found a little trouble.
Macro __FILE__ does not work as described in manual wml_p1_ipp(1).
It is replaced by empty string.
It works well ONLY at the first line of the file.

  I made patch for ipp. But It is not perfect.
1. I didn't care about directory.
2. By wml command, the first level file appears as a temporary file.
   ( By ipp command it works well. )
Could you help me?

---------

  I have an idea about macor __????__.
Would you mind changing these macros into tag-format?

  If __FILE__ is a macro, it is difficult to write __FILE__ in html.
Tag <protect> is powerless for it.
This is the way I thought of. There may be other better ways.

  <define-tag FI>__FI</define-tag>
  <define-tag LE>LE__</define-tag>
  <FI><LE>

  If <__FILE__> is a macro, it is easy to write <__FILE__> in html.
Just &lt;__FILE__&gt;.

  I think <__FILE__> is better.

Best regards,
--  Nobuyuki Tsuchimura


----------- begin "ipp.patch" ---------
--- /usr/local/lib/wml/exec/wml_p1_ipp	Mon Aug 30 18:07:48 1999
+++ wml_p1_ipp	Mon Sep  6 04:35:49 1999
@@ -202,7 +202,7 @@
 }
 
 sub ProcessFile {
-    my ($mode, $delimiter, $file, $level, $noid, %arg) = @_;
+    my ($mode, $delimiter, $file, $filename, $level, $noid, %arg) = @_;
     my ($in, $found, $line, $type, %argO, $out, $store);
 
     #
@@ -279,7 +279,7 @@
         $l =~ s/((?!\\).|^)\$\(([a-zA-Z0-9_]+)\)/$1.$arg{$2}/ge;
         #   Implicit Variables
         $l =~ s|__LINE__|$line|g;
-        $l =~ s|__FILE__|$file|g;
+        $l =~ s|__FILE__|$filename|g;
         #   remove one preceding backslash
         $l =~ s/\\(\$\([a-zA-Z0-9_]+.*?\))/$1/g;
 
@@ -310,7 +310,7 @@
             }
 
             #   now recurse down
-            $out .= &ProcessFile($cmd, $type, $file, $level+1, 0, %arg);
+            $out .= &ProcessFile($cmd, $type, $file, $file, $level+1, 0, %arg);
 
             #   reset arguments
             %arg = %argO;
@@ -396,7 +396,7 @@
     }
 }
 $tmp->close();
-$outbuf .= &ProcessFile('include', "'", $tmpfile, 0, 1, %arg);
+$outbuf .= &ProcessFile('include', "'", $tmpfile, "", 0, 1, %arg);
 unlink($tmpfile);
 
 #
@@ -433,7 +433,7 @@
     }
 
     #   process file via IPP filter
-    $outbuf .= &ProcessFile('include', "'", $tmpfile, 0, 1, %arg);
+    $outbuf .= &ProcessFile('include', "'", $tmpfile, $file, 0, 1, %arg);
 
     #   cleanup
     unlink($tmpfile);
----------- end "ipp.patch" ---------
______________________________________________________________________
Website META Language (WML)                www.engelschall.com/sw/wml/
Official Support Mailing List                   sw-wml@engelschall.com
Automated List Manager                       majordomo@engelschall.com