/[pcre]/code/trunk/132html
ViewVC logotype

Diff of /code/trunk/132html

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 98 by ph10, Mon Mar 5 12:36:47 2007 UTC revision 99 by ph10, Tue Mar 6 12:27:42 2007 UTC
# Line 40  $inpara = 1; Line 40  $inpara = 1;
40    
41  # Main program  # Main program
42    
43    $innf = 0;
44  $inpara = 0;  $inpara = 0;
45  $inpre = 0;  $inpre = 0;
46  $wrotetext = 0;  $wrotetext = 0;
# Line 81  while () Line 82  while ()
82    
83    if (/^\./)    if (/^\./)
84      {      {
85      if (/^\.br/)      # Some of the PCRE man pages used to contain instances of .br. However,
86        # they should have all been removed because they cause trouble in some
87        # (other) automated systems that translate man pages to HTML. Complain if
88        # we find .br or .in (another macro that is deprecated).
89    
90        if (/^\.br/ || /^\.in/)
91        {        {
92        print TEMP "<br>\n" if $wrotetext;        print STDERR "\n*** Deprecated macro encountered - rewrite needed\n";
93          print STDERR "*** $_\n";
94          die "*** Processing abandoned\n";
95        }        }
96    
97        # Instead of .br, relevent "literal" sections are enclosed in .nf/.fi.
98    
99        elsif (/^\.nf/)
100          {
101          $innf = 1;
102          }
103    
104        elsif (/^\.fi/)
105          {
106          $innf = 0;
107          }
108    
109      # Handling .sp is subtle. If it is inside a literal section, do nothing if      # Handling .sp is subtle. If it is inside a literal section, do nothing if
110      # the next line is a non literal text line; similarly, if not inside a      # the next line is a non literal text line; similarly, if not inside a
111      # literal section, do nothing if a literal follows. The point being that      # literal section, do nothing if a literal follows. The point being that
# Line 244  while () Line 264  while ()
264      print TEMP "</pre>\n";      print TEMP "</pre>\n";
265      $inpre = 0;      $inpre = 0;
266      }      }
267    
268      # Add <br> to the end of a non-literal line if we are within .nf/.fi
269    
270      $_ .= "<br>\n" if (!$inpre && $innf);
271    
272    print TEMP;    print TEMP;
273    $wrotetext = 1;    $wrotetext = 1;

Legend:
Removed from v.98  
changed lines
  Added in v.99

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12