This file is indexed.

/usr/share/doc/source-highlight/examples.html is in source-highlight 3.1.8-1.1.

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

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<!DOCTYPE doctype PUBLIC "-//w3c//dtd html 4.0 transitional//en">
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Lorenzo Bettini"><title>GNU Source-highlight Examples - GNU Project - Free Software Foundation (FSF)</title></head>
<body style="background-color: rgb(255, 255, 255);">
<h1><a class="mozTocH1" name="mozTocId593827"></a>
GNU Source-highlight Examples</h1>
<p>by <a href="http://www.lorenzobettini.it">Lorenzo
Bettini</a> 
<h2>Usage and examples</h2>
source-highlight only does a lexical analysis of the source code, so
the program source is assumed to be correct!<br>
<br>
Finally, there is texinfo documentation.&nbsp; It is also available
as
an html file, and it is also <a href="source-highlight.html">available
on-line</a>.<br>
<p>Here we only show some examples of generated files.<br>
</p>
<p>Here are some links to some of the C and C++ sources of
source-highlight colored with source-highlight itself: </p>
<blockquote><a href="source-highlight.cc.html">source-highlight.cc.html</a></blockquote>
generated with the following command
<blockquote>
<pre>source-highlight -s cpp -f html --doc source-highlight.cc</pre>
</blockquote>
And obviously it works with header file as well:
<blockquote><a href="cmdline.h.html">cmdline.h.html</a></blockquote>
created with the command:
<blockquote>
<pre>source-highlight -s cpp -f html *.h --css="mono.css"</pre>
</blockquote>
Here are some examples of Java files processed with source-highlight
(in most of them we have used the <a href="Hello.java" hello.java="">Hello.java</a> to make some test).
Here's how <a href="Hello1.html">Hello1.html</a>, <a href="Hello2.html">Hello2.html</a>, <a href="Hello3.html">Hello3.html</a>,
<a href="Hello4.html">Hello4.html</a>, <a href="Hello5.html">Hello5.html</a>,
<a href="Hello_h_f.html">Hello_h_f.html</a>, <a href="Hello_lines.html">Hello_lines.html</a>,
<a href="Hello_xhtml.html">Hello_xhtml.html</a>, <a href="Hello_xhtml2.html">Hello_xhtml2.html</a>, <a href="Hello_notfixed.html">Hello_notfixed.html</a>
were created:
<pre>source-highlight -s java -f html -i Hello.java -o Hello1.html<br>source-highlight -s java -f html --input Hello.java --output Hello2.html --doc<br>source-highlight -s java -f html -i Hello.java -o Hello3.html --title "Happy Java with java2html :-)" --tab 3<br>source-highlight -s java -f html &lt; Hello.java &gt; Hello4.html --title "and what about CSS :-)" --css "Hello.css"<br>source-highlight -s java -f html &lt; Hello.java &gt; Hello5.html --title "Wooo... this is quite dark ;-D" --css "mono-alt.css"<br>source-highlight -s java -f html --doc *.java<br>Processed Hello.java&nbsp;&nbsp; <i>(creates Hello.java.html)<br></i>source-highlight -s java -f html --doc -i Hello.java -o Hello_h_f.html --style-file="default.style" --header="header.html" --footer="footer.html"<br>source-highlight -s java -f html --line-number --doc -i Hello.java -o Hello_lines.html<br>source-highlight -s java -f xhtml --doc -i Hello.java -o Hello_xhtml.html --css xhtml.css<br>source-highlight -s java -f xhtml --doc -i Hello.java -o Hello_xhtml2.html --style-file default.style<br>source-highlight -s java --outlang-def=html_notfixed.outlang -i Hello.java -o Hello_notfixed.html --style-file default.style</pre>
Here's another example:
<blockquote><a href="Hello_h_f.html">Hello_h_f.html</a></blockquote>
Created with the command (notice that this one uses both CSS file and
headers and footers):
<blockquote>
<pre>source-highlight -s java -f html -i Hello.java -o Hello_h_f.html&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --css="cpp2html.css"<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --header="./header.html" --footer="./footer.html"</pre>
</blockquote>
Source-highlight can also generate HTML code to be
embedded (i.e., copied and pasted) inside a Javadoc comment (or another
kind of comment framework such as Doxygen). &nbsp;This way, when
you
run javadoc on such a file, the resulting generated html documentation
files will have the code snippets highlighted. &nbsp;For instance,
consider this piece of code, <a href="UsageExample.html">UsageExample.java</a>,
representing an example of usage of the class SimpleClass; we would
like to embed this code (formatted) into a javadoc comment of
SimpleClass, so we process it with the option <span style="font-family: monospace;">-f javadoc</span> and
we copy the result into the comment, as illustrated in <a href="SimpleClass.html">SimpleClass.java</a>. When we
process this file with javadoc, we obtain that code formatted in the
documentation html file: <a href="SimpleClass-doc.html">SimpleClass-doc.html</a>.
&nbsp;Doesn't it look nice :-)<br><br>

You
can also specify several line ranges, so that you produce an output
only with those specific lines of your input file; you can specify a
number of lines for the sorrounding context, and the separator of
ranges; for instance, this <a href="test_linerange_sep.html">output</a> was produced, starting from this <a href="test.java.html">input</a>, with the following command (note how the context is shown in gray, as specified in the style file):<br><blockquote>
<pre>source-highlight -s java -f html <br>            --line-range="12-18","29-34" --line-number --range-context=3 --range-separator="&lt;...&gt;" <br>            -i test.java -o test_linerange_sep.html</pre></blockquote>

<p>
Range of output can also be specified using regular expressions:
the beginning of the
range will be detected by a line containing (in any point) a string
matching the specified regular expression; the end will be detected by a
line containing a string matching the same regular expression that
started the range.  This feature is very useful when we want to document
some code (e.g., in this very manual) by showing only specific parts,
that are delimited in a ad-hoc way in the source code (e.g., with
specific comment patterns).
for instance, this <a href="test_regexrange4.html">output</a> was produced, starting from this <a href="test.java.html">input</a>, with the following command<br><blockquote>
<pre>
ssource-highlight -s java -f html 
            --regex-range="/\* [[:alpha:]]+ \*/" --line-number
            -i test.java -o test_regexrange4.html
</pre></blockquote>


<p>Here's the output of source-highlight applied to a Prolog program
(through the option `<tt>source-highlight -s prolog</tt>`: <a href="test.pl.html">test.pl.html</a>.&nbsp; This
one is an
highlighted Perl program (through the option `<tt>source-highlight
-s
prolog</tt>`): <a href="test.pm.html">test.pm.html</a>.&nbsp;
Here's
an
highlighted PHP3 program: <a href="test.php3.html">test.php3.html</a>.
And here's a Python program: <a href="test.py.html">test.py.html</a>.&nbsp;
This the flex scanner for flex files <a href="flex_scanner.ll.html">flex_scanner.ll.html</a>.
This is a Ruby
program: <a href="test.rb.html">test.rb.html</a>.
This is a Javascript
program <a href="test.js.html">test.js.html</a>.&nbsp;
This is a Lua
test program <a href="test.lua.html">test.lua.html</a>.&nbsp;
This is
a Caml test program <a href="test.ml.html">test.ml.html</a>
and this
is an Sml test program <a href="test.sml.html">test.sml.html</a>.&nbsp;
<br>
<br>
Here are some log files formatted using the color file <a href="syslog.style.html">syslog.style</a>: <br>
<ul>
<li><a href="test.log.html">test.log.html</a>,</li>
<li><a href="access.log.html">access.log.html</a>,</li>
<li><a href="auth.log.html">auth.log.html</a>,</li>
<li><a href="error.log.html">error.log.html</a>,</li>
<li><a href="syslog.log.html">syslog.log.html</a>.</li>
</ul>
<p>
This is the language definition file for C/C++: <a href="cpp.lang.html">cpp.lang.html</a>, the one for
the
log files above, <a href="log.lang.html">log.lang.html</a>,
and the language definition file for the language definition
syntax itself: <a href="langdef.lang.html">langdef.lang.html</a>.
</p>
<p>
Here's the html output of test.java.html formatted in html
itself: <a href="test.htm.html">test.htm.html</a>.<br>
<br>
and here's the output of test.java.tex formatted in
html: <a href="test.java.tex.html">test.java.tex.html</a>
</p>
<p>These HTML outputs contain cross references,
<a href="test_refs.h.html">test_refs.h.html</a>,
<a href="test_refs.cpp.html">test_refs.cpp.html</a>,
generated with the following command:
</p>
<blockquote>
<pre>source-highlight -s cpp -f html --title="Contains references to tags" <br> --gen-references=inline test_refs.h test_refs.cpp</pre>
</blockquote>
<h2><a class="mozTocH2" name="mozTocId323328"></a>Style
files</h2>
<p>Since version 2.6, source-highlight can use
CSS style files (limited support) as style files for
coloring and formatting the output. Here you can find the
output using all these files shipped with source-highlight
(these were adapted from those provided by <a href="http://shjs.sourceforge.net">SHJS</a>):</p>
<p><a href="style_examples.html">Style examples</a>
(huge file).
</body></html>