xref: /OpenGrok/opengrok-indexer/src/test/resources/analysis/sh/sample_xref.html (revision a5cf78b26bffba8c7ce25bd8bdd1fa80d4983e1b)
1<!DOCTYPE html>
2<html lang="en">
3<head>
4<meta charset="UTF-8">
5<title>sampleFile - OpenGrok cross reference for /sampleFile</title></head><body>
6<script type="text/javascript">/* <![CDATA[ */
7function get_sym_list(){return [["Function","xf",[["fail",51],["info",68],["timeinfo",77],["warn",60]]]];} /* ]]> */</script><a class="l" name="1" href="#1">1</a><span class="c">#! /<a href="/source/s?path=/bin/">bin</a>/<a href="/source/s?path=/bin/ksh">ksh</a> -p</span>
8<a class="l" name="2" href="#2">2</a><span class="c">#</span>
9<a class="l" name="3" href="#3">3</a><span class="c"># CDDL HEADER START</span>
10<a class="l" name="4" href="#4">4</a><span class="c">#</span>
11<a class="l" name="5" href="#5">5</a><span class="c"># The contents of this file are subject to the terms of the</span>
12<a class="l" name="6" href="#6">6</a><span class="c"># Common Development and Distribution License (the &quot;License&quot;).</span>
13<a class="l" name="7" href="#7">7</a><span class="c"># You may not use this file except in compliance with the License.</span>
14<a class="l" name="8" href="#8">8</a><span class="c">#</span>
15<a class="l" name="9" href="#9">9</a><span class="c"># You can obtain a copy of the license at <a href="/source/s?path=usr/">usr</a>/<a href="/source/s?path=usr/src/">src</a>/<a href="/source/s?path=usr/src/OPENSOLARIS.LICENSE">OPENSOLARIS.LICENSE</a></span>
16<a class="hl" name="10" href="#10">10</a><span class="c"># or <a href="http://www.opensolaris.org/os/licensing">http://www.opensolaris.org/os/licensing</a>.</span>
17<a class="l" name="11" href="#11">11</a><span class="c"># See the License for the specific language governing permissions</span>
18<a class="l" name="12" href="#12">12</a><span class="c"># and limitations under the License.</span>
19<a class="l" name="13" href="#13">13</a><span class="c">#</span>
20<a class="l" name="14" href="#14">14</a><span class="c"># When distributing Covered Code, include this CDDL HEADER in each</span>
21<a class="l" name="15" href="#15">15</a><span class="c"># file and include the License file at <a href="/source/s?path=usr/">usr</a>/<a href="/source/s?path=usr/src/">src</a>/<a href="/source/s?path=usr/src/OPENSOLARIS.LICENSE">OPENSOLARIS.LICENSE</a>.</span>
22<a class="l" name="16" href="#16">16</a><span class="c"># If applicable, add the following below this CDDL HEADER, with the</span>
23<a class="l" name="17" href="#17">17</a><span class="c"># fields enclosed by brackets &quot;[]&quot; replaced with your own identifying</span>
24<a class="l" name="18" href="#18">18</a><span class="c"># information: Portions Copyright [yyyy] [name of copyright owner]</span>
25<a class="l" name="19" href="#19">19</a><span class="c">#</span>
26<a class="hl" name="20" href="#20">20</a><span class="c"># CDDL HEADER END</span>
27<a class="l" name="21" href="#21">21</a><span class="c">#</span>
28<a class="l" name="22" href="#22">22</a><span class="c">#</span>
29<a class="l" name="23" href="#23">23</a><span class="c"># Copyright 2009 Sun Microsystems, Inc.  All rights reserved.</span>
30<a class="l" name="24" href="#24">24</a><span class="c"># Use is subject to license terms.</span>
31<a class="l" name="25" href="#25">25</a><span class="c">#</span>
32<a class="l" name="26" href="#26">26</a><span class="c"># xref: build and maintain source cross-reference databases.</span>
33<a class="l" name="27" href="#27">27</a><span class="c">#</span>
34<a class="l" name="28" href="#28">28</a>
35<a class="l" name="29" href="#29">29</a><a href="/source/s?defs=ONBLDDIR" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ONBLDDIR</a>=$(<a href="/source/s?defs=dirname" class="intelliWindow-symbol" data-definition-place="undefined-in-file">dirname</a> $(<b>whence</b> $<span class="n">0</span>))
36<a class="hl" name="30" href="#30">30</a>
37<a class="l" name="31" href="#31">31</a><a href="/source/s?defs=PROG" class="intelliWindow-symbol" data-definition-place="undefined-in-file">PROG</a>=`<a href="/source/s?defs=basename" class="intelliWindow-symbol" data-definition-place="undefined-in-file">basename</a> $<span class="n">0</span>`
38<a class="l" name="32" href="#32">32</a><a href="/source/s?defs=XREFMK" class="intelliWindow-symbol" data-definition-place="undefined-in-file">XREFMK</a>=`<a href="/source/s?defs=dirname" class="intelliWindow-symbol" data-definition-place="undefined-in-file">dirname</a> $<span class="n">0</span>`/<a href="/source/s?path=xref.mk">xref.mk</a>
39<a class="l" name="33" href="#33">33</a><a href="/source/s?defs=XRMAKEFILE" class="intelliWindow-symbol" data-definition-place="undefined-in-file">XRMAKEFILE</a>=<a href="/source/s?defs=Makefile" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Makefile</a> <b>export</b> <a href="/source/s?defs=XRMAKEFILE" class="intelliWindow-symbol" data-definition-place="undefined-in-file">XRMAKEFILE</a>
40<a class="l" name="34" href="#34">34</a><a href="/source/s?defs=MAKE" class="intelliWindow-symbol" data-definition-place="undefined-in-file">MAKE</a>=<span class="s">&quot;dmake -m serial&quot;</span>
41<a class="l" name="35" href="#35">35</a>
42<a class="l" name="36" href="#36">36</a><span class="c">#</span>
43<a class="l" name="37" href="#37">37</a><span class="c"># The CSCOPEOPTIONS variable can cause problems if it&apos;s set in the environment</span>
44<a class="l" name="38" href="#38">38</a><span class="c"># when using cscope; remove it.</span>
45<a class="l" name="39" href="#39">39</a><span class="c">#</span>
46<a class="hl" name="40" href="#40">40</a><b>unset</b> <a href="/source/s?defs=CSCOPEOPTIONS" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CSCOPEOPTIONS</a>
47<a class="l" name="41" href="#41">41</a>
48<a class="l" name="42" href="#42">42</a><span class="c">#</span>
49<a class="l" name="43" href="#43">43</a><span class="c"># The CDPATH variable causes ksh&apos;s `cd&apos; builtin to emit messages to stdout</span>
50<a class="l" name="44" href="#44">44</a><span class="c"># under certain circumstances, which can really screw things up; unset it.</span>
51<a class="l" name="45" href="#45">45</a><span class="c">#</span>
52<a class="l" name="46" href="#46">46</a><b>unset</b> <a href="/source/s?defs=CDPATH" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CDPATH</a>
53<a class="l" name="47" href="#47">47</a>
54<a class="l" name="48" href="#48">48</a><span class="c">#</span>
55<a class="l" name="49" href="#49">49</a><span class="c"># Print the provided failure message and exit with an error.</span>
56<a class="hl" name="50" href="#50">50</a><span class="c">#</span>
57<a class="l" name="51" href="#51">51</a><a class="xf" name="fail"/><a href="/source/s?refs=fail" class="xf intelliWindow-symbol" data-definition-place="def">fail</a>()
58<a class="l" name="52" href="#52">52</a>{
59<a class="l" name="53" href="#53">53</a>        <b>echo</b> <a href="/source/s?defs=%24PROG" class="intelliWindow-symbol" data-definition-place="undefined-in-file">$PROG</a>: $@ &gt; /<a href="/source/s?path=/dev/">dev</a>/<a href="/source/s?path=/dev/stderr">stderr</a>
60<a class="l" name="54" href="#54">54</a>        <b>exit</b> <span class="n">1</span>
61<a class="l" name="55" href="#55">55</a>}
62<a class="l" name="56" href="#56">56</a>
63<a class="l" name="57" href="#57">57</a><span class="c">#</span>
64<a class="l" name="58" href="#58">58</a><span class="c"># Print the provided warning message.</span>
65<a class="l" name="59" href="#59">59</a><span class="c">#</span>
66<a class="hl" name="60" href="#60">60</a><a class="xf" name="warn"/><a href="/source/s?refs=warn" class="xf intelliWindow-symbol" data-definition-place="def">warn</a>()
67<a class="l" name="61" href="#61">61</a>{
68<a class="l" name="62" href="#62">62</a>        <b>echo</b> <a href="/source/s?defs=%24PROG" class="intelliWindow-symbol" data-definition-place="undefined-in-file">$PROG</a>: <a href="/source/s?defs=warning" class="intelliWindow-symbol" data-definition-place="undefined-in-file">warning</a>: $@ &gt; /<a href="/source/s?path=/dev/">dev</a>/<a href="/source/s?path=/dev/stderr">stderr</a>
69<a class="l" name="63" href="#63">63</a>}
70<a class="l" name="64" href="#64">64</a>
71<a class="l" name="65" href="#65">65</a><span class="c">#</span>
72<a class="l" name="66" href="#66">66</a><span class="c"># Print the provided informational message.</span>
73<a class="l" name="67" href="#67">67</a><span class="c">#</span>
74<a class="l" name="68" href="#68">68</a><a class="xf" name="info"/><a href="/source/s?refs=info" class="xf intelliWindow-symbol" data-definition-place="def">info</a>()
75<a class="l" name="69" href="#69">69</a>{
76<a class="hl" name="70" href="#70">70</a>        <b>echo</b> <a href="/source/s?defs=%24PROG" class="intelliWindow-symbol" data-definition-place="undefined-in-file">$PROG</a>: $@
77<a class="l" name="71" href="#71">71</a>}
78<a class="l" name="72" href="#72">72</a>
79<a class="l" name="73" href="#73">73</a><span class="c">#</span>
80<a class="l" name="74" href="#74">74</a><span class="c"># Print the provided informational message, and the current value of $SECONDS</span>
81<a class="l" name="75" href="#75">75</a><span class="c"># in a user-friendly format.</span>
82<a class="l" name="76" href="#76">76</a><span class="c">#</span>
83<a class="l" name="77" href="#77">77</a><a class="xf" name="timeinfo"/><a href="/source/s?refs=timeinfo" class="xf intelliWindow-symbol" data-definition-place="def">timeinfo</a>()
84<a class="l" name="78" href="#78">78</a>{
85<a class="l" name="79" href="#79">79</a>	<b>typeset</b> -<a href="/source/s?defs=Z2" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Z2</a> <a href="/source/s?defs=sec" class="intelliWindow-symbol" data-definition-place="undefined-in-file">sec</a>
86<a class="hl" name="80" href="#80">80</a>	<b>typeset</b> -i <a href="/source/s?defs=min" class="intelliWindow-symbol" data-definition-place="undefined-in-file">min</a> <a href="/source/s?defs=seconds" class="intelliWindow-symbol" data-definition-place="undefined-in-file">seconds</a>
87<a class="l" name="81" href="#81">81</a>
88<a class="l" name="82" href="#82">82</a>	((<a href="/source/s?defs=seconds" class="intelliWindow-symbol" data-definition-place="undefined-in-file">seconds</a> = <a href="/source/s?defs=SECONDS" class="intelliWindow-symbol" data-definition-place="undefined-in-file">SECONDS</a>))
89<a class="l" name="83" href="#83">83</a>	((<a href="/source/s?defs=min" class="intelliWindow-symbol" data-definition-place="undefined-in-file">min</a> = <a href="/source/s?defs=seconds" class="intelliWindow-symbol" data-definition-place="undefined-in-file">seconds</a> / <span class="n">60</span>))
90<a class="l" name="84" href="#84">84</a>	((<a href="/source/s?defs=sec" class="intelliWindow-symbol" data-definition-place="undefined-in-file">sec</a> = <a href="/source/s?defs=seconds" class="intelliWindow-symbol" data-definition-place="undefined-in-file">seconds</a> % <span class="n">60</span>))
91<a class="l" name="85" href="#85">85</a>
92<a class="l" name="86" href="#86">86</a>	<a class="d intelliWindow-symbol" href="#info" data-definition-place="defined-in-file">info</a> <span class="s">&quot;$1 in ${min}m${sec}s&quot;</span>
93<a class="l" name="87" href="#87">87</a>}
94<a class="l" name="88" href="#88">88</a>
95<a class="l" name="89" href="#89">89</a><a href="/source/s?defs=which_scm" class="intelliWindow-symbol" data-definition-place="undefined-in-file">which_scm</a> | <b>read</b> <a href="/source/s?defs=SCM_MODE" class="intelliWindow-symbol" data-definition-place="undefined-in-file">SCM_MODE</a> <a href="/source/s?defs=CODEMGR_WS" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CODEMGR_WS</a> || <b>exit</b> <span class="n">1</span>
96<a class="hl" name="90" href="#90">90</a>
97<a class="l" name="91" href="#91">91</a><b>if</b> [[ <a href="/source/s?defs=%24SCM_MODE" class="intelliWindow-symbol" data-definition-place="undefined-in-file">$SCM_MODE</a> == <span class="s">&quot;unknown&quot;</span> ]];<b>then</b>
98<a class="l" name="92" href="#92">92</a>	<b>print</b> -<a href="/source/s?defs=u2" class="intelliWindow-symbol" data-definition-place="undefined-in-file">u2</a> <span class="s">&quot;Unable to determine SCM type currently in use.&quot;</span>
99<a class="l" name="93" href="#93">93</a>	<b>exit</b> <span class="n">1</span>
100<a class="l" name="94" href="#94">94</a><b>fi</b>
101<a class="l" name="95" href="#95">95</a>
102<a class="l" name="96" href="#96">96</a><b>export</b> <a href="/source/s?defs=CODEMGR_WS" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CODEMGR_WS</a>
103<a class="l" name="97" href="#97">97</a><a href="/source/s?defs=SRC" class="intelliWindow-symbol" data-definition-place="undefined-in-file">SRC</a>=<a href="/source/s?defs=%24CODEMGR_WS" class="intelliWindow-symbol" data-definition-place="undefined-in-file">$CODEMGR_WS</a>/<a href="/source/s?path=/usr/">usr</a>/<a href="/source/s?path=/usr/src">src</a> <b>export</b> <a href="/source/s?defs=SRC" class="intelliWindow-symbol" data-definition-place="undefined-in-file">SRC</a>
104<a class="l" name="98" href="#98">98</a><a href="/source/s?defs=MACH" class="intelliWindow-symbol" data-definition-place="undefined-in-file">MACH</a>=`<a href="/source/s?defs=uname" class="intelliWindow-symbol" data-definition-place="undefined-in-file">uname</a> -p` <b>export</b> <a href="/source/s?defs=MACH" class="intelliWindow-symbol" data-definition-place="undefined-in-file">MACH</a>
105<a class="l" name="99" href="#99">99</a>
106<a class="hl" name="100" href="#100">100</a>[ -f <a href="/source/s?defs=%24XREFMK" class="intelliWindow-symbol" data-definition-place="undefined-in-file">$XREFMK</a> ] || <a class="d intelliWindow-symbol" href="#fail" data-definition-place="defined-in-file">fail</a> <span class="s">&quot;cannot locate <a href="/source/s?path=xref.mk">xref.mk</a>&quot;</span>
107<a class="l" name="101" href="#101">101</a>
108<a class="l" name="102" href="#102">102</a><a href="/source/s?defs=clobber" class="intelliWindow-symbol" data-definition-place="undefined-in-file">clobber</a>=
109<a class="l" name="103" href="#103">103</a><a href="/source/s?defs=noflg" class="intelliWindow-symbol" data-definition-place="undefined-in-file">noflg</a>=
110<a class="l" name="104" href="#104">104</a><a href="/source/s?defs=xrefs" class="intelliWindow-symbol" data-definition-place="undefined-in-file">xrefs</a>=
111<a class="l" name="105" href="#105">105</a>
112<a class="l" name="106" href="#106">106</a><b>while</b> <b>getopts</b> <a href="/source/s?defs=cfm" class="intelliWindow-symbol" data-definition-place="undefined-in-file">cfm</a>:<a href="/source/s?defs=px" class="intelliWindow-symbol" data-definition-place="undefined-in-file">px</a>: <a href="/source/s?defs=flag" class="intelliWindow-symbol" data-definition-place="undefined-in-file">flag</a>; <b>do</b>
113<a class="l" name="107" href="#107">107</a>	<b>case</b> <a href="/source/s?defs=%24flag" class="intelliWindow-symbol" data-definition-place="undefined-in-file">$flag</a> <b>in</b>
114<a class="l" name="108" href="#108">108</a>	c)
115<a class="l" name="109" href="#109">109</a>		<a href="/source/s?defs=clobber" class="intelliWindow-symbol" data-definition-place="undefined-in-file">clobber</a>=<a href="/source/s?defs=y" class="intelliWindow-symbol" data-definition-place="undefined-in-file">y</a>
116<a class="hl" name="110" href="#110">110</a>		;;
117<a class="l" name="111" href="#111">111</a>	f)
118<a class="l" name="112" href="#112">112</a>		<a href="/source/s?defs=noflg" class="intelliWindow-symbol" data-definition-place="undefined-in-file">noflg</a>=<a href="/source/s?defs=y" class="intelliWindow-symbol" data-definition-place="undefined-in-file">y</a>
119<a class="l" name="113" href="#113">113</a>		;;
120<a class="l" name="114" href="#114">114</a>	m)
121<a class="l" name="115" href="#115">115</a>		<a href="/source/s?defs=XRMAKEFILE" class="intelliWindow-symbol" data-definition-place="undefined-in-file">XRMAKEFILE</a>=<a href="/source/s?defs=%24OPTARG" class="intelliWindow-symbol" data-definition-place="undefined-in-file">$OPTARG</a>
122<a class="l" name="116" href="#116">116</a>		;;
123<a class="l" name="117" href="#117">117</a>	p)
124<a class="l" name="118" href="#118">118</a>		<span class="c">#</span>
125<a class="l" name="119" href="#119">119</a>		<span class="c"># The ENVCPPFLAGS* environment variables contain the include</span>
126<a class="hl" name="120" href="#120">120</a>		<span class="c"># paths to our proto areas; clear &apos;em so that they don&apos;t end</span>
127<a class="l" name="121" href="#121">121</a>		<span class="c"># up in CPPFLAGS, and thus don&apos;t end up in XRINCS in <a href="/source/s?path=xref.mk">xref.mk</a>.</span>
128<a class="l" name="122" href="#122">122</a>		<span class="c">#</span>
129<a class="l" name="123" href="#123">123</a>		<a href="/source/s?defs=ENVCPPFLAGS1" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ENVCPPFLAGS1</a>=
130<a class="l" name="124" href="#124">124</a>		<a href="/source/s?defs=ENVCPPFLAGS2" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ENVCPPFLAGS2</a>=
131<a class="l" name="125" href="#125">125</a>		<a href="/source/s?defs=ENVCPPFLAGS3" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ENVCPPFLAGS3</a>=
132<a class="l" name="126" href="#126">126</a>		<a href="/source/s?defs=ENVCPPFLAGS4" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ENVCPPFLAGS4</a>=
133<a class="l" name="127" href="#127">127</a>		;;
134<a class="l" name="128" href="#128">128</a> 	x)
135<a class="l" name="129" href="#129">129</a>		<a href="/source/s?defs=xrefs" class="intelliWindow-symbol" data-definition-place="undefined-in-file">xrefs</a>=<a href="/source/s?defs=%24OPTARG" class="intelliWindow-symbol" data-definition-place="undefined-in-file">$OPTARG</a>
136<a class="hl" name="130" href="#130">130</a>		;;
137<a class="l" name="131" href="#131">131</a>	\?)
138<a class="l" name="132" href="#132">132</a>		<b>echo</b> <span class="s">&quot;usage: <a href="/source/s?refs=%24PROG">$PROG</a> [-cfp] [-m &lt;makefile&gt;]&quot;</span>\
139<a class="l" name="133" href="#133">133</a>		     <span class="s">&quot;[-x cscope|ctags|etags[,...]] [&lt;subtree&gt; ...]&quot;</span>\
140<a class="l" name="134" href="#134">134</a>		      &gt; /<a href="/source/s?path=/dev/">dev</a>/<a href="/source/s?path=/dev/stderr">stderr</a>
141<a class="l" name="135" href="#135">135</a>		<b>exit</b> <span class="n">1</span>
142<a class="l" name="136" href="#136">136</a>		;;
143<a class="l" name="137" href="#137">137</a>	<b>esac</b>
144<a class="l" name="138" href="#138">138</a><b>done</b>
145<a class="l" name="139" href="#139">139</a>
146<a class="hl" name="140" href="#140">140</a><b>shift</b> $((<a href="/source/s?defs=OPTIND" class="intelliWindow-symbol" data-definition-place="undefined-in-file">OPTIND</a> - <span class="n">1</span>))
147<a class="l" name="141" href="#141">141</a>
148<a class="l" name="142" href="#142">142</a><span class="c">#</span>
149<a class="l" name="143" href="#143">143</a><span class="c"># Get the list of directories before we reset $@.</span>
150<a class="l" name="144" href="#144">144</a><span class="c">#</span>
151<a class="l" name="145" href="#145">145</a><b>dirs</b>=$@
152<a class="l" name="146" href="#146">146</a>[ -z <span class="s">&quot;<a href="/source/s?refs=%24dirs">$dirs</a>&quot;</span> ] &amp;&amp; <b>dirs</b>=.
153<a class="l" name="147" href="#147">147</a>
154<a class="l" name="148" href="#148">148</a><span class="c">#</span>
155<a class="l" name="149" href="#149">149</a><span class="c"># Get the canonical path to the workspace.  This allows xref to work</span>
156<a class="hl" name="150" href="#150">150</a><span class="c"># even in the presence of lofs(7FS).</span>
157<a class="l" name="151" href="#151">151</a><span class="c">#</span>
158<a class="l" name="152" href="#152">152</a><b>cd</b> <a href="/source/s?defs=%24CODEMGR_WS" class="intelliWindow-symbol" data-definition-place="undefined-in-file">$CODEMGR_WS</a>
159<a class="l" name="153" href="#153">153</a><a href="/source/s?defs=CODEMGR_WS" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CODEMGR_WS</a>=`/<a href="/source/s?path=/bin/">bin</a>/<a href="/source/s?path=/bin/pwd">pwd</a>`
160<a class="l" name="154" href="#154">154</a><b>cd</b> - &gt; /<a href="/source/s?path=/dev/">dev</a>/<a href="/source/s?path=/dev/null">null</a>
161<a class="l" name="155" href="#155">155</a>
162<a class="l" name="156" href="#156">156</a><span class="c">#</span>
163<a class="l" name="157" href="#157">157</a><span class="c"># Process the xref format list.  For convenience, support common synonyms</span>
164<a class="l" name="158" href="#158">158</a><span class="c"># for the xref formats.</span>
165<a class="l" name="159" href="#159">159</a><span class="c">#</span>
166<a class="hl" name="160" href="#160">160</a><b>if</b> [ -z <span class="s">&quot;<a href="/source/s?refs=%24xrefs">$xrefs</a>&quot;</span> ]; <b>then</b>
167<a class="l" name="161" href="#161">161</a>	<span class="c">#</span>
168<a class="l" name="162" href="#162">162</a>	<span class="c"># Disable etags if we can&apos;t find it.</span>
169<a class="l" name="163" href="#163">163</a>	<span class="c">#</span>
170<a class="l" name="164" href="#164">164</a>	<a href="/source/s?defs=xrefs" class="intelliWindow-symbol" data-definition-place="undefined-in-file">xrefs</a>=<span class="s">&quot;cscope ctags&quot;</span>
171<a class="l" name="165" href="#165">165</a>	<a href="/source/s?defs=%24MAKE" class="intelliWindow-symbol" data-definition-place="undefined-in-file">$MAKE</a> -e -f <a href="/source/s?defs=%24XREFMK" class="intelliWindow-symbol" data-definition-place="undefined-in-file">$XREFMK</a> <a href="/source/s?path=xref.etags.check">xref.etags.check</a> <span class="n">2</span>&gt;/<a href="/source/s?path=/dev/">dev</a>/<a href="/source/s?path=/dev/null">null</a> <span class="n">1</span>&gt;&amp;<span class="n">2</span> &amp;&amp; \
172<a class="l" name="166" href="#166">166</a>	    <a href="/source/s?defs=xrefs" class="intelliWindow-symbol" data-definition-place="undefined-in-file">xrefs</a>=<span class="s">&quot;<a href="/source/s?refs=%24xrefs">$xrefs</a> etags&quot;</span>
173<a class="l" name="167" href="#167">167</a><b>else</b>
174<a class="l" name="168" href="#168">168</a>	<a href="/source/s?defs=oldifs" class="intelliWindow-symbol" data-definition-place="undefined-in-file">oldifs</a>=<a href="/source/s?defs=%24IFS" class="intelliWindow-symbol" data-definition-place="undefined-in-file">$IFS</a>
175<a class="l" name="169" href="#169">169</a>	<a href="/source/s?defs=IFS" class="intelliWindow-symbol" data-definition-place="undefined-in-file">IFS</a>=,
176<a class="hl" name="170" href="#170">170</a>	<b>set</b> -- <a href="/source/s?defs=%24xrefs" class="intelliWindow-symbol" data-definition-place="undefined-in-file">$xrefs</a>
177<a class="l" name="171" href="#171">171</a>	<a href="/source/s?defs=IFS" class="intelliWindow-symbol" data-definition-place="undefined-in-file">IFS</a>=<a href="/source/s?defs=%24oldifs" class="intelliWindow-symbol" data-definition-place="undefined-in-file">$oldifs</a>
178<a class="l" name="172" href="#172">172</a>
179<a class="l" name="173" href="#173">173</a>	<a href="/source/s?defs=xrefs" class="intelliWindow-symbol" data-definition-place="undefined-in-file">xrefs</a>=
180<a class="l" name="174" href="#174">174</a>	<b>for</b> <a href="/source/s?defs=xref" class="intelliWindow-symbol" data-definition-place="undefined-in-file">xref</a>; <b>do</b>
181<a class="l" name="175" href="#175">175</a>		<b>case</b> <a href="/source/s?defs=%24xref" class="intelliWindow-symbol" data-definition-place="undefined-in-file">$xref</a> <b>in</b>
182<a class="l" name="176" href="#176">176</a>		<a href="/source/s?defs=cscope" class="intelliWindow-symbol" data-definition-place="undefined-in-file">cscope</a>|<a href="/source/s?path=cscope.out">cscope.out</a>)
183<a class="l" name="177" href="#177">177</a>			<a href="/source/s?defs=xrefs" class="intelliWindow-symbol" data-definition-place="undefined-in-file">xrefs</a>=<span class="s">&quot;<a href="/source/s?refs=%24xrefs">$xrefs</a> cscope&quot;</span>
184<a class="l" name="178" href="#178">178</a>			;;
185<a class="l" name="179" href="#179">179</a>		<a href="/source/s?defs=ctags" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ctags</a>|<a href="/source/s?defs=tags" class="intelliWindow-symbol" data-definition-place="undefined-in-file">tags</a>)
186<a class="hl" name="180" href="#180">180</a>			<a href="/source/s?defs=xrefs" class="intelliWindow-symbol" data-definition-place="undefined-in-file">xrefs</a>=<span class="s">&quot;<a href="/source/s?refs=%24xrefs">$xrefs</a> ctags&quot;</span>
187<a class="l" name="181" href="#181">181</a>			;;
188<a class="l" name="182" href="#182">182</a>		<a href="/source/s?defs=etags" class="intelliWindow-symbol" data-definition-place="undefined-in-file">etags</a>|<a href="/source/s?defs=TAGS" class="intelliWindow-symbol" data-definition-place="undefined-in-file">TAGS</a>)
189<a class="l" name="183" href="#183">183</a>			<a href="/source/s?defs=xrefs" class="intelliWindow-symbol" data-definition-place="undefined-in-file">xrefs</a>=<span class="s">&quot;<a href="/source/s?refs=%24xrefs">$xrefs</a> etags&quot;</span>
190<a class="l" name="184" href="#184">184</a>			;;
191<a class="l" name="185" href="#185">185</a>		*)
192<a class="l" name="186" href="#186">186</a>			<a class="d intelliWindow-symbol" href="#warn" data-definition-place="defined-in-file">warn</a> <span class="s">&quot;ignoring unknown cross-reference \&quot;<a href="/source/s?refs=%24xref">$xref</a>\&quot;&quot;</span>
193<a class="l" name="187" href="#187">187</a>			;;
194<a class="l" name="188" href="#188">188</a> 		<b>esac</b>
195<a class="l" name="189" href="#189">189</a> 	<b>done</b>
196<a class="hl" name="190" href="#190">190</a>
197<a class="l" name="191" href="#191">191</a>	[ -z <span class="s">&quot;<a href="/source/s?refs=%24xrefs">$xrefs</a>&quot;</span> ] &amp;&amp; <a class="d intelliWindow-symbol" href="#fail" data-definition-place="defined-in-file">fail</a> <span class="s">&quot;no known cross-reference formats specified&quot;</span>
198<a class="l" name="192" href="#192">192</a><b>fi</b>
199<a class="l" name="193" href="#193">193</a>
200<a class="l" name="194" href="#194">194</a><span class="c">#</span>
201<a class="l" name="195" href="#195">195</a><span class="c"># Process the requested list of directories.</span>
202<a class="l" name="196" href="#196">196</a><span class="c">#</span>
203<a class="l" name="197" href="#197">197</a><b>for</b> <a href="/source/s?defs=dir" class="intelliWindow-symbol" data-definition-place="undefined-in-file">dir</a> <b>in</b> <a href="/source/s?defs=%24dirs" class="intelliWindow-symbol" data-definition-place="undefined-in-file">$dirs</a>; <b>do</b>
204<a class="l" name="198" href="#198">198</a>	<b>if</b> [ ! -d <a href="/source/s?defs=%24dir" class="intelliWindow-symbol" data-definition-place="undefined-in-file">$dir</a> ]; <b>then</b>
205<a class="l" name="199" href="#199">199</a>		<a class="d intelliWindow-symbol" href="#warn" data-definition-place="defined-in-file">warn</a> <span class="s">&quot;directory \&quot;<a href="/source/s?refs=%24dir">$dir</a>\&quot; does not exist; skipping&quot;</span>
206<a class="hl" name="200" href="#200">200</a>		<b>continue</b>
207<a class="l" name="201" href="#201">201</a>	<b>fi</b>
208<a class="l" name="202" href="#202">202</a>
209<a class="l" name="203" href="#203">203</a>	<span class="c">#</span>
210<a class="l" name="204" href="#204">204</a>	<span class="c"># NOTE: we cannot use $PWD because it will mislead in the presence</span>
211<a class="l" name="205" href="#205">205</a>	<span class="c"># of lofs(7FS).</span>
212<a class="l" name="206" href="#206">206</a>	<span class="c">#</span>
213<a class="l" name="207" href="#207">207</a>	<b>cd</b> <a href="/source/s?defs=%24dir" class="intelliWindow-symbol" data-definition-place="undefined-in-file">$dir</a> || <a class="d intelliWindow-symbol" href="#fail" data-definition-place="defined-in-file">fail</a> <span class="s">&quot;cannot change to directory <a href="/source/s?refs=%24dir">$dir</a>&quot;</span>
214<a class="l" name="208" href="#208">208</a>	<b>pwd</b>=`/<a href="/source/s?path=/bin/">bin</a>/<a href="/source/s?path=/bin/pwd">pwd</a>`
215<a class="l" name="209" href="#209">209</a>	<a href="/source/s?defs=reldir" class="intelliWindow-symbol" data-definition-place="undefined-in-file">reldir</a>=${<b>pwd</b><span class="c">##${CODEMGR_WS}/}</span>
216<a class="hl" name="210" href="#210">210</a>	<b>if</b> [ <span class="s">&quot;<a href="/source/s?refs=%24reldir">$reldir</a>&quot;</span> = <span class="s">&quot;<a href="/source/s?refs=%24pwd">$pwd</a>&quot;</span> ]; <b>then</b>
217<a class="l" name="211" href="#211">211</a>		<a class="d intelliWindow-symbol" href="#warn" data-definition-place="defined-in-file">warn</a> <span class="s">&quot;directory \&quot;<a href="/source/s?refs=%24pwd">$pwd</a>\&quot; is not beneath \$CODEMGR_WS; skipping&quot;</span>
218<a class="l" name="212" href="#212">212</a>		<b>cd</b> - &gt; /<a href="/source/s?path=/dev/">dev</a>/<a href="/source/s?path=/dev/null">null</a>
219<a class="l" name="213" href="#213">213</a>		<b>continue</b>
220<a class="l" name="214" href="#214">214</a>	<b>fi</b>
221<a class="l" name="215" href="#215">215</a>
222<a class="l" name="216" href="#216">216</a>	<span class="c">#</span>
223<a class="l" name="217" href="#217">217</a>	<span class="c"># If we&apos;re building cross-references, then run `<a href="/source/s?path=xref.clean">xref.clean</a>&apos; first</span>
224<a class="l" name="218" href="#218">218</a>	<span class="c"># to purge any crud that may be lying around from previous aborted runs.</span>
225<a class="l" name="219" href="#219">219</a>	<span class="c">#</span>
226<a class="hl" name="220" href="#220">220</a>	<b>if</b> [ -z <span class="s">&quot;<a href="/source/s?refs=%24clobber">$clobber</a>&quot;</span> ]; <b>then</b>
227<a class="l" name="221" href="#221">221</a>		<a href="/source/s?defs=%24MAKE" class="intelliWindow-symbol" data-definition-place="undefined-in-file">$MAKE</a> -e -f <a href="/source/s?defs=%24XREFMK" class="intelliWindow-symbol" data-definition-place="undefined-in-file">$XREFMK</a> <a href="/source/s?path=xref.clean">xref.clean</a> &gt; /<a href="/source/s?path=/dev/">dev</a>/<a href="/source/s?path=/dev/null">null</a>
228<a class="l" name="222" href="#222">222</a>	<b>fi</b>
229<a class="l" name="223" href="#223">223</a>
230<a class="l" name="224" href="#224">224</a>	<span class="c">#</span>
231<a class="l" name="225" href="#225">225</a>	<span class="c"># Find flg-related source files, if requested.</span>
232<a class="l" name="226" href="#226">226</a>	<span class="c">#</span>
233<a class="l" name="227" href="#227">227</a>	<b>if</b> [ -z <span class="s">&quot;<a href="/source/s?refs=%24noflg">$noflg</a>&quot;</span> -a -z <span class="s">&quot;<a href="/source/s?refs=%24clobber">$clobber</a>&quot;</span> ]; <b>then</b>
234<a class="l" name="228" href="#228">228</a>		<a href="/source/s?defs=SECONDS" class="intelliWindow-symbol" data-definition-place="undefined-in-file">SECONDS</a>=<span class="n">0</span>
235<a class="l" name="229" href="#229">229</a>    		<a class="d intelliWindow-symbol" href="#info" data-definition-place="defined-in-file">info</a> <span class="s">&quot;<a href="/source/s?refs=%24reldir">$reldir</a>: finding flg-related source files&quot;</span>
236<a class="hl" name="230" href="#230">230</a>		<a href="/source/s?defs=%24MAKE" class="intelliWindow-symbol" data-definition-place="undefined-in-file">$MAKE</a> -e -f <a href="/source/s?defs=%24XREFMK" class="intelliWindow-symbol" data-definition-place="undefined-in-file">$XREFMK</a> <a href="/source/s?path=xref.flg">xref.flg</a> &gt; /<a href="/source/s?path=/dev/">dev</a>/<a href="/source/s?path=/dev/null">null</a>
237<a class="l" name="231" href="#231">231</a>		<b>if</b> [ $? -ne <span class="n">0</span> ]; <b>then</b>
238<a class="l" name="232" href="#232">232</a>			<a class="d intelliWindow-symbol" href="#warn" data-definition-place="defined-in-file">warn</a> <span class="s">&quot;<a href="/source/s?refs=%24reldir">$reldir</a>: unable to find flg-related source files&quot;</span>
239<a class="l" name="233" href="#233">233</a>		<b>else</b>
240<a class="l" name="234" href="#234">234</a>			<a href="/source/s?defs=nfiles" class="intelliWindow-symbol" data-definition-place="undefined-in-file">nfiles</a>=`<a href="/source/s?defs=wc" class="intelliWindow-symbol" data-definition-place="undefined-in-file">wc</a> -l &lt; <a href="/source/s?path=xref.flg">xref.flg</a>`
241<a class="l" name="235" href="#235">235</a>			<b>if</b> [ <span class="s">&quot;<a href="/source/s?refs=%24nfiles">$nfiles</a>&quot;</span> -eq <span class="n">1</span> ]; <b>then</b>
242<a class="l" name="236" href="#236">236</a>				<a href="/source/s?defs=msg" class="intelliWindow-symbol" data-definition-place="undefined-in-file">msg</a>=<span class="s">&quot;found 1 flg-related source file&quot;</span>
243<a class="l" name="237" href="#237">237</a>			<b>else</b>
244<a class="l" name="238" href="#238">238</a>				<a href="/source/s?defs=msg" class="intelliWindow-symbol" data-definition-place="undefined-in-file">msg</a>=<span class="s">&quot;found <a href="/source/s?refs=%24nfiles">$nfiles</a> flg-related source files&quot;</span>
245<a class="l" name="239" href="#239">239</a>			<b>fi</b>
246<a class="hl" name="240" href="#240">240</a>			<a class="d intelliWindow-symbol" href="#timeinfo" data-definition-place="defined-in-file">timeinfo</a> <span class="s">&quot;<a href="/source/s?refs=%24reldir">$reldir</a>: <a href="/source/s?refs=%24msg">$msg</a>&quot;</span>
247<a class="l" name="241" href="#241">241</a>		<b>fi</b>
248<a class="l" name="242" href="#242">242</a>	<b>fi</b>
249<a class="l" name="243" href="#243">243</a>
250<a class="l" name="244" href="#244">244</a>	<span class="c">#</span>
251<a class="l" name="245" href="#245">245</a>	<span class="c"># Build or clobber all of the requested cross-references.</span>
252<a class="l" name="246" href="#246">246</a>	<span class="c">#</span>
253<a class="l" name="247" href="#247">247</a>	<b>for</b> <a href="/source/s?defs=xref" class="intelliWindow-symbol" data-definition-place="undefined-in-file">xref</a> <b>in</b> <a href="/source/s?defs=%24xrefs" class="intelliWindow-symbol" data-definition-place="undefined-in-file">$xrefs</a>; <b>do</b>
254<a class="l" name="248" href="#248">248</a>		<b>if</b> [ -n <span class="s">&quot;<a href="/source/s?refs=%24clobber">$clobber</a>&quot;</span> ]; <b>then</b>
255<a class="l" name="249" href="#249">249</a>			<a class="d intelliWindow-symbol" href="#info" data-definition-place="defined-in-file">info</a> <span class="s">&quot;<a href="/source/s?refs=%24reldir">$reldir</a>: clobbering <a href="/source/s?refs=%24xref">$xref</a> cross-reference&quot;</span>
256<a class="hl" name="250" href="#250">250</a>			<a href="/source/s?defs=%24MAKE" class="intelliWindow-symbol" data-definition-place="undefined-in-file">$MAKE</a> -e -f <a href="/source/s?defs=%24XREFMK" class="intelliWindow-symbol" data-definition-place="undefined-in-file">$XREFMK</a> <a href="/source/s?defs=xref" class="intelliWindow-symbol" data-definition-place="undefined-in-file">xref</a>.${<a href="/source/s?defs=xref" class="intelliWindow-symbol" data-definition-place="undefined-in-file">xref</a>}.<a href="/source/s?defs=clobber" class="intelliWindow-symbol" data-definition-place="undefined-in-file">clobber</a> &gt; /<a href="/source/s?path=/dev/">dev</a>/<a href="/source/s?path=/dev/null">null</a> ||
257<a class="l" name="251" href="#251">251</a> 			    <a class="d intelliWindow-symbol" href="#warn" data-definition-place="defined-in-file">warn</a> <span class="s">&quot;<a href="/source/s?refs=%24reldir">$reldir</a>: cannot clobber <a href="/source/s?refs=%24xref">$xref</a> cross-reference&quot;</span>
258<a class="l" name="252" href="#252">252</a>			<b>continue</b>
259<a class="l" name="253" href="#253">253</a>		<b>fi</b>
260<a class="l" name="254" href="#254">254</a>
261<a class="l" name="255" href="#255">255</a>		<a href="/source/s?defs=SECONDS" class="intelliWindow-symbol" data-definition-place="undefined-in-file">SECONDS</a>=<span class="n">0</span>
262<a class="l" name="256" href="#256">256</a>		<a class="d intelliWindow-symbol" href="#info" data-definition-place="defined-in-file">info</a> <span class="s">&quot;<a href="/source/s?refs=%24reldir">$reldir</a>: building <a href="/source/s?refs=%24xref">$xref</a> cross-reference&quot;</span>
263<a class="l" name="257" href="#257">257</a>		<a href="/source/s?defs=%24MAKE" class="intelliWindow-symbol" data-definition-place="undefined-in-file">$MAKE</a> -e -f <a href="/source/s?defs=%24XREFMK" class="intelliWindow-symbol" data-definition-place="undefined-in-file">$XREFMK</a> <a href="/source/s?defs=xref" class="intelliWindow-symbol" data-definition-place="undefined-in-file">xref</a>.${<a href="/source/s?defs=xref" class="intelliWindow-symbol" data-definition-place="undefined-in-file">xref</a>} &gt; /<a href="/source/s?path=/dev/">dev</a>/<a href="/source/s?path=/dev/null">null</a> ||
264<a class="l" name="258" href="#258">258</a>		    <a class="d intelliWindow-symbol" href="#fail" data-definition-place="defined-in-file">fail</a> <span class="s">&quot;<a href="/source/s?refs=%24reldir">$reldir</a>: cannot build <a href="/source/s?refs=%24xref">$xref</a> cross-reference&quot;</span>
265<a class="l" name="259" href="#259">259</a>		<a class="d intelliWindow-symbol" href="#timeinfo" data-definition-place="defined-in-file">timeinfo</a> <span class="s">&quot;<a href="/source/s?refs=%24reldir">$reldir</a>: built <a href="/source/s?refs=%24xref">$xref</a> cross-reference&quot;</span>
266<a class="hl" name="260" href="#260">260</a> 	<b>done</b>
267<a class="l" name="261" href="#261">261</a>
268<a class="l" name="262" href="#262">262</a>	<a href="/source/s?defs=%24MAKE" class="intelliWindow-symbol" data-definition-place="undefined-in-file">$MAKE</a> -e -f <a href="/source/s?defs=%24XREFMK" class="intelliWindow-symbol" data-definition-place="undefined-in-file">$XREFMK</a> <a href="/source/s?path=xref.clean">xref.clean</a> &gt; /<a href="/source/s?path=/dev/">dev</a>/<a href="/source/s?path=/dev/null">null</a> ||
269<a class="l" name="263" href="#263">263</a>	    <a class="d intelliWindow-symbol" href="#warn" data-definition-place="defined-in-file">warn</a> <span class="s">&quot;<a href="/source/s?refs=%24reldir">$reldir</a>: cannot clean up temporary files&quot;</span>
270<a class="l" name="264" href="#264">264</a>	<b>cd</b> - &gt; /<a href="/source/s?path=/dev/">dev</a>/<a href="/source/s?path=/dev/null">null</a>
271<a class="l" name="265" href="#265">265</a><b>done</b>
272<a class="l" name="266" href="#266">266</a><b>exit</b> <span class="n">0</span>
273<a class="l" name="267" href="#267">267</a>
274<a class="l" name="268" href="#268">268</a><b>typeset</b> -i <a href="/source/s?defs=vint" class="intelliWindow-symbol" data-definition-place="undefined-in-file">vint</a>
275<a class="l" name="269" href="#269">269</a><a href="/source/s?defs=vint" class="intelliWindow-symbol" data-definition-place="undefined-in-file">vint</a>=<span class="n">0xFFEF</span>
276<a class="hl" name="270" href="#270">270</a><b>echo</b> <span class="s">&apos;<a href="http://example.com">http://example.com</a>&apos;</span>
277<a class="l" name="271" href="#271">271</a><b>typeset</b> +l -i <a href="/source/s?defs=vint2" class="intelliWindow-symbol" data-definition-place="undefined-in-file">vint2</a>
278<a class="l" name="272" href="#272">272</a></body>
279</html>
280