This file is indexed.

/usr/share/mozart/doc/op/node9.html is in mozart-doc 1.4.0-8ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

1
2
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>4.1 Expanding TAB Characters Revisited</TITLE><LINK href="ozdoc.css" rel="stylesheet" type="text/css"></HEAD><BODY><TABLE align="center" border="0" cellpadding="6" cellspacing="6" class="nav"><TR bgcolor="#DDDDDD"><TD><A href="node8.html">- Up -</A></TD></TR></TABLE><DIV id="section.text.expand"><H2><A name="section.text.expand">4.1 Expanding TAB Characters Revisited</A></H2><P>In <A href="node9.html#prog-opprog-expandi">Program&nbsp;4.1</A> the revised formulation of the <CODE>Expand</CODE> procedure is shown. As before the file objects are created, but now both files inherit from <CODE>Open<SPAN class="keyword">.</SPAN>text</CODE> as well. This class provides methods for buffered input and output.</P><P><A name="label71"></A> </P><DIV class="program" id="prog-opprog-expandi"><HR><P><A name="prog-opprog-expandi"></A></P></DIV><DL class="anonymous"><DD class="code"><CODE><SPAN class="keyword">local</SPAN>&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;<SPAN class="keyword">fun</SPAN><SPAN class="variablename">&nbsp;</SPAN>{<SPAN class="functionname">Insert</SPAN>&nbsp;N&nbsp;Is}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<SPAN class="keyword">if</SPAN>&nbsp;N<SPAN class="keyword">&gt;</SPAN>0&nbsp;<SPAN class="keyword">then</SPAN>&nbsp;{Insert&nbsp;N<SPAN class="keyword">-</SPAN>1&nbsp;<SPAN class="string">&amp;&nbsp;</SPAN><SPAN class="keyword">|</SPAN>Is}&nbsp;<SPAN class="keyword">else</SPAN>&nbsp;Is&nbsp;<SPAN class="keyword">end</SPAN>&nbsp;<BR>&nbsp;&nbsp;&nbsp;<SPAN class="keyword">end</SPAN>&nbsp;<BR>&nbsp;&nbsp;&nbsp;<SPAN class="keyword">fun</SPAN><SPAN class="variablename">&nbsp;</SPAN>{<SPAN class="functionname">ScanLine</SPAN>&nbsp;Is&nbsp;Tab&nbsp;N}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<SPAN class="keyword">case</SPAN>&nbsp;Is&nbsp;<SPAN class="keyword">of</SPAN>&nbsp;nil&nbsp;<SPAN class="keyword">then</SPAN>&nbsp;nil<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<SPAN class="keyword">[]</SPAN>&nbsp;I<SPAN class="keyword">|</SPAN>Ir&nbsp;<SPAN class="keyword">then</SPAN>&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<SPAN class="keyword">case</SPAN>&nbsp;I&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<SPAN class="keyword">of</SPAN>&nbsp;<SPAN class="string">&amp;\t</SPAN>&nbsp;<SPAN class="keyword">then</SPAN>&nbsp;M=Tab<SPAN class="keyword">-</SPAN>(N&nbsp;<SPAN class="keyword">mod</SPAN>&nbsp;Tab)&nbsp;<SPAN class="keyword">in</SPAN>&nbsp;{Insert&nbsp;M&nbsp;{ScanLine&nbsp;Ir&nbsp;Tab&nbsp;M<SPAN class="keyword">+</SPAN>N}}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<SPAN class="keyword">[]</SPAN>&nbsp;<SPAN class="string">&amp;\b</SPAN>&nbsp;<SPAN class="keyword">then</SPAN>&nbsp;I<SPAN class="keyword">|</SPAN>{ScanLine&nbsp;Ir&nbsp;Tab&nbsp;{Max&nbsp;0&nbsp;N<SPAN class="keyword">-</SPAN>1}}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<SPAN class="keyword">else</SPAN>&nbsp;I<SPAN class="keyword">|</SPAN>{ScanLine&nbsp;Ir&nbsp;Tab&nbsp;N<SPAN class="keyword">+</SPAN>1}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<SPAN class="keyword">end</SPAN>&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<SPAN class="keyword">end</SPAN>&nbsp;<BR>&nbsp;&nbsp;&nbsp;<SPAN class="keyword">end</SPAN>&nbsp;<BR>&nbsp;&nbsp;&nbsp;<SPAN class="keyword">proc</SPAN><SPAN class="variablename">&nbsp;</SPAN>{<SPAN class="functionname">Scan</SPAN>&nbsp;Tab&nbsp;IF&nbsp;OF}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Is={IF&nbsp;getS($)}&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;<SPAN class="keyword">in</SPAN>&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<SPAN class="keyword">if</SPAN>&nbsp;Is<SPAN class="keyword">==false</SPAN>&nbsp;<SPAN class="keyword">then</SPAN>&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{IF&nbsp;close}&nbsp;{OF&nbsp;close}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<SPAN class="keyword">else</SPAN>&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{OF&nbsp;putS({ScanLine&nbsp;Is&nbsp;Tab&nbsp;0})}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{Scan&nbsp;Tab&nbsp;IF&nbsp;OF}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<SPAN class="keyword">end</SPAN>&nbsp;<BR>&nbsp;&nbsp;&nbsp;<SPAN class="keyword">end</SPAN>&nbsp;<BR>&nbsp;&nbsp;&nbsp;<SPAN class="keyword">class</SPAN>&nbsp;<SPAN class="type">TextFile</SPAN>&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<SPAN class="keyword">from</SPAN><SPAN class="type">&nbsp;Open.file&nbsp;Open.text</SPAN>&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;<SPAN class="keyword">end</SPAN>&nbsp;<BR><SPAN class="keyword">in</SPAN>&nbsp;<BR>&nbsp;&nbsp;&nbsp;<SPAN class="keyword">proc</SPAN><SPAN class="variablename">&nbsp;</SPAN>{<SPAN class="functionname">Expand</SPAN>&nbsp;Tab&nbsp;IN&nbsp;ON}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{Scan&nbsp;Tab&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{New&nbsp;TextFile&nbsp;init(name:IN)}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{New&nbsp;TextFile&nbsp;init(name:&nbsp;&nbsp;ON&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;flags:&nbsp;[write&nbsp;create&nbsp;truncate])}}<BR>&nbsp;&nbsp;&nbsp;<SPAN class="keyword">end</SPAN>&nbsp;<BR><SPAN class="keyword">end</SPAN></CODE></DD></DL><DIV class="program"><P class="caption"><STRONG>Program&nbsp;4.1:</STRONG> The Incremental <CODE>Expand</CODE> Procedure</P><HR></DIV><P> The procedure <CODE>Scan</CODE> applies the input file object <CODE>IF</CODE> to the message <CODE>getS($)</CODE>. It yields either <CODE><SPAN class="keyword">false</SPAN></CODE>, in case the end of the file is reached, or a string. This string contains exactly one line of the input file (without a newline character).</P><P>The expansion of TAB characters is done in the function <CODE>ScanLine</CODE> as before. The expanded lines are written with the <CODE>putS</CODE> method.</P></DIV><TABLE align="center" border="0" cellpadding="6" cellspacing="6" class="nav"><TR bgcolor="#DDDDDD"><TD><A href="node8.html">- Up -</A></TD></TR></TABLE><HR><ADDRESS><A href="http://www.ps.uni-sb.de/~schulte/">Christian&nbsp;Schulte</A><BR><SPAN class="version">Version 1.4.0 (20110908185330)</SPAN></ADDRESS></BODY></HTML>